Update citool-commands.md

This commit is contained in:
valemieux 2023-03-24 13:47:20 -07:00
parent aacbde9004
commit 4bc7544c1e

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
(CiTool -lp -json | ConvertFrom-Json).Policies | Where-Object {$_.IsEnforced -eq "True"} |
# Check each policy's IsEnforced state and return only the enforced policies Select-Object -Property PolicyID,FriendlyName | Format-List
foreach($wdacPolicy in $wdacPolicies ){
if($wdacPolicy.IsEnforced)
{
Write-Host $wdacPolicy.FriendlyName
Write-Host $wdacPolicy.PolicyID "`n"
}
}
``` ```
5. Display the help menu 5. Display the help menu