Controlling Windows Update Using PowerShell

Controlling Windows Update Using PowerShell

Using PowerShell to manage Windows Updates on computers follows along the old "even if you could, should you?" adage. From a techie's perspective that answer is always a resounding "Yes!" In the movies, though, repercussions are always unexpected, usually dreadful, and most times hilarious.

Strap a bra on your head and create a woman using a computer? Of course. What could go wrong?

There are an overabundance of ways for managing updates on Windows computers. Microsoft System Center Configuration Manager, WSUS, GPO, and 3rd party vendors round out a pretty full stable of options. But, for PowerShell geeks these methods are boring.

Michael Gajda, Microsoft MVP, has developed a Windows Update PowerShell Module that can be used to manage the Windows Update service running on client and server computers. Using the module, you can check, download, install, or remove updates.

The module is up to version 1.5.1 and contains the following PowerShell functions:

  • Add-WUOfflineSync
  • Add-WUServiceManager
  • Get-WUHistory
  • Get-WUInstall
  • Get-WUInstallerStatus
  • Get-WUList
  • Hide-WUUpdate
  • Invoke-WUInstall
  • Get-WURebootStatus
  • Get-WUServiceManager
  • Get-WUUninstall
  • Remove-WUOfflineSync
  • Remove-WUServiceManager 
  • Update-WUModule 

You can download the module from the Microsoft Script Gallery: Windows Update PowerShell Module

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish