question

Yogeshwaran avatar image
1 Vote"
Yogeshwaran asked RitaHu-MSFT commented

WSUS patching automation

How to automate windows patching using

Powershell. Once approved the patchs need

To automatically install the patches based on system time.

windows-serverwindows-server-powershellwindows-server-update-services
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LimitlessTechnology-2700 avatar image
1 Vote"
LimitlessTechnology-2700 answered

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--

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

RitaHu-MSFT avatar image
0 Votes"
RitaHu-MSFT answered RitaHu-MSFT commented

@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 @LimitlessTechnology-2700 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.


1.png (55.8 KiB)
3.png (379.5 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello Yogi,

It seems that there are no updates for a long time. May I know the status of the case? Please try to follow my solutions if you haven't found a useful answer right now. Perhaps it will help you out.

Looking forward to your feedback.

Have a great day.

Best regards,
Rita

0 Votes 0 ·