![]() |
Problem when creating batch file for shutdown multiple computers in LAN hi all, I am working as a system administrator around with 90 systems and using server 2003.all systems are windows xp I want to shutdown all 90 systems at once.it can be possible with batch file using "SHUTDOWn" command I worte the batch file using that command but it is not working My Batch file like this Shutdown -s -m \\Test1 -t 60 -c "Your systems will be shutdown within 1 minite. please save your work" Shutdown -s -m \\Test2 -t 60 -c "Your systems will be shutdown within 1 minite. please save your work" Shutdown -s -m \\Test3 -t 60 -c "Your systems will be shutdown within 1 minite. please save your work" Shutdown -s -m \\Test4 -t 60 -c "Your systems will be shutdown within 1 minite. please save your work" this is my batch file.this is not working...please help me.. Note: When i exceute the same command form command prompt it will work fine...for that i have to type that same command for 90 times to shutdown all compters. i am using another batch file..it shows like this... @Echo off cd\ Echo bunny=Program REM **************************** REM * Program Variables * REM **************************** set varcomputer=Test1 goto loop :Test1 set varcomputer=Test2 goto loop :Test2 Exit REM **************************** REM * Program * REM **************************** :loop echo Shutting down %varcomputer%. shutdown -s -m \\%varcomputer% -t 600 -c “The computer is shutting down. Please save your work.” goto %varcomputer% This is also not working.. Please any body help me....or tell me the code for do that... Thanks in Advance.. |
To shutdown shutdown -m \\IP HERE -t TIME IN SECONDS HERE -c MESSAGE HERE -s To Abort shutdown -m \\IP HERE -a I hope this will work.:icon_wink: |
I remember being able to shutdown computers with either ip addresses or like you were doing: network names. the only problems i found were setting domain names and especially that the batch file will have to be launched from an administrative account or with an account with a higher privilege level than the users of the PCs you are trying to shutdown otherwise you get a windows security 'Access is denied' error. i am however no too sure on what switches you should use. try shutdown.exe /? and take it from there. |
All times are GMT -4. The time now is 03:08 AM. |
Copyright © 2005-2013 SysChat.com