title: How to filter WSUS superceded updates using UpdateScope filtering
body: <p>I'm creating a simple powershell script that reports missing updates for a certain compmputer, but although I've used some scope filtering in my report superceded updates are still appearing.</p>
  
  <p>Why 'LatestRevisionApprovedUpdates' filter doesn't have any effect with the superceded updates?</p>
  
  <pre><code>$updatescope = New-Object Microsoft.UpdateServices.Administration.UpdateScope
   $updateScope.ApprovedStates = [Microsoft.UpdateServices.Administration.ApprovedStates]::LatestRevisionApproved  # Includes updates whose latest revision is approved.
   $updateScope.UpdateApprovalActions = [Microsoft.UpdateServices.Administration.UpdateApprovalActions]::Install
   $updateScope.UpdateSources = [Microsoft.UpdateServices.Administration.UpdateSources]::MicrosoftUpdate;
   # $updatescope.IncludedInstallationStates=@('NotInstalled','Downloaded','Failed','InstalledPendingReboot')
   $updatescope.ExcludedInstallationStates=@('NotApplicable','Installed')
   $updatescope.ToCreationDate = (get-date).AddDays(-$days)
  
  
  $mycomputer=$wsus.GetComputerTargetbyName($computername) 
  
  $updatelist = $mycomputer.GetUpdateInstallationInfoPerUpdate($updateScope) 
  
    foreach ($update in $updatelist ) {
          $updateinfo=$update.Getupdate()
             [pscustomobject][Ordered]@{
              Status=$update.UpdateInstallationState
              Approval=$update.UpdateApprovalAction
              ArrivalDate=get-date $updateinfo.ArrivalDate -format dd-MMM-yyyy
              ApprovalTargetGroup=$update.GetUpdateApprovalTargetGroup().name
              Approved=$updateinfo.isapproved
              KB=$updateinfo | %{$_.KnowledgebaseArticles -join ","}
              SuperSeded=$updateinfo.IsSuperseded
              Declined=$updateinfo.IsDeclined
              Title=$updateinfo.title
            }
  
        }
  </code></pre>
  
  <p>In my report I already have listed 'Superceded' Updates. And I'd like to see these updates that will be installed on the target computer. 
  I may add some extra filter with some "where $_.Superceded" or similar, but I'd like to understand why it doesn't work with the :LatestRevisionApproved  that I've applied on the Scope filtering?</p>
  
  <p>This is a sample of a current output, what I expect is don't have SuperSeded on this list.</p>
  
  <pre><code>  Status     Approval ArrivalDate Approved  KB      SuperSeded Declined
    ------     -------- ----------- --------  --      ---------- --------
  NotInstalled  Install 11-Dec-2018     True 4471983      False    False
  NotInstalled  Install 11-Dec-2018     True 4471989       True    False
  NotInstalled  Install 12-Dec-2018     True 4471320       True    False
  NotInstalled  Install 12-Dec-2018     True 4471322      False    False
  NotInstalled  Install 12-Dec-2018     True 4470199       True    False
  NotInstalled  Install 20-Dec-2018     True 4483187       True    False
  Downloaded    Install 09-Jan-2019     True 4481484      False    False
  Downloaded    Install 09-Jan-2019     True 4480964      False    False
  Downloaded    Install 09-Jan-2019     True 4480963      False    False
  Downloaded    Install 09-Jan-2019     True 4481485      False    False
  Downloaded    Install 09-Jan-2019     True 4480965      False    False
  Downloaded    Install 10-Jan-2019     True 4470499      False    False
  Downloaded    Install 10-Jan-2019     True 4470602      False    False
  </code></pre>