-
Hello, I try to have a deeper understanding of WDAC and I can't figure why these two commands don't return the same result : Check each policy's IsEnforced state and return only the enforced policies(CiTool -lp -json | ConvertFrom-Json).Policies | Where-Object {$_.IsEnforced -eq "True"} | and Confirm-WDACConfig -ListActivePolicies according to this pages https://learn.microsoft.com/en-us/windows/security/application-security/application-control/app-control-for-business/operations/citool-commands, Is Currently Enforced | Indicates whether the policy file is active. is there a filter I can apply to CiTool -lp in order to get the same result as Confirm-WDACConfig -ListActivePolicies? Thanks, Erald |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi, (CiTool -lp -json | ConvertFrom-Json).Policies | Where-Object {$_.IsEnforced -eq "True"} |
Select-Object -Property PolicyID,FriendlyName | Format-List performs filtering on the result, so it only displays 2 properties of each policy: | Select-Object -Property PolicyID,FriendlyName | Format-List To get the same result as the (CiTool -lp -json | ConvertFrom-Json).Policies | Where-Object {$_.IsEnforced -eq "True"} |
Beta Was this translation helpful? Give feedback.
Oh i see, it's because by default the
confirm-WDACConfig -ListActivePolicies
doesn't show system policies, to view system policies you can use this commandconfirm-WDACConfig -ListActivePolicies -OnlySystemPolicies
https://github.com/HotCakeX/Harden-Windows-Security/wiki/Confirm-WDACConfig