Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Commit

Permalink
Merge pull request proxb#26 from Windos/Issue24
Browse files Browse the repository at this point in the history
Adjusting approval behaviour /w TargetGroups
  • Loading branch information
proxb authored Oct 18, 2016
2 parents 85ab962 + e7b40c9 commit 3c29c92
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Scripts/Get-PSWSUSUpdateApproval.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,14 @@ function Get-PSWSUSUpdateApproval {
}
Write-Verbose "Begin locating approvals"
ForEach ($patch in $patches) {
$patch.GetUpdateApprovals()
}
If ($PSBoundParameters['ComputerTargetGroups']) {
ForEach ($ComputerTargetGroup in $UpdateScope.ApprovedComputerTargetGroups) {
$patch.GetUpdateApprovals($ComputerTargetGroup)
}
} Else {
$patch.GetUpdateApprovals()
}
}
}
End {
$ErrorActionPreference = 'continue'
Expand Down

0 comments on commit 3c29c92

Please sign in to comment.