< Back

Import-ADFSClaimRule

Fri Jan 10, 2020 7:24 pm

NAME Import-ADFSClaimRule



SYNOPSIS

This script imports RelyingPartTrust valuewith extra authentication rules to allow for remote execution.





SYNTAX

Import-ADFSClaimRule [-RelyingPartyTrustContent] <String> [-Server <String>] [-Credential <PSCredential>]

[<CommonParameters>]





DESCRIPTION

Imports all claim rules from Relying Party Trust, with extra local/remote server and credential flags to make it

more flexible in a CI/CD scenario.

If a Claims rule is missing, it is created.



while export-adfsclaimsrule fetches configurations "as-is" using the adfs cmdlets, the import will re-format said

output to be compatible with the input format.

For example, an export will define `ClaimsAccepted`. This function will convert it to `ClaimAccepted` to ensure

it imports.





PARAMETERS

-RelyingPartyTrustContent <String>

Param1 help description



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Server <String>



Required? false

Position? named

Default value $env:COMPUTERNAME

Accept pipeline input? false

Accept wildcard characters? false



-Credential <PSCredential>



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



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



PS C:\\>Import-ADFSClaimRule $myRPT



This will import a previously exported RPT rule.









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



PS C:\\>Get-Content .\\myRPT.json | Import-ADFSClaimRule $_ -Server ADFS01 -Credential $mycreds



In this example a json file is imported and applied to a remote server with specific credentials.











RELATED LINKS