Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

$computers = gc "C:\temp\MAXxing_SW\server.

txt"
$source = "\\bentpsysmgt01\C$\temp\itm_uninstall.cmd"

foreach ($computer in $computers)


{
Copy-Item -Path $source -Destination "\\$computer\c$\temp\" -Recurse
write-host "Files copied from $source to $computer "

foreach ($computer in $computers) {


Invoke-Command -ComputerName $comp ......
}

You might also like