Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Check for policies with all links disabled.

  • Loading branch information...
commit 099a0393bcd6d3048837cf9fa5200a557f591832 1 parent baf1308
@wanion authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 Get-GPAudit.ps1
View
8 Get-GPAudit.ps1
@@ -81,6 +81,14 @@ function Get-GPAudit {
$gpsummary.Notes += "Both sections are empty"
$gpsummary.RecommendedAction= "delete"
}
+ $DisabledLinkCount = 0
+ foreach ($link in $gpsummary.links) {
+ if ($link.Enabled -eq $false) { $DisabledLinkCount++ }
+ }
+ if ($DisabledLinkCount -eq $gpsummary.links.count) {
+ $gpsummary.Notes += "All links disabled"
+ $gpsummary.RecommendedAction= "delete"
+ }
if (($gpsummary.linkname -match "^Group Policies") -and ($gpsummary.Links.Count -eq 1)) {
$gpsummary.Notes += "Link target has no effect"
$gpsummary.RecommendedAction= "delete"
Please sign in to comment.
Something went wrong with that request. Please try again.