Goole Ads

Tuesday, August 18, 2015

Iterating over text file to run psexec - batch file and Power Shell

$file = Get-Content .\computers.txt

foreach ($item in $file)  {.\PsExec.exe \\$item ping google.com}