powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Get-AppLockerPolicy



NAME
Get-AppLockerPolicy

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

SYNTAX
Get-AppLockerPolicy -Local [-XML ] []

Get-AppLockerPolicy -Domain -LDAP [-XML ] []

Get-AppLockerPolicy -Effective [-XML ] []


DESCRIPTION
The Get-AppLockerPolicy cmdlet gets the AppLocker policy from the local Group Policy object (GPO), from a specified
GPO, or from the effective AppLocker policy on the computer. The output is an AppLockerPolicy object or an XML-for
matted string.


PARAMETERS
-Local
Gets the AppLocker policy from the local GPO.

Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Domain
Gets the AppLocker policy from the GPO that is specified by the path in the LDAP parameter.

Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Effective
Gets the effective AppLocker policy on the local computer. The effective policy is the merge of the local AppLo
cker policy and any applied domain policies on the local computer.

Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-LDAP
The LDAP path of the Group Policy object. Must specify a unique GPO.

Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-XML
Specifies that the AppLocker policy be output as an XML-formatted string.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
By default, Get-AppLockerPolicy returns an AppLockerPolicy object. If you use the XML parameter, it will return the
AppLocker policy as an XML-formatted string.


NOTES





-------------------------- EXAMPLE 1 --------------------------

C:\PS>Get-AppLockerPolicy -Local


Gets the local AppLocker policy as an AppLockerPolicy object.





-------------------------- EXAMPLE 2 --------------------------

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


Gets the AppLocker policy of the unique GPO specified by the LDAP path as an AppLockerPolicy object.





-------------------------- EXAMPLE 3 --------------------------

C:\PS>Get-AppLockerPolicy -Effective -XML > C:\temp\Effective.xml


Gets the effective policy on the computer, and then sends it in XML format to the specified file.





-------------------------- EXAMPLE 4 --------------------------

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


Gets the local AppLocker policy on the computer, and then tests the policy using Test-AppLockerPolicy to test wheth
er the executables in C:\Windows\System32 will be allowed to run by the Everyone group.






RELATED LINKS
Online version: http://go.microsoft.com/fwlink/?LinkID=144111
Set-AppLockerPolicy
New-AppLockerPolicy
Test-AppLockerPolicy
Get-AppLockerFileInformation