Many times when you are running test, staging and production environments with the same ADFS servers, you want to copy claim roles from one RPT to another to ensure consistency. This can also be handy if you have a website for displaying claims and claimvalues for troubleshooting purposes. Here is a simple function that does this.

Function usage:

Copy-ADFSClaimRules -SourceRelyingPartyTrustName "Office 365" -DestinationRelyingPartyTrustName "Token testing website - Marius"