다음을 통해 공유


New-ADFSClaimRuleSet

New-ADFSClaimRuleSet

Creates a new set of claim rules.

Syntax

Parameter Set: FromFile
New-ADFSClaimRuleSet -ClaimRuleFile <String> [ <CommonParameters>]

Parameter Set: FromParams
New-ADFSClaimRuleSet -ClaimRule <String[]> [ <CommonParameters>]

Detailed Description

The New-ADFSClaimRuleSet cmdlet creates a new set of claim rules in Active Directory Federation Services (AD FS) 2.0.

Parameters

-ClaimRule<String[]>

Specifies the individual rules in this rule set.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ClaimRuleFile<String>

Specifies the serialized policy text that is created by the collection of rules in the rule set.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.IdentityServer.PowerShell.Resources.ClaimRuleSet

    A class structure that represents a set of AD FS 2.0 claim rules.

Notes

  • You can assign these claim rules to a claims provider trust or relying party trust by using the corresponding cmdlets.

Examples

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

Description

-----------

Creates a new claim rule set for a relying party trust using a text file.

C:\PS>$rSet = New-ADFSClaimRuleSet -ClaimRuleFile 'C:\ruleset.txt'
Set-ADFSRelyingPartyTrust -TargetName Fabrikam -IssuanceTransformRules $rSet.ClaimRulesString

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

Description

-----------

Creates a new claim rule set for a relying party trust using an inline AD FS 2.0 claims language rule.

C:\PS>$rSet = New-ADFSClaimRuleSet -ClaimRule 'c:[] => issue(claim = c);'
Set-ADFSRelyingPartyTrust -TargetName Fabrikam -IssuanceTransformRules $rSet.ClaimRulesString

Get-ADFSClaimsProviderTrust

Set-ADFSClaimsProviderTrust

Update-ADFSClaimsProviderTrust