PowerShell Logo Small

Get-AppLockerPolicy



This is the built-in help made by Microsoft for the command 'Get-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.

SYNOPSIS

Gets the local, the effective, or a domain AppLocker policy.

SYNTAX


Get-AppLockerPolicy [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]] [-Xml] -Local
[<CommonParameters>]
Get-AppLockerPolicy [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]] [-Xml] -Domain -Ldap
<String> [<CommonParameters>]
Get-AppLockerPolicy [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]] [-Xml] -Effective
[<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Get-AppLockerPolicy cmdlet retrieves the AppLocker policy from the local Group Policy Object (GPO), a specified Group Policy Object (GPO), or the effective policy on the
computer.


By default, the output is an AppLockerPolicy object. If the Xml parameter is used, then the output will be the AppLocker policy as an XML-formatted string.



<

RELATED LINKS

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

REMARKS

<

Examples


EXAMPLE 1

PS C:\>Get-AppLockerPolicy -Local
Version RuleCollections RuleCollectionTypes
------- --------------- -------------------
1 {} {}



This example gets the local AppLocker policy as an AppLockerPolicy object.






EXAMPLE 2

PS C:\>Get-AppLockerPolicy -Domain -LDAP "LDAP:// DC13.Contoso.com/CN={31B2F340-016D-11D2-945F-00C04FB984F9},CN=Policies,CN=System,DC=Contoso,DC=com"



This example gets the AppLocker policy of the unique GPO specified by the LDAP path as an AppLockerPolicy object.






EXAMPLE 3

PS C:\>Get-AppLockerPolicy -Effective -Xml | Set-Content ('c:\temp\curr.xml')



This example gets the effective policy on the computer, and then sends it in XML-format to the specified file on an existing path.






EXAMPLE 4

PS C:\>Get-AppLockerPolicy -Local | Test-AppLockerPolicy -Path C:\Windows\System32\*.exe -User Everyone



This example gets the local AppLocker policy on the computer, and then tests the policy using the Test-AppLockerPolicy cmdlet to test whether the .exe files in
C:\Windows\System32 will be allowed to run by the Everyone group.