Is this possible?
I guess we would need to invoke the WUAgent somehow to run a detection, but I would like to essentially download and install updates, then reboot as part of the script.
This will be part of a larger script to basically build a vanilla 2008R2 box up to a DC all through Powershell.
Step 1: Type cmd in the search box next to Cortana, and right-click the top one, then choose Run as administrator and click Yes to continue. Step 2: Type UsoClient StartScan to check for updates. Step 3: Type UsoClient StartDownload to download updates.
The Microsoft Update feature of PowerShell allows you to get the latest PowerShell 7 updates in your traditional Microsoft Update (MU) management flow, whether that's with Windows Update for Business, WSUS, Microsoft Endpoint Configuration Manager, or the interactive MU dialog in Settings.
The latest Windows update is Windows 11, version 22H2, also known as the Windows 11 2022 Update. Also, note the following: To check for updates, select Start > Settings > Windows Update , then select Check for updates. If updates are available, you can choose to install them.
Take a look at the PSWindowsUpdate module for PowerShell.
It is located here at the Script Center
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With