Windows Update PowerShell Module

This function is a piece of PSWindowsUpdate module to manage Windows Update on a computer system running Windows. Whole module contain set of functions to check, download and install updates from PowerShell.

 
 
 
 
 
(102)
51,233 times
Add to favorites
Windows Update
12/24/2013
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Licensing PSWindowsUpdate
    1 Posts | Last post February 28, 2014
    • Hi Michal,
      
      We love this library and are considering make use of it in some software of our own.  Have you considered releasing it under a well known Open Source license like GPL?
      
      Best wishes,
      
      Simon
      
  • Error 0x80240022e on Win XP SP3
    2 Posts | Last post February 26, 2014
    • Hi,
      
      I'm running Windows XP SP3 and logged in with admin, running Get-WuInstall, so everything works fine. But when a user logged in and running powershell as admin with command Get-WuInstall, I get Error 0x80240022e in ReportingEvents.log and it seems to be a permission problem.
      In the WindowsUpdate.log it looks like the command Get-WuInstall runs with user rights.
      
      What I'm doing wrong?
    • If I make the user to an admin and run powershell as user "administrator" it also works fine.
  • Async Download possible?
    1 Posts | Last post February 21, 2014
    • Hi.
      
      Would it be possible to have the updates downloaded in async mode from WSUS to speed things up? 
      
      Now we are patching our OSdeployments in SCCM Task Sequence with a script that downloads the patches one at a time but this takes hours and it is the downloadprocess that takes time. If we could download multiple patches at the same time we could speed up things. According to this link it is a supported method, but I don't seem to get it working in powershell(i am a noob).
      
      http://msdn.microsoft.com/en-us/library/aa386132(v=vs.85).aspx
      
      "Starts an asynchronous download of the content files that are associated with the updates."
      
      Thanks!
  • -autoreboot often does not seem to reboot a node on its own
    1 Posts | Last post February 14, 2014
    • Hi: 
      
      I am currently using this module to updates several machines. I notice that (even with "-Force" added  in Get-WUInstall.ps1   in latest version) some nodes do not reboot on their own and wait for a user confirmation. This keeps them from finishing their update cycle and requires manual intervention. 
      
      Is there a way to get reliable reboots upon reaching proper stage in Get-WUInstall? I am using
      
      get-wuinstall -serviceid ....... -acceptall -autoreboot -verbose.
      
      Does anyone else experience this failure to reboot automatically?
      
      Thanks.
      
      Gautam
      
  • Add -IsDownloaded option
    1 Posts | Last post February 12, 2014
    • Is there a way we can filter updates by more than just hidden status? I would like to only apply updates that have already been downloaded.
      
      Thanks
  • Windows Update Agent latest version
    1 Posts | Last post January 21, 2014
    • Hello and thank you for this excellent module. I am using it when creating images for deployment giving me the opportunity to exclude specific updates. My problem is that I still will have to manually launch the Windows Update GUI to bring the Windows Update Agent to the latest version (7.6.7600.256 for Windows 7) before capturing the image. Is there any possibility of a command to update the WUA to the latest version? Maybe there is already but I can’t seem to find it. Thank you in advance!
  • Register Microsoft Update
    4 Posts | Last post January 18, 2014
    • For completeness please consider a new function Add-WUServiceManager that implements the following to register the Microsoft Update provider:
      
      http://msdn.microsoft.com/en-us/library/aa826676(VS.85).aspx
      
      It should be simple to do and will probably help a lot of people out!
      
      Thanks for the great module.
    • Hi,
      Sorry for such a long delay, but I'm terribly busy. 
      I added two new functions: Add-WUServiceManager and Remove-WUServiceManager. It should works like you need.
    • Thanks for this.  I'm still testing this and I'll give you an update but so far it doesn't look like the Add-WUServiceManager -ServiceID '7971f918-a847-4430-9279-4a52d1efe18d' function is registering Microsoft Update the same way that it does if you accept Microsoft Update through the GUI.  I'll try to test soon and find out if the function is really working or if there is some other change that needs to be made.
    • Okay, so my original command above was missing the AddServiceFlag parameter which is needed if you want to see Microsoft Update registered in the Windows Update GUI.  This does the trick:
      
      Add-WUServiceManager -ServiceID '7971f918-a847-4430-9279-4a52d1efe18d' -AddServiceFlag 7
  • Unblock-File
    2 Posts | Last post January 17, 2014
    • There may be a minor compatibility issue on Windows Server 2008 R2 SP1 (vanilla, no updates) under PowerShell 2.0.  I'm running into this error during my initial configuration script.  Unblock-File may be a cmdlet that is not available on a pristine copy (since it appears to be available on my production 2008 R2 systems).
      
      A tiny bit of error handling to sweep the problem under the rug might be in order.
      
      As always thanks again for a tremendously valuable PowerShell module.
      
      ---
      
      The term 'Unblock-File' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the p
      ath is correct and try again.
      At E:\Modules\PSWindowsUpdate\PSWindowsUpdate.psm1:1 char:49
      + Get-ChildItem -Path $PSScriptRoot | Unblock-File <<<< 
          + CategoryInfo          : ObjectNotFound: (Unblock-File:String) [], CommandNotFoundException
          + FullyQualifiedErrorId : CommandNotFoundException
      
      
    • If anyone else is running into this issue here is a little code snipped that might help you work around the problem:
      
          If (@(Get-Command Unblock-File*).Count -Eq 0)
          {
              Function Unblock-File {}
          }
      
          Import-Module "C:\Modules\PSWindowsUpdate"
      
  • Server Core 2012 R2
    2 Posts | Last post January 17, 2014
    • Michal,
      
      We are using 1.4.5 scripts on non-domain Windows Server CORE 2012 R2 VM (Hyper-V Server 2012 R2 host in DMZ), minimal rolls & features, used for IIS Web server.
      
      So far, no problems to report.
      
      Thanks for the scripts - it would have been a painful task updating without them,
      -- Bill --
    • Agreed! Thank you so much for this!
  • Disregard my prior ipmo question
    1 Posts | Last post January 15, 2014
    • After looking at the error message a little closer, I see that I had an errant folder in the path where the module resides in my doc path.
      
      Thanks! 
11 - 20 of 102 Items