Hi
im trying to copy a file from one computer to multiple servers.
I want to use a txt (Srvlist.txt) file containing the servers name.
but I get an error that the path cannot be found.
I can copy the file manualy to the UNC path.
this is the script:
$a = Get-Content "D:\Scripting\Srvlist.txt"
foreach ($i in $a)
{Copy-Item D:\Scripting\TestCopy.txt -Destination \\$i\C$\temp -force}
thanks,