вторник, 25 августа 2026 г.

How to force Windows reboot from remote CLI

Sometimes you meet a situation when remote Windows is completely frozen, so you can't even start RDP session. But if you can open console session via SSH, it's possible to reboot the computer remotely.

Try use the following commands:

  • powershell -Command "Get-WmiObject Win32_Process -Filter \"name='winlogon.exe'\" | ForEach-Object { $_.Terminate() }"
  • powershell -Command "Get-CimInstance Win32_Process -Filter \"name='winlogon.exe'\" | Invoke-CimMethod -MethodName Terminate"
  • powershell -Command "(Get-WmiObject Win32_Process -Filter \"name='wininit.exe'\").Terminate()"
     

Комментариев нет:

Отправить комментарий