sodcalculator

10 Tech How-To

Windows 10/11 Sleep Mode Shortcut: Create & Use

Guide 10-61741 · Updated · Step by step

This guide shows you how to create a desktop shortcut that puts your Windows 10 or 11 PC to sleep with a single click (or a keyboard shortcut). Instead of navigating through the Start menu or pressing a hardware button, you’ll have a convenient icon you can double-click or assign a hotkey to. No extra software is needed—just a few minutes and basic Windows tools.

What You’ll Need

  • A Windows 10 or Windows 11 PC with an active user account.
  • Administrator rights are not required for creating the shortcut, but you may need them if you choose to place it in a system folder.
  • Basic familiarity with right-clicking and dragging icons.

Step-by-Step

  1. Right-click on an empty area of your desktop. Choose New > Shortcut from the context menu.
  2. In the “Create Shortcut” wizard, type the following into the location field:
    rundll32.exe powrprof.dll,SetSuspendState 0,1,0

    Note: Copy-paste this exactly. The spaces and commas matter.

  3. Click Next. Name the shortcut something like “Sleep” or “Sleep PC”. Then click Finish. You’ll see the new shortcut on your desktop.
  4. Optional: Change the icon. Right-click the shortcut, select Properties, then the Shortcut tab. Click Change Icon. In the field, type %SystemRoot%\System32\imageres.dll and press Enter. Pick a moon or power icon from the list, then click OK twice.
  5. Optional: Assign a keyboard shortcut. In the same Properties window, click the Shortcut key field and press a combination like Ctrl + Alt + S. Click Apply and then OK. Now pressing that combo will trigger sleep from anywhere in Windows.
  6. Optional: Pin to Start or Taskbar. Right-click the shortcut and select Pin to Start or Pin to taskbar. For the taskbar, you may need to drag it there if the option isn’t available.
  7. Test it. Double-click the shortcut (or press your hotkey). Your PC should enter sleep mode immediately. Wake it by pressing a key or moving the mouse.

Common Mistakes

  • Typo in the command: A missing comma or space can cause an error or do nothing. Ensure the command is exactly rundll32.exe powrprof.dll,SetSuspendState 0,1,0.
  • Using “shutdown /h” instead: That command hibernates, not sleeps. If you want sleep, stick to the rundll32 command.
  • Shortcut key conflicts: If you choose a combo already used by another app, Windows may not trigger your shortcut. Pick something unique.
  • Placing the shortcut in a folder that requires admin: If you put it in Program Files or another protected location, you might get permission errors. Keep it on your desktop or user folder.

Tips

  • Use a keyboard shortcut for speed: Assigning a hotkey lets you sleep the PC without touching the mouse.
  • Combine with a lock: If you want to lock the screen first, create a second shortcut with rundll32.exe user32.dll,LockWorkStation and place both next to each other.
  • Make it touch-friendly: Pin the shortcut to the Start menu’s tile area for a large tap target on tablets.
  • Check your power settings: If sleep doesn’t work, ensure your power plan allows sleep. Go to Settings > System > Power & sleep (or Power on Windows 11) and verify the sleep options aren’t set to “Never”.

Troubleshooting

  • Nothing happens when I click the shortcut. Check that you typed the command exactly. Also, some systems (especially with “Fast Startup” enabled) may ignore the command if hibernation is disabled. Try running powercfg /h on in an elevated Command Prompt, then test again. If it still fails, try using shutdown /h as a fallback—it will hibernate instead of sleep, but it’s a similar low-power state.
  • My PC hibernates instead of sleeping. This can happen if your system is configured to hibernate when you press the sleep button. To force sleep, use the command rundll32.exe powrprof.dll,SetSuspendState 0,1,0 (the “0,1,0” part disables hibernation). If it still hibernates, check your power plan’s advanced settings: Control Panel > Power Options > Change plan settings > Change advanced power settings > Sleep > Hibernate after – set it to “Never”.
  • The shortcut key doesn’t work. Shortcut keys only work if the shortcut is on the desktop or in the Start menu (not in a folder). Also, some keys like “Esc” can’t be used. Try a different combination.
  • My PC wakes up immediately after sleeping. This is a separate issue. It’s often caused by a device (like a mouse) that’s allowed to wake the PC. Go to Device Manager, right-click the device, select Properties > Power Management, and uncheck “Allow this device to wake the computer”.
  • I get an error “Windows cannot find ‘rundll32.exe’”. This means the system PATH is broken. Try typing the full path: C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState 0,1,0. If that fails, run sfc /scannow in an elevated Command Prompt to repair system files.

Frequently Asked Questions

Will this shortcut work on both Windows 10 and Windows 11?

Yes, the same command works on both versions. The steps to create the shortcut are identical.

Can I make the shortcut put my PC to sleep and also lock it?

Yes, create two separate shortcuts—one for sleep and one for lock—or use a third-party tool to combine them. Windows doesn’t have a built-in single command for both.

Does this shortcut work if my PC has “Fast Startup” enabled?

Generally yes, but some users report that Fast Startup can cause the command to hibernate instead of sleep. If that happens, disable Fast Startup in Control Panel > Power Options > Choose what the power buttons do > Change settings that are currently unavailable > uncheck “Turn on fast startup”.

Can I assign a keyboard shortcut that works even when the shortcut is deleted?

No, the shortcut must exist for the hotkey to work. If you delete it, the hotkey stops working.

Is there a way to make this shortcut run as administrator?

Not needed. The sleep command doesn’t require admin rights. If you see a UAC prompt, it’s because you’ve set the shortcut to “Run as administrator” in Properties, which you should avoid.

Why does my PC wake up when I press any key?

That’s the default behavior. You can change it by going to Device Manager, expanding Keyboards, right-clicking your keyboard, selecting Properties > Power Management, and unchecking “Allow this device to wake the computer”.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →