WSUS patching automation

Yogeshwaran 6 Reputation points

How to automate windows patching using

Powershell. Once approved the patchs need

To automatically install the patches based on system time.

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,579 questions
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.
5,450 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Limitless Technology 39,506 Reputation points

    Hi Yogeshwaran,

    Windows update is the built in mechanism for update management. If this is not sufficient for your requirements, I recommend using PSWindowsUpdate which is a community module by Michal Gajda, available through the PowerShell Gallery. It includes the components to make it easy to check, download, and install quality updates on Windows 10.

    You can find extensive documentation online regarding how to use this module.

    --If the reply is helpful, please Upvote and Accept as answer--

    1 person found this answer helpful.
    0 comments No comments

  2. Rita Hu -MSFT 9,626 Reputation points

    Thanks for your posting on Q&A.

    In fact, the most common approach is to use Group Policy to assist in implementing this functionality. We could configure and apply the following group policy to achieve this goal.
    Schedule the download and installation date in the group policy:
    In Group Policy Object Editor, expand Computer Configuration, expand Administrative Templates, expand Windows Components, and then click Windows Update to find the group policy.

    In addition, the @Limitless Technology suggested method is good approach. Here is a reference link for your reference:

    As far as I know, the PowerShell Module has been included into Windows 10. So we could install it manually and run the related command to achieve the goal. Here is reference picture for you:

    Install-Module -Name PSWindowsUpdate -RequiredVersion  
    Import-Module PSWindowsUpdate  
    Get-Command -Module PSWindowsUpdate  

    Best regards,

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.