G
Guest
I have been using the following little script file to remotely change the
time en-mass for some computers in our testing environment:
for /F %%a in (c:\PCs.txt) do psexec \\%%a net time \\Server_IP /set /y
The psexec.exe program runs a service on a remote machine without the need
for logon credentials to be specified. If it cannot reach a host for any
reason however, it stalls and does not continue with the other computer IPs
listed in the PCs.txt. Is there a way to do a ping check beforehand to ensure
that the machine is plugged in and on and if not to skip it?
time en-mass for some computers in our testing environment:
for /F %%a in (c:\PCs.txt) do psexec \\%%a net time \\Server_IP /set /y
The psexec.exe program runs a service on a remote machine without the need
for logon credentials to be specified. If it cannot reach a host for any
reason however, it stalls and does not continue with the other computer IPs
listed in the PCs.txt. Is there a way to do a ping check beforehand to ensure
that the machine is plugged in and on and if not to skip it?