Remote Reboot
September 22, 2022
How to remotely restart a Windows computer. (Perhaps it is up but unresponsive in GUI or Remote Desktop.)
Open a VDI or logon to another machine. From powershell install Scoop, use Scoop to install SysInternals utils, use Ps tools to check status of machine and reboot it, watch status, verify up, and then connect with Remote Desktop. The Git credential and 7-zip context menu parts are optional.
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
irm get.scoop.sh | iex
scoop install git
git config --global credential.helper manager-core
$env:userprofile\scoop\apps\7zip\current\install-context.reg
Scoop bucket add extras
Scoop install sysinternalsVerify Windows is running and responding at least a bit. Get some info to help verify it's right machine:
$env:remote = 'ENV-Ynnnnnn'
Psinfo \\$env:remoteReboot with force close applications:
Psshutdown -rf \\$env:remoteWatch network status for coming back up. Ping should get a a couple dozen replies, then time out for awhile, and then start replying again:
Ping -t $env:remoteBreak (ctrl-c), check status, connect with Remote desktop:
Psinfo \\$env:remote
mstsc -v:$env:remote