I am running a script that uses the xcopy command to add a scheduled task to several workstations. This is the script.
for /F %%G in (computers.txt) do (
xcopy defrag.job \\%%G\admin$\tasks\ /C /H /R /Y
schtasks /change /s %%G /RU "NT AUTHORITY\SYSTEM" /tn Defrag
When workstations are not on the timeouts cause the script to take too long to complete. How can I change the timeout to a shorter setting to speed up the processing of the script.