title: How to Create Deny rules for Applocker using Powershell
body: <p>When using a command such as </p>
  
  <pre><code>ls 'C:\Program Files\*.exe' | Get-AppLockerFileInformation | New-AppLockerPolicy -RuleType Path -User everyone -xml -optimize
  </code></pre>
  
  <p>I always see it emit "Allow" rule. How can I generate a "Deny" rule (i.e Action="Deny") in the xml that gets generated. <a href="https://technet.microsoft.com/en-us/library/ee460963.aspx" rel="nofollow">MSDN</a> documentation does not say anything about having a deny option. Is XML fiddling the only way?</p>