Whos script we talking about here, the first (docs) or the second ?

Doc, imagine $TempFile in this line should be double-quoted:

SHELL '%COMSPEC% /C PING -n 1 @WKSTA >'+$TempFile

ja?

-Shawn