@echo off
net use Y: \\\\sourceserver\\d$
for /F %%A in (%1) do (
echo %%A
::map a drive to the destination
net use z: \\\\%%A\\d$
::copy the updated batch
copy /y Y:\\updateproperties.bat Z:\\updateproperties.bat
::create the scheduled task (the /st argument has to be a 4 digit, military time 8:00 is invalid, it should be 08:00)
schtasks /create /s %%A /tn "Update Properties" /tr D:\\updateproperties.bat /sc daily /st 22:00 /ru System
::run the task
schtasks /run /s %%A /tn "Update Properties"
::disconnect the mapped drive
net use z: /delete
)
net use y: /delete