This is the built-in help made by Microsoft for the command 'Set-AppLockerPolicy', in PowerShell version 5 - as retrieved from
Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.
For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.
Sets the AppLocker policy for the specified GPO.
Set-AppLockerPolicy [-XmlPolicy] <String> [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]]
[-Ldap [<String>]] [-Merge] [<CommonParameters>]
Set-AppLockerPolicy [-PolicyObject] <AppLockerPolicy> [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable
[<System.String>]] [-Ldap [<String>]] [-Merge] [<CommonParameters>]
The Set-AppLockerPolicy cmdlet sets the specified GPO to contain the specified AppLocker policy. If no Lightweight Directory Access Protocol (LDAP) is specified, then the
default is the local GPO.
The input values for the AppLocker policy can be an AppLockerPolicy object or an XML-formatted file that contains the AppLocker policy.
<
Online Version: http://go.microsoft.com/fwlink/?linkid=287251
Get-AppLockerFileInformation
Get-AppLockerPolicy
New-AppLockerPolicy
Test-AppLockerPolicy
<
EXAMPLE 1
PS C:\> Set-AppLockerPolicy -XMLPolicy C:\Policy.xml
This example sets the local AppLocker policy to the policy specified in C:\Policy.xml.
EXAMPLE 2
PS C:\> Set-AppLockerPolicy -XMLPolicy C:\Policy.xml -LDAP "LDAP://DC13.Contoso.com/CN={31B2F340-016D-11D2-945F-00C04FB984F9},CN=Policies,CN=System,DC=Contoso,DC=com"
This example sets the GPO specified in the LDAP path to contain the AppLocker policy that is specified in C:\Policy.xml.
EXAMPLE 3
PS C:\> Get-AppLockerPolicy -Local | Set-AppLockerPolicy -LDAP "LDAP://DC13.Contoso.com/CN={31B2F340-016D-11D2-945F-00C04FB984F9},CN=Policies,CN=System,DC=Contoso,DC=com"
-Merge
This example gets the local AppLocker policy, and then merges the policy with the existing AppLocker policy in the GPO specified in the LDAP path. For more information on
how two policies are merged, see the Merge parameter description.