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 10 function to check, download and install updates from PowerShell.

 
 
 
 
 
(56)
19,325 times
Add To Favorites
Windows Update
4/25/2013
E-mail Twitter del.icio.us Digg Facebook
Sign in to Ask a Question


  • Is Managed = False
    2 Posts | Last Post March 28, 2013
    • Hi Michal,
      I tryed your Script, but "get-WUServiceManager" shows only Windows Update (9482f4b4-e343-43b6-b170-9a65bc822c77) with the "IsManaged"-Flag = False. How may I change the False into True?
      
      Thx in advance,
      
      regards,
      Steffen
    • Hi Steffen,
      This function allow only to get (read-only) attributs about IUpdateService interfase.
  • Hide Update
    3 Posts | Last Post March 22, 2013
    • I know I can use what you have here to filter which updates to install.  However, I would like to have a Hide-WUUpdate function.  This way I can set an update to be hidden.  Something like hide-WUUpdate -kbid kb1 kb2... 
    • http://serverfault.com/questions/145843/block-specific-windows-update-hotfix
    • Sorry such a long delay. 
      I released new function (Hide-WUUpdate) to a provisional auto-hide updates.
      It works like Get-WUList but if find updates then automatically hide it (or unhide if use switch).
  • Excluding various patches
    1 Posts | Last Post March 19, 2013
    • This is a great script - thanks! Is it possible to exclude patches based on name or type?
      
      Something like this: Get-WUInstall -AcceptAll -AutoReboot -Confirm -NotTitle Bing -NotTitle "Windows Live" -NotTitle Zune -NotTitle "Security Essentials" -NotCategory "Language packs"
  • Language
    1 Posts | Last Post March 19, 2013
    • Really nice job with this module. Question: How to have the feedback from get-wuhistory be in local language (English)? Right now it lists the KB titles in, well not sure what language. :-)
  • WUA UpdateSession::CreateUpdateDownloader Methods
    1 Posts | Last Post March 08, 2013
    • First off, great script, works very well for local Windows Update control, however I am attempting to use this module via the invoke-command method and am running into trouble. Apparently there are methods that WUA doesn't allow to be called remotely, such as UpdateSession::CreateUpdateDownloader, which cause your script to fail when being used in a remote session. I have 2 questions, first, do you know if this is something that will be available in the future? And is there a workaround that you know of to allow your script to work remotely? 
      
      Thanks again for the great script!
  • remote?
    1 Posts | Last Post March 01, 2013
    • any way to remote get-wuinstall? I see get-wulist has a -computername switch, but get-wuinstall does not. 
  • Latest version PS 3
    2 Posts | Last Post February 24, 2013
    • Is it available for Powershell version 3..... I need a tool that I could list security update from a machine..... I need history of pathes installed in machine with dll information.
    • Hi all,
      
      Try this !
      
      Copy the below contents to a notepad and save as  in ps1 format and >right click run with power shell .
      
      function Pause ($Message="Press any key to continue..."){ 
          "" 
          Write-Host $Message 
          $null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") 
      } 
       
       
      function GetCompName{ 
          $compname = Read-Host "Please enter a computer name or IP" 
          CheckHost 
      } 
       
      function CheckHost{ 
          $ping = gwmi Win32_PingStatus -filter "Address='$compname'" 
          if($ping.StatusCode -eq 0){$pcip=$ping.ProtocolAddress; GetMenu} 
          else{Pause "Host $compname down...Press any key to continue"; GetCompName} 
      } 
           
       
       
      function GetMenu { 
          Clear-Host 
          "  /----------------------\" 
          "  |     PC INFO TOOL     |" 
          "  \----------------------/" 
          "  $compname ($pcip)" 
          "" 
          "" 
          "1) PC Serial Number" 
          "2) PC Printer Info" 
          "3) Current User" 
          "4) OS Info" 
          "5) System Info" 
          "6) Add/Remove Program List" 
          "7) Process List" 
          "8) Service List" 
          "9) USB Devices" 
          "10) Uptime" 
          "11) Disk Space" 
          "12) Memory Info" 
          "13) Processor Info" 
          "14) Monitor Serial Numbers" 
          "" 
          "C) Change Computer Name" 
          "X) Exit The program" 
          "" 
          $MenuSelection = Read-Host "Enter Selection" 
          GetInfo 
      } 
       
       
      function GetInfo{ 
          Clear-Host 
          switch ($MenuSelection){ 
              1 { #PC Serial Number 
                  gwmi -computer $compname Win32_BIOS | Select-Object SerialNumber | Format-List 
                  Pause 
                  CheckHost 
                } 
                 
              2 { #PC Printer Information 
                  gwmi -computer $compname Win32_Printer | Select-Object DeviceID,DriverName, PortName | Format-List 
                  Pause 
                  CheckHost           
                } 
                 
              3 { #Current User 
                  gwmi -computer $compname Win32_ComputerSystem | Format-Table @{Expression={$_.Username};Label="Current User"} 
                  "" 
                  #May take a very long time if on 
  • Excellent
    1 Posts | Last Post January 31, 2013
  • How to pull all updates, not just microsoft ones
    2 Posts | Last Post December 17, 2012
    • Great script! This is pure gold. Now my question is, can I use to tool to pull in other installed updates to other applications besides just microsoft ones? For example like Adobe reader. Basically everything thats listed under Program and Features > Installed Updates on a Win 7 or 2008R2 server box. 
    • Hi Jeff,
      For now I support only Microsoft update, but it's good idea. 
      I suspect that not all software vendors will be able to handle it. I will try to look at this when I get some free time, but no promises.
  • How to install only important updates?
    2 Posts | Last Post November 15, 2012
    • Hi,
      
      This looks like a really useful script - thanks for writing it. 
      
      Right now I'm wondering how to install only important updates - the same ones Windows prompts me to install through the GUI. There is probably a parameter to "get-wuinstall" for this, but I haven't found the right one yet. I see there's a "Category" parameter, but I don't know what the valid categories are.
      
      Thanks,
      Richard
      
    • Hi Richard,
      
      Good question :). 
      Try use custom search criteria. Go to WU log file: C:\Windows\WindowsUpdate.log. Open it and find line with your criteria, for example I have this:
      
      Agent	  * Criteria = "IsInstalled=0 and DeploymentAction='Installation' or IsPresent=1 and DeploymentAction='Uninstallation' or IsInstalled=1 and DeploymentAction='Installation' and RebootRequired=1 or IsInstalled=0 and DeploymentAction='Uninstallation' and RebootRequired=1"
      
      Copy criteria and paste to "Criteria" param like this:
      
      Get-WUInstall -Criteria <your criteria>
      
      When I get find some free time I try add it as a standalone switch.
11 - 20 of 46 Items