How to disable Windows 11 automatic reboots?

Anonymous
2024-02-18T11:19:20+00:00

Hi,

I have browsed this forum but found so far no real solution:

It has happened to my now several times that I was running tasks over extended periods of time only to come back to my PC the next morning to find Windows 11 had done an automatic reboot! So not only the tasks weren't finished, worse, lots of preparatory work was lost!

I don't want Windows to ever automatically reboot after an update. Never. Ever. Period. I want to be informed about updates, that's fine, and I keep Windows 11 up to date, but under no circumstances ever is it acceptable that Windows just shovels an update on my PC and disrupts overnight tasks and REBOOTS(!) my PC all by itself.

So it would be very helpful if somebody could tell me how to disable these automatic update reboots once and for all. I don't want to "pause" Updates (I absolutely want updates, I just want to control myself when the updates are done) and resetting "work hours" is of no use unless I can set it to 24 hours.

Best regards

Nick

Windows for home | Windows 11 | Windows update

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

84 answers

Sort by: Most helpful
  1. Anonymous
    2024-09-14T21:06:42+00:00

    Windows 11 Home will auto update Forever every 7 days by default .

    NOTHING can STOP it as of Sep24 :(

    Was this answer helpful?

    0 comments No comments
  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Anonymous
    2024-08-07T13:41:16+00:00

    Welcome to the club my friend. And tell Mr Gates about it

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2024-07-25T20:25:35+00:00

    These places use something called "windows update services" which integrates with networks of windows PCs and runs on windows server. It allows administrators to review the updates and approve them for release into the network. It is not something you can just run on your own pc, or on a normal windows PC on your home network.

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2024-07-10T11:20:17+00:00

    Running this as admin in powershell will create a ps1 script that cancels pending restarts (with logging), and schedule it as a task.

    Microsoft, don't be Apple. This also is not an effective way to get me to PAY for pro, if that's your game.

    Create the script to cancel pending restarts with logging

    $scriptContent = @"

    `$logPath = "C:\Scripts\CancelRestartLog.txt"

    function Log-Message {

    param([string]`$message) 
    
    `$timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss" 
    
    "`$timestamp - `$message" | Out-File -FilePath `$logPath -Append 
    

    }

    Log-Message "Script execution started"

    $restartCancelled = $false

    if (Get-ChildItem "HKLM:\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending" -EA Ignore) {

    shutdown /a 
    
    `$restartCancelled = `$true 
    

    }

    if (Get-ChildItem "HKLM:\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" -EA Ignore) {

    shutdown /a 
    
    `$restartCancelled = `$true 
    

    }

    if (Get-ItemProperty "HKLM:\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending" -EA Ignore) {

    shutdown /a 
    
    `$restartCancelled = `$true 
    

    }

    if (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" -EA Ignore) {

    shutdown /a 
    
    `$restartCancelled = `$true 
    

    }

    if (Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager" -Name PendingFileRenameOperations -EA Ignore) {

    shutdown /a 
    
    `$restartCancelled = `$true 
    

    }

    if (`$restartCancelled) {

    Log-Message "Restart cancelled successfully" 
    

    } else {

    Log-Message "No pending restart detected" 
    

    }

    Log-Message "Script execution completed"

    "@

    Save the script to a file

    $scriptPath = "C:\Scripts\CancelRestart.ps1"

    New-Item -ItemType Directory -Force -Path (Split-Path $scriptPath)

    Set-Content -Path $scriptPath -Value $scriptContent

    Create a scheduled task

    $taskAction = New-ScheduledTaskAction -Execute "PowerShell.exe" -Argument "-ExecutionPolicy Bypass -File "$scriptPath""

    $taskTrigger = New-ScheduledTaskTrigger -Once -At (Get-Date) -RepetitionInterval (New-TimeSpan -Minutes 15)

    $taskSettings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -ExecutionTimeLimit (New-TimeSpan -Minutes 5)

    $taskPrincipal = New-ScheduledTaskPrincipal -UserId "SYSTEM" -LogonType ServiceAccount -RunLevel Highest

    Register-ScheduledTask -TaskName "CancelWindowsRestart" -Action $taskAction -Trigger $taskTrigger -Settings $taskSettings -Principal $taskPrincipal -Force

    Write-Host "Script created and scheduled task set up successfully. Logs will be written to C:\Scripts\CancelRestartLog.txt"

    Was this answer helpful?

    0 comments No comments