I have a file with the following command to turn off some machines on the network.
FOR /F %i IN (C:\estacoes.txt) DO SHUTDOWN /s /t 01 /m %i
Where stations.txt is a file with the names of machines to be turned off.
When I open cmd and run this command in hand it works correctly. But when I save in a .bat file and try to run it does not execute.
I tried to run as administrator and it also did not work.