PowerShell Logo Small

Set-AppLockerPolicy



This is the built-in help made by Microsoft for the command 'Set-AppLockerPolicy', in PowerShell version 4 - as retrieved from Windows version 'Microsoft Windows 8.1 Enterprise' 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.

SYNOPSIS

Sets the AppLocker policy for the specified GPO.

SYNTAX


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 [<S
ystem.String>]] [-Ldap [<String>]] [-Merge] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


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.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?linkid=287251
Get-AppLockerFileInformation
Get-AppLockerPolicy
New-AppLockerPolicy
Test-AppLockerPolicy

REMARKS

<

Examples


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 informatio
n on how two policies are merged, see the Merge parameter description.