Set-AppLockerPolicy
Set-AppLockerPolicy
Sets the AppLocker policy for the specified Group Policy Object (GPO).
구문
Parameter Set: ByXmlPolicy
Set-AppLockerPolicy [-XmlPolicy] <String> [-Ldap <String> ] [-Merge] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: ByPolicyObject
Set-AppLockerPolicy [-PolicyObject] <AppLockerPolicy> [-Ldap <String> ] [-Merge] [-Confirm] [-WhatIf] [ <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.
매개 변수
-Ldap<String>
Specifies the LDAP path of the GPO. It must specify a unique GPO. If this parameter is not specified, then the local AppLocker policy is set.
별칭 |
없음 |
필수 여부 |
false |
위치 |
named |
기본값 |
없음 |
파이프라인 입력 적용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-Merge
Merges the rules in the specified AppLocker policy with the AppLocker rules in the target GPO specified in the LDAP path. The merging of policies will remove rules with duplicate rule IDs, and the enforcement setting specified by the AppLocker policy in the target GPO will be preserved. If the Merge parameter is not specified, then the new policy will overwrite the existing policy.
별칭 |
없음 |
필수 여부 |
false |
위치 |
named |
기본값 |
없음 |
파이프라인 입력 적용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-PolicyObject<AppLockerPolicy>
Specifies the AppLockerPolicy object that contains the AppLocker policy. Can be obtained from the Get-AppLockerPolicy and the New-AppLockerPolicy cmdlets.
별칭 |
없음 |
필수 여부 |
true |
위치 |
1 |
기본값 |
없음 |
파이프라인 입력 적용 여부 |
true (ByValue, ByPropertyName) |
와일드카드 문자 허용 여부 |
false |
-XmlPolicy<String>
Specifies the path where the XML-formatted file containing the AppLocker policy is saved.
별칭 |
없음 |
필수 여부 |
true |
위치 |
1 |
기본값 |
없음 |
파이프라인 입력 적용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-Confirm
cmdlet을 실행하기 전에 확인 메시지가 표시됩니다.
필수 여부 |
false |
위치 |
named |
기본값 |
false |
파이프라인 입력 적용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-WhatIf
cmdlet이 실행될 경우 결과 동작을 표시합니다. cmdlet이 실행되지 않습니다.
필수 여부 |
false |
위치 |
named |
기본값 |
false |
파이프라인 입력 적용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
<CommonParameters>
이 cmdlet은 일반 매개 변수 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer 및 -OutVariable을 지원합니다. 자세한 내용은 다음을 참조하세요. about_CommonParameters(https://go.microsoft.com/fwlink/p/?LinkID=113216).
입력
입력 유형은 cmdlet에 파이프할 수 있는 개체의 유형입니다.
Microsoft.Security.ApplicationId.PolicyManagement.PolicyModel.AppLockerPolicy
AppLockerPolicy
System.String
출력
출력 유형은 cmdlet이 내보내는 개체의 유형입니다.
- None
예제
EXAMPLE 1
This example sets the local AppLocker policy to the policy specified in C:\Policy.xml.
PS C:\> Set-AppLockerPolicy -XMLPolicy C:\Policy.xml
EXAMPLE 2
This example sets the GPO specified in the LDAP path to contain the AppLocker policy that is specified in C:\Policy.xml.
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"
EXAMPLE 3
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.
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