How to schedule automatic shutdown in Win 11 – Powershell

Configurare noua (How To)

Situatie

If you prefer PowerShell over Command Prompt, you can use a cmdlet in this utility to shut down your PC. To do that, access Windows Search, type PowerShell, and select “Run as Administrator.” Select “Yes” in the User Account Control prompt.

On the PowerShell window, type the following cmdlet. Here, replace “seconds” until the shutdown time. Then, press Enter.

Start-Sleep -Seconds seconds; Stop-Computer

For example, to shut down your PC in five minutes, run the following cmdlet:

Start-Sleep -Seconds 300; Stop-Computer
The cmdlet to schedule the shutdown of the PC typed in PowerShell.

To cancel a scheduled shutdown, run the following cmdlet:

shutdown /a

Solutie

Tip solutie

Permanent

Voteaza

(3 din 6 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?