Needing to restart a computer that is not accessible via Remote Desktop.
Here is a Dos Script that can help.
- Expects lone argument passed in to be computer name of host to restart
- Initiates shutdown.exe
- /r :- Restart
- /d p:0:0 :- Reason is a planned restart
- /m :- Computer that is target of restart
- /c :- Reason
- User that initiated restart and host restarted from
@echo on setlocal rem /r rem restart computer rem /d rem p = planned restart if [%1]== ( echo Please pass along computer name as first parameter echo Exiting Script goto :endofScript ) set "_usernamefull=%USERDOMAIN%\%USERNAME%" set "_computer=%1" set "_reason=Planned restart by %_usernamefull% from host %COMPUTERNAME%" shutdown.exe /r /d p:0:0 /m \\%_computer% /c "%_reason%" :endofScript endlocal
LABDB: The entered computer name is not valid or remote shutdown is not supported on the target computer. Check the name and then try again or contact your system administrator.(53)
You're about to be signed out Windows will shut down in less than a minute.