Azure Local - How to disable WDAC policy
I was going to write a very comprehensive guide on how to disable Windows Defender Application Control (WDAC) policy on Azure Local, but I found this article that does that already: Manage Application Control for Azure Local
I do want to highlight a few things though 😊
Make sure to only disable WDAC policy when absolutely necessary and re-enable it as soon as possible.
More importantly, this is not really meant to be used on production systems. But if you are testing something, and WDAC policy is preventing you from doing so, this might be a good temporary solution to at least validate that the piece of software you are testing works as expected.
You would think that enabling/disabling WDAC policy would be done with a Set cmdlet, given that to see the policy you run Get-AsWdacPolicyMode for the cluster or Get-ASLocalWDACPolicyMode for a single node. Unfortunately, there is no Set cmdlet for this. Instead, you need to use the Enable-ASLocalWDACPolicy -Mode <Audit | Enforced> for a single node or Enable-AsWdacPolicy -Mode <Audit | Enforced> for a cluster.
How to check what policy mode is currently active
You will need to create the PowerShell remote session with CredSSP to run this command, otherwise it will look like this:
| |
| |
| |
Sample output
| |
How to disable WDAC policy
| |
| |
How to enable WDAC policy
| |
| |
Find out what policy is currently used
Get-ASLocalWDACPolicyInfo returns the same information as Get-ASLocalAppControlPolicyInfo because of this:
| |
Meaning this is just an alias for the same command, without actually using the alias functionality. It is just a wrapper that calls the other cmdlet.
| |
Sample policy info ouptut
| |
Other cmdlets in the Microsoft.AS.Infra.Security.WDAC module
How to get the module
| |
Get the module details
| |
Get other cmdlets in this module
| |