Monday, August 20, 2018

Powershell - ping the top of a list

This is a bit of a dodgy, basically the migration was many computers at once each day, feed in from a list. This just picked the top computer and would ping it on screen so I could see if the process had started for the whole group. The first step in my migration was a pre-reboot.

$computers = Import-Csv C:\temp\computerlist.txt
ipconfig /flushdns

foreach ($computers in $computers){
$NoMigComputer=$ThisComputer + ""
ping -t $NoMigComputer -4

No comments:

Blog Archive