How to Turn Off Auto Shutdown in Windows 11

To stop a Windows 11 PC from turning off on its own, first cancel any shutdown timer by running shutdown /a, then go to Start > Settings > System > Power & battery > Screen, sleep, & hibernate timeouts and lengthen the time under Make my device sleep after. Most “automatic shutdowns” are really sleep, a scheduled task, or an update restart, and each has its own fix below.

Applies to: Windows 11 (Home and Pro). Checked against Microsoft Support and Microsoft Learn on October 6, 2026.

Work out what kind of shutdown you have

Windows 11 has no single “auto shutdown” switch. Match what you see to the right section before you change anything:

What happens Likely cause Where to fix it
The screen goes dark after the PC sits idle, and it comes back with your apps still open Sleep timer Change the sleep timeout
A notice says Windows will shut down in a set number of minutes A shutdown timer started by a command, an app or an installer Cancel the timer with shutdown /a
The PC turns off at the same time every day A scheduled task Find and disable the task
The PC restarts and installs updates Windows Update Schedule the restart or set active hours
The PC turns off when you close the lid or tap the power button Lid and power button settings Change the button and lid actions
The power cuts out suddenly, with no warning and no saved work Heat, power or hardware trouble Troubleshooting section

Change the sleep timeout in Settings

This is the most common fix. Sleep is not a shutdown, but a PC that sleeps after a few minutes looks like one. Microsoft’s current defaults are short: on battery, the screen turns off and the device sleeps after 3 minutes on modern standby devices.

  1. Select Start, then select Settings. The Settings window opens.
  2. Select System, then select Power & battery. The power page opens.
  3. Select Screen, sleep, & hibernate timeouts. The section expands and shows separate timers for plugged-in and battery use.
  4. Under Make my device sleep after, open each list and choose a longer time. Pick the longest choices if you want the PC to stay awake while it is plugged in.
  5. Under Turn my screen off after, choose how long the display should stay on. The screen timer and the sleep timer are separate, so set both.
Illustration of the Windows 11 path from Start and Settings to System, Power and battery, and the Make my device sleep after timeout
Illustration: the Settings path to the sleep timeout in Windows 11.

Leave the PC idle for longer than the old timeout to confirm it stays on. For more ways to keep a PC awake, see our guide on how to stop your computer from sleeping in Windows 11.

Cancel a shutdown timer with shutdown /a

If Windows shows a notice that it is about to shut down or restart, a timer is running. You can cancel it as long as the countdown has not finished.

  1. Select Search on the taskbar, type command prompt, and select it from the results. A Command Prompt window opens.
  2. Type shutdown /a and press Enter. The /a option aborts a pending system shutdown.
  3. Watch for the notice that the scheduled shutdown was canceled. The PC now stays on.

Microsoft notes that this command must be run during the time-out period. A shutdown started without a set delay uses a default time-out of 30 seconds, so act quickly. If the timer comes back every day, something keeps starting it. Check for a scheduled task next.

Find and disable a scheduled shutdown task

A task in Task Scheduler can run the shutdown command at a set time. Someone may have created it on purpose, or an app may have added it. You can list and disable tasks from Command Prompt. You must be a member of the Administrators group to view and change all tasks on the PC.

  1. Open Command Prompt as an administrator.
  2. Type schtasks /query /fo LIST /v and press Enter. Windows prints every scheduled task with its details.
  3. Look through the list for a task whose action runs shutdown. Write down the task name exactly as shown, including any folder path in front of it.
  4. Type schtasks /change /tn “Task name” /disable, using the real name in the quotation marks, and press Enter. The task stays on the PC but no longer runs.

To undo this, run the same command with /enable in place of /disable. Only disable a task you recognize. Leave Microsoft’s own maintenance tasks alone.

Stop update restarts from interrupting you

Windows restarts to finish installing updates. Do not turn off updates to prevent this, because they include security fixes. Use the controls Microsoft provides instead:

  • Schedule the restart. Select Start > Settings > Windows Update. When a restart is pending, select Schedule the restart and choose a time that suits you.
  • Set active hours. Active hours tell Windows when you normally use the PC, so it only restarts for updates when you are not using it. Look for it in the Windows Update settings.
  • Pause updates. On the Windows Update page, select the amount of time you would like to pause for. Use this for a short stretch, such as during a deadline, not as a permanent setting.

