locked
Filtering Microsoft.Update.Session by MsrcSeverity RRS feed

  • Question

  • I have the below script that aims to get a list of installed updates that have a MSRC Severity Rating.

    $updateSession = new-object -com "Microsoft.Update.Session"

    $allupdates = $updateSession.CreateupdateSearcher().Search("IsInstalled=1").Updates

    $updates = $allupdates | Where-Object { $_.MsrcSeverity -gt 1 }


    foreach($entry in $updates) {   

    $entry

    }

    However I'm finding that the Monthly Cumulative Updates for Windows are not appearing in the list. If I don't filter by the MsrcSeverity I can locate them, however they have nothing next to the Severity field (example below)

    LastDeploymentChangeTime        : 10/07/2018 12:00:00 AM
    MaxDownloadSize                 : 92270188565
    MinDownloadSize                 : 0
    MoreInfoUrls                    : System.__ComObject
    MsrcSeverity                    : 
    RecommendedCpuSpeed             : 0
    RecommendedHardDiskSpace        : 0
    RecommendedMemory               : 0
    If I look at the Microsoft Update Catalog they do record the Severity (per below)

    Am I missing something, or is the Microsoft.Update.Session just not responding with the correct info?

    Wednesday, July 11, 2018 9:49 AM

Answers

  • Thanks, so from that it looks like the Microsoft.Update.Session just doesn't have the correct MsrcSeverity rating for the cumulative updates.
    • Edited by altonius_au Wednesday, July 11, 2018 10:56 AM
    • Marked as answer by altonius_au Thursday, July 12, 2018 10:33 AM
    Wednesday, July 11, 2018 10:56 AM

All replies

  • $allupdates | Where-Object { $_.MsrcSeverity -match 'Critical|Important' -or -not $_.MsrcSeverity }|select MsrcSeverity,title

    \_(ツ)_/



    • Edited by jrv Wednesday, July 11, 2018 10:21 AM
    Wednesday, July 11, 2018 10:19 AM
  • Thanks, so from that it looks like the Microsoft.Update.Session just doesn't have the correct MsrcSeverity rating for the cumulative updates.
    • Edited by altonius_au Wednesday, July 11, 2018 10:56 AM
    • Marked as answer by altonius_au Thursday, July 12, 2018 10:33 AM
    Wednesday, July 11, 2018 10:56 AM