This is the built-in help made by Microsoft for the command 'Set-AppLockerPolicy', in PowerShell version 3 - as retrieved from
Windows version 'Microsoft Windows Server 2012 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 Group Policy Object (GPO).
Set-AppLockerPolicy [-XmlPolicy] <String> [-Ldap <String>] [-Merge [<SwitchParameter>]] [-Confirm [<SwitchParameter>]] [-WhatIf
[<SwitchParameter>]] [<CommonParameters>]
Set-AppLockerPolicy [-PolicyObject] <AppLockerPolicy> [-Ldap <String>] [-Merge [<SwitchParameter>]] [-Confirm [<SwitchParameter>]] [-WhatIf
[<SwitchParameter>]] [<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 containing the AppLocker policy.
<
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. See the Merge parameter description for more details on how two policies are merged.