WSUS patching automation

Yogeshwaran 6 Reputation points
2022-05-04T04:47:26.83+00:00

How to automate windows patching using

Powershell. Once approved the patchs need

To automatically install the patches based on system time.

Windows for business Windows Server User experience PowerShell
Windows for business Windows Server User experience Other
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Limitless Technology 39,916 Reputation points
    2022-05-05T07:37:11.4+00:00

    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,661 Reputation points
    2022-05-06T02:22:24.8+00:00

    @Yogeshwaran
    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:
    199393-1.png
    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:
    https://www.powershellgallery.com/packages/PSWindowsUpdate/2.2.0.2

    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:
    199328-3.png

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

    Best regards,
    Rita


    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.