Pausing windows update using powershell

Spindler, Yosef Yaaqov 0 Reputation points


I am trying to remotely pause windows update using a powershell script.

I have tried installing PSWindowsUpdate module on the remote PC and then running: Set-WindowsUpdateAutoUpdateOption -AutoUpdateOption 2

This didnt work and i am getting that Set-WindowsUpdateAutoUpdateOption is missing.

Then i tried setting this reg key HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\NoAutoUpdate to 1.

However, after a restart the settings UI still shows like windowsupdate is not paused.

What is the right method to pause windows upadate through a PS1 script?


Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
4,888 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 25,991 Reputation points


    Thank you for your question and for reaching out with your question today.

    Please see the script example below for how to disable Windows Update:

    set the Windows Update service to "disabled"

    sc.exe config wuauserv start=disabled

    display the status of the service

    sc.exe query wuauserv

    stop the service

    sc.exe stop wuauserv

    If the reply was helpful, please don’t forget to upvote or accept as answer.

  2. Spindler, Yosef Yaaqov 0 Reputation points


    This disables and stops the windows update service. but when i open windows update setting page i can still see windows updates are not paused.

    I need to pause windows update so it wont try to update the PC.


    0 comments No comments