New-AdfsClaimRuleSet
New-AdfsClaimRuleSet
Creates a set of claim rules.
구문
Parameter Set: FromFile
New-AdfsClaimRuleSet -ClaimRuleFile <String> [ <CommonParameters>]
Parameter Set: FromParams
New-AdfsClaimRuleSet -ClaimRule <String[]> [ <CommonParameters>]
자세한 설명
The New-AdfsClaimRuleSet cmdlet creates a set of claim rules in AD FS(Active Directory Federation Services) 2.0.
매개 변수
-ClaimRule<String[]>
Specifies an array of individual rules in this rule set.
별칭 |
없음 |
필수 여부 |
true |
위치 |
named |
기본값 |
없음 |
파이프라인 입력 적용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-ClaimRuleFile<String>
Specifies the serialized policy text that is created by the collection of rules in the rule set.
별칭 |
없음 |
필수 여부 |
true |
위치 |
named |
기본값 |
없음 |
파이프라인 입력 적용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
<CommonParameters>
이 cmdlet은 일반 매개 변수 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer 및 -OutVariable을 지원합니다. 자세한 내용은 다음을 참조하세요. about_CommonParameters(https://go.microsoft.com/fwlink/p/?LinkID=113216).
입력
입력 유형은 cmdlet에 파이프할 수 있는 개체의 유형입니다.
- None
출력
출력 유형은 cmdlet이 내보내는 개체의 유형입니다.
Microsoft.IdentityServer.PowerShell.Resources.ClaimRuleSet
This cmdlet generates a class structure that represents a set of AD FS 2.0 claim rules.
참고
- You can assign these claim rules to a claims provider trust or relying party trust by using the corresponding cmdlets.
예제
Example 1: Create a claim rule set by using a text file
The first command creates a claim rule set by using a text file, and then stores it in the $RuleSet variable.
The second command uses the Set-AdfsRelyingPartyTrust cmdlet to assign the rule set stored in $RuleSet to a relying party trust. The command refers to the ClaimsRuleString property of the object stored in $RuleSet.
PS C:\> $RuleSet = New-AdfsClaimRuleSet -ClaimRuleFile 'C:\ruleset.txt'
PS C:\> Set-AdfsRelyingPartyTrust -TargetName "Fabrikam" -IssuanceTransformRules $RuleSet.ClaimRulesString
Example 2: Create a claim rule set by using an inline rule
The first command creates a claim rule set by using an inline AD FS 2.0 claims language rule, and then stores it in the $RuleSet variable.
The second command uses Set-AdfsRelyingPartyTrust to assign the rule set stored in $RuleSet to a relying party trust. The command refers to the ClaimsRuleString property of the object stored in $RuleSet.
PS C:\> $RuleSet = New-AdfsClaimRuleSet -ClaimRule 'c:[] => issue(claim = c);'
PS C:\> Set-AdfsRelyingPartyTrust -TargetName "Fabrikam" -IssuanceTransformRules $RuleSet.ClaimRulesString