We have several Active Directory domains with a server outside of the domain in it’s own workgroup – typically a Hyper-V Host. The Hyper-V hosts use different credentials for the administrator account then what the domain account uses. Recently, one of our 2012 Hyper-V Servers decided to stop responding to remote desktop and several remote control programs we have on it so we needed to do a reboot – REMOTELY 🙂
The following was performed via a site-to-site VPN setup where we had access to the local lan of the troublesome server.
First, we must connect to the hyper-v host servers IPC$ and authenticate before running our command, otherwise we will receive a “Access is denied. (5)” error.
Lets make a connection and authenticate by running the following command against the Hyper-V host:
For a workgroup, please issue the following command:
NET USE \\ServerName\IPC$ /USER:USERNAME PASSWORD
If the server is in a different domain, please issue the following command:
NET USE \\ServerName\IPC$ /USER:DOMAIN\USERNAME PASSWORD
If successful, we should receive the following result back on screen”command completed successfully”. If you receive another message, please double check your credentials and try again.
Now we are now ready to run the reboot command in the same window:
shutdown /r /t 5 /m \\ServerName
Note the /r switch – this is for reboot. /s would power the server off. For a list of prefixes, try shutdown /?
Wait a few seconds and and you should get confirmation from your prompt which tells you that the command was sent successfully. You now have authenticated and sent the shutdown command to a remote server using a different set of credentials.
Leave A Comment