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 Active Directory フェデレーション サービス (AD FS) 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>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

  • None

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • 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

関連トピック

Get-AdfsClaimsProviderTrust

Set-AdfsClaimsProviderTrust

Update-AdfsClaimsProviderTrust

Set-AdfsRelyingPartyTrust