Merge pull request #8075 from valemieux/v-alemieux-working

Suggestion for CITool: List the actively enforced WDAC policies on the system #11414
This commit is contained in:
Angela Fleischmann 2023-03-27 16:57:41 -06:00 committed by GitHub
commit b6912e7f5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,18 +65,9 @@ CiTool makes Windows Defender Application Control (WDAC) policy management easie
4. List the actively enforced WDAC policies on the system 4. List the actively enforced WDAC policies on the system
```powershell ```powershell
$wdacPolicies = (CiTool -lp -json | ConvertFrom-Json).Policies
# Check each policy's IsEnforced state and return only the enforced policies # Check each policy's IsEnforced state and return only the enforced policies
foreach($wdacPolicy in $wdacPolicies ){ (CiTool -lp -json | ConvertFrom-Json).Policies | Where-Object {$_.IsEnforced -eq "True"} |
Select-Object -Property PolicyID,FriendlyName | Format-List
if($wdacPolicy.IsEnforced)
{
Write-Host $wdacPolicy.FriendlyName
Write-Host $wdacPolicy.PolicyID "`n"
}
}
``` ```
5. Display the help menu 5. Display the help menu