When you are ready, restarting on your own schedule clears the pending update. Our guide on how to restart Windows 11 covers every way to do it.

Change what the power button and lid do

A laptop that turns off every time you close the lid, or a desktop that powers down when the button is bumped, is following a setting you can change in Control Panel.

  1. Select Search on the taskbar, type control panel, and select it from the results.
  2. Select System and Security.
  3. In the Power Options section, select Choose what the power buttons do.
  4. Select Change settings that are currently unavailable. This unlocks the options on the page.
  5. Open the list for When I press the power button or When I close the lid and choose Sleep in place of the shut down option. Laptops have separate On battery and Plugged in columns, so set both.
  6. Select Save changes.

Microsoft lists four possible power button actions: do nothing, sleep, hibernate and shut down. Hibernate saves your session to the drive and turns the PC off, so it can look like a shutdown. If you do not use hibernate at all, you can disable it by running powercfg /hibernate off in an administrator Command Prompt. Run powercfg /hibernate on to bring it back.

Troubleshooting

The PC still turns off suddenly

If the power cuts out with no notice and no clean shutdown, a setting is not the cause. Open Event Viewer and look in the System log for these events:

  • Event ID 1074 is logged when an application is responsible for the shutdown or restart. It points to the app or command that asked for it.
  • Event ID 41 (Kernel-Power) means the system rebooted without cleanly shutting down first. Microsoft says this can be caused by an interruption in the power supply or by a Stop error.
  • Event ID 6008 indicates that the most recent shutdown was unexpected.

For Event ID 41 with no error code, Microsoft’s guidance is to check hardware: look for overheating components, confirm the power supply has enough wattage for the installed devices, test the memory, and disable overclocking if it is turned on. On a laptop, run powercfg /batteryreport in Command Prompt to generate an HTML report of battery usage in the current folder. A badly worn battery can cut power without warning.

The PC restarts after a blue screen

Microsoft’s basic steps for unexpected restarts are to remove any new hardware, start the PC in safe mode, check Device Manager (right-click Start and select Device Manager), make sure the drive has enough free space, and install the latest updates from Start > Settings > Windows Update > Check for updates.

Options are greyed out or missing

In Control Panel, select Change settings that are currently unavailable first. If the settings are still locked, sign in with an administrator account. Some sleep states do not exist on every PC. Run powercfg /availablesleepstates to see which ones your hardware supports and why any are unavailable.

shutdown /a does not work

The command only works while a countdown is running. If no shutdown is pending, or the countdown has already finished, there is nothing to cancel.

Work or school PCs

Your organization can set power timeouts, forced restarts and maintenance windows through policy. These settings may be locked or may change back after you edit them. Ask your IT administrator instead of trying to work around them.

Frequently asked questions

Why does my Windows 11 PC shut down by itself?

The usual causes are a short sleep or hibernate timer, a shutdown timer or scheduled task, a restart for Windows Update, or the lid and power button settings. Sudden power loss with no warning points to heat, the power supply, the battery or other hardware.

Is it safe to stop my PC from sleeping?

Yes, but it uses more power. Microsoft’s shorter default timeouts are there to save energy and battery life. A good middle ground is a long timeout when plugged in and a shorter one on battery.

How do I cancel a shutdown I scheduled by mistake?

Open Command Prompt and run shutdown /a before the countdown ends. If you created a scheduled task, disable that task too, or it will run again.

Should I disable Windows Update to stop restarts?

No. Schedule the restart, set active hours, or pause updates for a short time. These keep the PC protected and still let you choose when it restarts.

How can I tell what woke or shut down my PC?

Run powercfg /lastwake to see what woke the system from its last sleep. For shutdowns and restarts, check the System log in Event Viewer for Event ID 1074, 41 or 6008.

Start with the sleep timeout and shutdown /a, since they solve most cases. Microsoft documents the timeout settings in Power settings in Windows 11 and the command options in its shutdown command reference.

Get Our Free Newsletter

How-to guides and tech deals

You may opt out at any time.
Read our Privacy Policy