The next publish will overview an in depth information in regards to the PowerShell module “PSWindowsUpdate”.
Getting Began With PowerShell and the PSWindowsUpdate Module
As described earlier, the “PSWindowsUpdate” module is designed to handle the Home windows updates together with putting in, updating, hiding, or eradicating updates.
Instance 1: Set up the “PSWindowsUpdate” Module Utilizing PowerShell
In an effort to set up the “PSWindowsUpdate” module merely execute the command beneath:
Set up–Module -Identify PSWindowsUpdate
Within the above code snippet:
First, outline the “Set up-Module” cmdlet.
After that, write the “-Identify” parameter and specify the “PSWindowsUpdate” module:
Instance 2: Import “PSWindowsUpdate” Module in PowerShell
This demonstration will assist to import the “PSWindowsUpdate” module utilizing PowerShell. For that, merely write the “Import-Module” and specify the “PSWindowsUpdate” module:
Import–Module PSWindowsUpdate
Instance 3: Get the Record of Instructions of “PSWindowsUpdate” Module
This instance will retrieve the checklist of instructions associated to the Home windows replace:
Get-Command –Module PSWindowsUpdate
In line with the above code:
First, write the “Get-Command” cmdlet.
Then, add the “-Module” parameter and specify the “PSWindowsUpdate” module:
Instance 4: Get the Home windows Replace Utilizing PowerShell
This illustration will get the out there updates by executing the talked about command:
Instance 5: Get the Record of Home windows Replace Providers
The providers associated to Home windows replace will be retrieved by executing the command talked about beneath:
Instance 6: Cover the Home windows Replace Utilizing the “Cover-WindowsUpdate” Cmdlet
Executing the road of code beneath will assist the Home windows replace to cover:
Cover–WindowsUpdate –KBArticleID KB2267602
Within the above-mentioned code:
First, write the “Cover-WindowsUpdate” cmdlet.
After that, add the “-KBArticleID” parameter and specify the replace ID:
Instance 7: Test if the Reboot is Wanted or Not
Generally after updating Home windows, it’s required to reboot the system. So, execute the given command to test whether or not it’s required to reboot Home windows or not:
Instance 8: Set up the Home windows Replace Utilizing the “Set up-WindowsUpdate” Cmdlet
In an effort to set up the Home windows replace, merely execute the below-provided line of code:
Set up–WindowsUpdate –AcceptAll
Within the above-stated code:
First, write the “Set up-WindowsUpdate” cmdlet together with the “-AcceptAll” parameter:
Instance 9: Use the “Get-WUHistory” Cmdlet to Get the Updates Historical past
To get the Home windows replace historical past, execute the beneath code:
Instance 10: Take away or Uninstall the Home windows Replace Utilizing “Take away-WindowsUpdate”
This explicit instance will uninstall the desired replace utilizing PowerShell:
Take away–WindowsUpdate –KBArticleID KB2267602
That was all about PowerShell and the “PSWindowsUpdate” module.
Conclusion
The “PSWindowsUpdate” module helps handle the Home windows replace. It installs, updates, hides, or removes Home windows updates. This module just isn’t the built-in function of Home windows. As a substitute, it’s out there within the PowerShell repository for set up. This publish has elaborated on the talked about question intimately.