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.

 
 
 
 
 
(164)
116,942 times
Add to favorites
Windows Update
12/18/2014
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • List of Categories?
    5 Posts | Last post January 05, 2015
    • Where can I find a list of all the acceptable values for "Category" and "NotCategory"?
      
      I see a partial list in Get-WUList.ps1 and the examples, but I'd like to see a full list of all categories. 
      
      Thanks. 
    • Hi,
      You can get category names for the available updates for example using:
      Get-WUList | Select KB, @{e={($_.Categories | Select -exp Name) -join ", "};l="Categories"}
      
      I know it's not very pretty, but quickly it should help.
    • Thank you for the quick response. What I'm looking for, though, is a list of all the possible values that "category" could be. Right now, when I run the command that you provided, all I see are Language Packs. However, next month there will be others. Where can I find a complete list of categories for MS Updates?
      
      Thanks. 
    • I don't know. I searched the MSDN library but never see the full list of categories.
    • This one:
      http://msdn.microsoft.com/en-us/library/ff357803%28v=vs.85%29.aspx
      
      and this one:
      http://support.microsoft.com/kb/824684
  • Get-WURebootStatus -Silent does not handle multiple -ComputerName(s)
    1 Posts | Last post December 19, 2014
    • Hello,
      
      I propose a change to this function where -Silent is used with multiple computers.
      
      Switch($RebootRequired)
      {
         $true
         {
            If($Silent)
            {
               Return $true
            }
      ...
      becomes
      ...
         If($Silent)
         {
            Write-Output "Reboot required for $($Computer)"
         }
      ...
      
      Same goes for the $false side of that Switch.
      
      Cheers,
      Kerry
      
      BTW, thanks for all of the work you've done with this.
      
  • Requirements for Remoting
    3 Posts | Last post December 15, 2014
    • What does the remote computer need for Get-WUList to work?  Many but not all of my machines return this: 
      Exception calling "CreateInstance" with "1" argument(s): "Retrieving the COM class factory for remote component with CLSID {4CB43D7F-7EEE-4906-8698-60DA1C38F2FE} from machine SERVER1 failed due to the following error: 800706ba SERVER1."
      I'm using PowerShell 5 on Windows 8.1.  I have tried running as administrator or not.  I have tried many versions of Windows on the remote computers. 
    • You haven't included the line you're executing. Get-WUList doesn't have a -computername parameter, so what makes you think it will work against a remote computer? Are you wrapping this in Invoke-Command?
    • No, I am using Get-WUList -computerName Server1.  I see now that computers with the Windows Firewall off will work.  I don't want to turn off the firewall just to use this module.  So what are the port/firewall requirements for running the Get-WUList and others in this module?
  • Get-WUInstall Not Connecting
    2 Posts | Last post December 12, 2014
    • This is what I am seeing when I try run the WUInstall command.  It just says "Connecting to windows update server..." then ends.  Below are the services running.  Any suggestions?
      
      PS C:\Users\Administrator> Get-WUInstall -verbose
      VERBOSE: Connecting to Windows Update server. Please wait...
      
      PS C:\Users\Administrator> Get-WUServiceManager
      
      ServiceID                            IsManaged IsDefault Name                                     
      ---------                            --------- --------- ----                                     
      117cab2d-82b1-4b5a-a08c-4d62dbee7782 False     False     Windows Store                            
      9482f4b4-e343-43b6-b170-9a65bc822c77 False     True      Windows Update  
    • This is on a VM Running Win 8.1 Pro 64 bit.
  • Trying to download PSWindowsUpdate.zip
    1 Posts | Last post December 10, 2014
    • I have followed the steps but when I tryed to unzip it . the system could not find a directory or create it. Could someone help out please!!!  Thanks!!!
  • Get-WUList with -Microsoft parameter throws out warning message
    2 Posts | Last post December 05, 2014
    • Hi,
      I'm trying to run the command Get-WUList -MicrosoftUpdate -Computername 
      It gives a warning message
      
      WARNING: Can't find registered service Microsoft Update. Use Get-WUServiceManager to get registered service.
      
      Get-WUServiceManager shows the following so Microsoft Update is registered on the remote computer
      
      IsManaged IsDefault Name
      --------- --------- ----
      False     False     Windows Update
      False     True      Microsoft Update
      
      Would do I need to do for the command to run successfully using the -Microsoft switch ? It does run fine with the WindowsUpdate switch but this does not always list all the outstanding patches. 
      
      Many Thanks !
       
      
      
    • I should have mentioned I'm trying to do this to a remote machine on the same network
  • Running remotely using invoke-command
    2 Posts | Last post December 05, 2014
    • Hi,
      
      Installed PSWindowsUpdate module on a remote server. Ran the following on my management computer (as user with local admin permissions on server)
      
      Invoke-Command -ComputerName me1 -ScriptBlock {Get-WUInstall -AcceptAll -AutoReboot}
      
      returns:
      Exception calling "CreateUpdateDownloader" with "0" argument(s): "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"
      + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
      + FullyQualifiedErrorId : ComMethodTargetInvocation
      + PSComputerName : me1
      
      The property 'Updates' cannot be found on this object. Verify that the property exists and can be set.
      + CategoryInfo : InvalidOperation: (:) [], RuntimeException
      + FullyQualifiedErrorId : PropertyNotFound
      + PSComputerName : me1
      
      I certainly do have permissions. What gives the error?
    • I wasn't able to Invoke any Windows Update commands successfully, seems to be a Windows limitation. Instead I used psexec to get around this:
      
      psexec \\ServerName -s C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -c Get-WUInstall ...
      
      It seems the -s to run it as System is necessary to get around the security issues.
  • Running remotely
    1 Posts | Last post November 26, 2014
    • I see a few days ago rpseekell asked about this but the thread went cold.
      I am trying to execute this on remote systems, I have installed the module on the remote system and have tried to execute "Get-WUInstall -WindowsUpdate -AcceptAll -Verbose" both in a PSSession and also with Invoke-Command. In both instances I get an error which seems to indicate this is not possible: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe : Exception calling "CreateUpdateDownloader" with "0"
      argument(s): "Access is denied. (Exception from HRESULT:
          + CategoryInfo          : NotSpecified: (Exception calli... from HRESULT: :String) [], RemoteException
          + FullyQualifiedErrorId : NativeCommandError
      
      0x80070005 (E_ACCESSDENIED))"
      At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSWindowsUpdate\Get-WUInstall.ps1:807 char:5
      +                 $Downloader = $objSession.CreateUpdateDownloader()
      +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
          + FullyQualifiedErrorId : ComMethodTargetInvocation
      
      Property 'Updates' cannot be found on this object; make sure it exists and is settable.
      At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSWindowsUpdate\Get-WUInstall.ps1:808 char:5
      +                 $Downloader.Updates = $objCollectionTmp
      +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
          + FullyQualifiedErrorId : PropertyNotFound
      
      My local PS prompt is being run with elevated privileges so this looks almost like the UAC token is not being correctly honoured.
      
      Am I missing something here? Is there a way to make this work so I can remotely kick off Get-WUInstall?
      
      Thanks 
  • Offline image support?
    1 Posts | Last post November 18, 2014
    • Does this support patching offline images?  
  • Can you add a silent switch?
    1 Posts | Last post November 14, 2014
    • Even with -Confirm:$false many of the updates still pop-up a UI (Microsoft Security Essentials for example).  It would be good if there was a way to launch the updates in a true silent mode so that we don't have to perform any physical interaction with the box.
      
      If for some reason there's not a standard way to do it, and it's different for every update, that's fine too, but I'd like it if we could at least pass parameters to them (and you could leave it as an exercise to us to figure out which updates require which parameters to make them silent...).
11 - 20 of 136 Items