FG
💻 Software

How can I put the computer to sleep from Command Prompt/Run menu?

Fresh5 days ago
Mar 15, 2026714190 views
Confidence Score1%
1%

Problem

I know that almost everything on Windows, like opening any sort of application, can be done from the command prompt or from the Run menu. How can I put my computer to sleep or shut it down? What is the command for that?

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How can I put the computer to sleep from Command Prompt/Run menu?

Low Risk

You will find to be your friend. Other handy commands see this post: Sleep Computer (read more at https://superuser.com/a/463652/249349 ) Lock Workstation Hibernate Computer - see answers by Scott Chamberlain and Eric L. Restart Computer Shutdown Computer EDIT/UPDATE: It seems that sleeping a computer is problematic if hibernate is turned on. Copying from other answers: You can either try PsShutdown or: The command rundll32.exe powrprof.dll,SetSuspendState 0,1,0 for sleep is correct - however, …

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment