mirror of
https://github.com/MicrosoftDocs/windows-itpro-docs.git
synced 2025-06-19 12:23:37 +00:00
fixed syntax
This commit is contained in:
@ -45,14 +45,10 @@ Use the Set-AppLockerPolicy cmdlet with the -XMLPolicy parameter, using an .XML
|
|||||||
|
|
||||||
To use the Set-AppLockerPolicy cmdlet, first import the Applocker modules:
|
To use the Set-AppLockerPolicy cmdlet, first import the Applocker modules:
|
||||||
|
|
||||||
```powershell
|
|
||||||
PS C:\Users\Administrator> import-module AppLocker
|
PS C:\Users\Administrator> import-module AppLocker
|
||||||
```
|
|
||||||
|
|
||||||
We will create a file (for example, clear.xml), place it in the same directory where we are executing our cmdlet, and add the preceding XML contents. Then run the following command:
|
We will create a file (for example, clear.xml), place it in the same directory where we are executing our cmdlet, and add the preceding XML contents. Then run the following command:
|
||||||
|
|
||||||
```powershell
|
|
||||||
C:\Users\Administrator> Set-AppLockerPolicy -XMLPolicy .\clear.xml
|
C:\Users\Administrator> Set-AppLockerPolicy -XMLPolicy .\clear.xml
|
||||||
```
|
|
||||||
|
|
||||||
This will remove all AppLocker Policies on a machine and could be potentially scripted to use on multiple machines using remote execution tools with accounts with proper access.
|
This will remove all AppLocker Policies on a machine and could be potentially scripted to use on multiple machines using remote execution tools with accounts with proper access.
|
||||||
|
Reference in New Issue
Block a user