In many of my scripts that loop through an array of computer names, I use "test-connection" first to make sure the computer is alive before moving on with the script. Sometimes, for a period of several minutes, the test-connection cmdlet stops working for anything I try it with - whether it is run from a script or I manually run it from the PS command prompt. For example:
test-connection "servername"
"Invalid Query Error"....
I tried using FQDN, and providing the argument in the command line of COMPUTERNAME:
test-connection -computername "servername"
The after several minutes, it just randomly starts working again - I dont even close the PS window or logout of the server console - it just starts working again from the same PS command window session. I am running on Windows 2008 R2 SP1 Standard, PS 2.0.
Anyone else seen this?
NK