Powershell PSWindowsUpdate

Powershell PSWindowsUpdate Module

PSWindowsUpdate is a PowerShell module that allows you to manage Windows updates on your local and remote computers.
With this module, you can easily check for available updates, download and install them, and even configure update settings. In this blog post, we’ll take a closer look at PSWindowsUpdate and how you can use it to manage Windows updates more efficiently.

Getting started with PSWindowsUpdate

The first step in using PSWindowsUpdate is to install the module. You can do this by running the following PowerShell command:

1
Install-Module PSWindowsUpdate

Once the module is installed, you can use the following cmdlets to manage Windows updates:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Alias           Clear-WUJob                                        2.2.0.3    PSwindowsupdate
Alias           Download-WindowsUpdate                             2.2.0.3    PSwindowsupdate
Alias           Get-WUInstall                                      2.2.0.3    PSwindowsupdate
Alias           Get-WUList                                         2.2.0.3    PSwindowsupdate
Alias           Hide-WindowsUpdate                                 2.2.0.3    PSwindowsupdate
Alias           Install-WindowsUpdate                              2.2.0.3    PSwindowsupdate
Alias           Show-WindowsUpdate                                 2.2.0.3    PSwindowsupdate
Alias           UnHide-WindowsUpdate                               2.2.0.3    PSwindowsupdate
Alias           Uninstall-WindowsUpdate                            2.2.0.3    PSwindowsupdate
Cmdlet          Add-WUServiceManager                               2.2.0.3    PSwindowsupdate
Cmdlet          Enable-WURemoting                                  2.2.0.3    PSwindowsupdate
Cmdlet          Get-WindowsUpdate                                  2.2.0.3    PSwindowsupdate
Cmdlet          Get-WUApiVersion                                   2.2.0.3    PSwindowsupdate
Cmdlet          Get-WUHistory                                      2.2.0.3    PSwindowsupdate
Cmdlet          Get-WUInstallerStatus                              2.2.0.3    PSwindowsupdate
Cmdlet          Get-WUJob                                          2.2.0.3    PSwindowsupdate
Cmdlet          Get-WULastResults                                  2.2.0.3    PSwindowsupdate
Cmdlet          Get-WUOfflineMSU                                   2.2.0.3    PSwindowsupdate
Cmdlet          Get-WURebootStatus                                 2.2.0.3    PSwindowsupdate
Cmdlet          Get-WUServiceManager                               2.2.0.3    PSwindowsupdate
Cmdlet          Get-WUSettings                                     2.2.0.3    PSwindowsupdate
Cmdlet          Invoke-WUJob                                       2.2.0.3    PSwindowsupdate
Cmdlet          Remove-WindowsUpdate                               2.2.0.3    PSwindowsupdate
Cmdlet          Remove-WUServiceManager                            2.2.0.3    PSwindowsupdate
Cmdlet          Reset-WUComponents                                 2.2.0.3    PSwindowsupdate
Cmdlet          Set-PSWUSettings                                   2.2.0.3    PSwindowsupdate
Cmdlet          Set-WUSettings                                     2.2.0.3    PSwindowsupdate
Cmdlet          Update-WUModule                                    2.2.0.3    PSwindowsupdate
  1. Get-WindowsUpdate

The Get-WindowsUpdate cmdlet allows you to check for available updates on your local or remote computers. By default, this cmdlet only lists important and security updates. However, you can use the -All switch to list all available updates. Here’s an example:

1
Get-WindowsUpdate -ComputerName <ComputerName> -All
  1. Install-WindowsUpdate

The Install-WindowsUpdate cmdlet allows you to download and install available updates on your local or remote computers. By default, this cmdlet only installs important and security updates. However, you can use the -AcceptAll switch to install all available updates. Here’s an example:

1
Install-WindowsUpdate -ComputerName <ComputerName> -AcceptAll
  1. Get-WUServiceManager

The Get-WUServiceManager cmdlet allows you to view and configure Windows Update settings. By default, this cmdlet lists the Windows Update service and its status. However, you can use the following cmdlets to configure update settings:

  • Set-WUServiceManager -ConfigDownloadMode: allows you to configure the download mode for updates (such as automatic or manual).

  • Set-WUServiceManager -ConfigAutoUpdate: allows you to enable or disable automatic updates.

Here’s an example:

1
2
3
Get-WUServiceManager -ComputerName <ComputerName>
Set-WUServiceManager -ComputerName <ComputerName> -ConfigDownloadMode Manual
Set-WUServiceManager -ComputerName <ComputerName> -ConfigAutoUpdate Disabled

Conclusion

PSWindowsUpdate is a powerful tool that allows you to manage Windows updates more efficiently. With this module, you can easily check for available updates, download and install them, and even configure update settings. By using PowerShell commands, you can automate update management and save time and effort. If you’re responsible for managing updates on your local or remote computers, PSWindowsUpdate is definitely worth exploring.

0%