New-AdfsClaimRuleSet

Windows Server 2012 R2 and Windows 8.1

New-AdfsClaimRuleSet

Creates a set of claim rules.

Sintaxis

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

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




Descripción detallada

The New-AdfsClaimRuleSet cmdlet creates a set of claim rules in Servicios de federación de Active Directory (AD FS) 2.0.

Parámetros

-ClaimRule<String[]>

Specifies an array of individual rules in this rule set.


Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-ClaimRuleFile<String>

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


Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

<CommonParameters>

Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (http://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.

  • None

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

  • Microsoft.IdentityServer.PowerShell.Resources.ClaimRuleSet

    This cmdlet generates a class structure that represents a set of AD FS 2.0 claim rules.


Notas

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

Ejemplos

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

Temas relacionados

Adiciones de comunidad

AGREGAR
Mostrar: