Update citool-commands.md

This commit is contained in:
Stephanie Savell
2023-03-02 11:22:07 -06:00
committed by GitHub
parent 856a66734a
commit 54c576a7c5

View File

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