< Back

Export-ADFSClaimRule

Fri Jan 10, 2020 7:23 pm

NAME Export-ADFSClaimRule



SYNOPSIS

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





SYNTAX

Export-ADFSClaimRule [[-Name] <String>] [-Identifier <String>] [-PrefixIdentifier <String>] [-Server <String>]

[-Credential <PSCredential>] [<CommonParameters>]





DESCRIPTION

Inspired by original work here:

https://gallery.technet.microsoft.com/s ... m-3c23b4bc



Exports 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.





PARAMETERS

-Name <String>



Required? false

Position? 1

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-Identifier <String>



Required? false

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-PrefixIdentifier <String>



Required? false

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

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:\\>Export-ADFSClaimRule ProdRule



This will export a rule in json format for saving in a config-as-code scenario.









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



PS C:\\>Export-ADFSClaimRule -Server ADFS01 -Credential $creds



In this example a remote server and credentials are proivided. The credential parameter is not mandetory if

current logged-in credentails will work. The cmdlet will export every discovered trust.











RELATED LINKS