Skip to content

Commit

Permalink
Added 'Superseded' to gridview
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Tolley committed May 30, 2017
1 parent c45d94f commit 4a8e336
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Functions/Wsus-UpdateManager.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# VERSION DATE USER DETAILS
# 1 03/05/2017 Craig Tolley First Version
#
# 1.1 30/05/2017 Craig Tolley Added 'Superseded' information to update details
# ----------------------------------------------------------------------------------------------------------
$Global:WsusServer = $null

Expand Down Expand Up @@ -188,10 +188,14 @@ function Get-WsusUpdatesAndApprovals {
# This method was dropped as it takes around 30% longer in testing.
#$UpdateApprovals = $PossibleGroups | ForEach { $Update.GetUpdateApprovals($_) }

if ($Update.IsDeclined -eq $true) {
if ($Update.IsDeclined -eq $true -and $Update.IsSuperseded -eq $true) {
$UpdateObj.ApprovalState = "Declined (Superseded)"
}

elseif ($Update.IsDeclined -eq $true -and $Update.IsSuperseded -eq $false) {
$UpdateObj.ApprovalState = "Declined"
}

elseif ($UpdateApprovals.Count -eq 0) {
$UpdateObj.ApprovalState = "Unapproved"
}
Expand Down

0 comments on commit 4a8e336

Please sign in to comment.