• List Pending, Hidden & Installed Windows Updates PowerShell Scripts

    Home » Forums » AskWoody support » Windows » Windows – other » List Pending, Hidden & Installed Windows Updates PowerShell Scripts

    Author
    Topic
    #143012

    Not sure if this has been posted already (searched 6 pages back for PowerShell and couldn’t find)..

    I’ve just done a Clean Install of Win 7 x64 and wanted an easy way to search for Updates to hide, as well as logging which ones show up on each check, which I’ve hidden, which I’ve already installed etc, (searching in Windows is only easy for Installed ones).

    So I made some very minor modifications to this PowerShell script by Boe Prox: https://gallery.technet.microsoft.com/scriptcenter/0dbfc125-b855-4058-87ec-930268f03285

    I’ve created a pack of 3 scripts, bear in mind these include Optional updates too:
    Get-PendingUpdates.ps1 – (Excludes Hidden)
    Get-InstalledUpdates.ps1
    Get-HiddenUpdates.ps1

    Available Here (for now): https://we.tl/pTKBGdMLF2
    These work on Windows 7 x64 at least. Presumably other Windows versions too.

    Someone more inclined will likely want to host it somewhere more permanent, and also to make it a bit more user friendly, but here’s what I do:

    1. Download & Unzip the folder.
    2. Make sure .Net Framework 4 (or above) is installed. On a Clean Install of Win 7 x64 SP1 I just needed KB2901983, (.Net Framework 4.5.2).
    3. Make sure PowerShell 3.0 is installed. I had to manually google & download & install KB2506143, (Windows Management Framework 3.0).
    4. Open the unzipped folder (with the 3 .ps1 scripts) & Right-Click (in a blank area) & select Open Command Window Here.
    5. Type “PowerShell”
    6. Type: “Set-ExecutionPolicy Unrestricted” – (Remember to set this back to Restricted when finished!)
    7. To run the GetPendingUpdates script…
    8. Type: “. .\Get-PendingUpdates.ps1” – Include the double dot.
    9. Type: “Get-PendingUpdates -Computername MYCOMPUTERNAME | Export-Csv C:\PendingUpdates.csv” (Changing MYCOMPUTERNAME to your Computer Name, JerrysComp or whatever you have it set to in Control Panel > System).
    10. To run the GetInstalledUpdates Script…
    11. Type: “. .\Get-InstalledUpdates.ps1”
    12. Type: “Get-InstalledUpdates -Computername MYCOMPUTERNAME | Export-Csv C:\InstalledUpdates.csv”
    13. To run the GetHiddenUpdates Script…
    14. Type: “. .\Get-HiddenUpdates.ps1”
    15. Type: “Get-HiddenUpdates -Computername MYCOMPUTERNAME | Export-Csv C:\HiddenUpdates.csv”
    16. Wait for it to finish (when the Command Prompt is ready for new input).
    17. The Update Lists will be in your C: drive as .csv files.
    18. When finished exporting your lists, Type: “”Set-ExecutionPolicy Restricted”

    The contents don’t seem to be 100% accurate, but should be close enough.

    The Pending script was missing 1 update, (not sure exactly which yet since I have 188 Pending heh, I’ll try see if I can spot it later), and the Installed script listed a few I don’t have installed yet, (Update for Microsoft Visual Studio Team Foundation Server 2013 (KB2989279) was one of them, which I definitely don’t have on this clean install, maybe it’s picking it up from my old OS installation on a different Drive?).

    Hope it’s useful. I made myself a lil Excel macro to loop through the rows and flag any that appear on my list to Hide. Made it a lot faster than looking by eye.

    I’m going to try and save lists of what’s Pending / Hidden / Installed at each stage of my clean install, hopefully it will help those of you who are curious about which show for what users at different stages of a clean install of Win 7.

    satrow EDIT: attempted to clean up download link.

    Viewing 3 reply threads
    Author
    Replies
    • #143013

      The DevOps Lounge is our PowerShell topic. There is also a topic especially for Managing Updates in Organizations (which hasn’t been used yet, possibly due to a broken link).
      🙂

    • #143161

      Ah-ha I see. And yeah it says No Topics and doesn’t even let me view that section lol.

      I can see why the average home user wouldn’t see or go in that section at all though, especially with it being focused around pushing updates to organisations.

      Fortunately this one was easy enough just to whip up at home.

      Have attached a screenshot of example output.

    • #143175

      Perhaps also of interest: Windows Update PowerShell Module.

    • #143242

      Thanks!

      And there we go. I had a list of problematic Updates to Avoid by @GoneToPlaid in a spreadsheet, so I added the 3 CSV file outputs from the script in as external data sources on separate sheets.
      I then whipped up some conditional formatting to highlight any that are in the avoidance list.

      Therefore now every time I do an update check, I simply export the Pending CSV, Refresh it in the sheet, and scan through looking for any highlighted dodgy ones, which I then hide in WU.

      Saves having to manually cross reference each and every update of those ~200 that need installing when starting from scratch.

      Let me know if anyone wants it and I’ll upload it somewhere.

    Viewing 3 reply threads
    Reply To: Reply #143161 in List Pending, Hidden & Installed Windows Updates PowerShell Scripts

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information:




    Cancel