Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save justaguywhocodes/8c36933f2d356d632caf610488c4c637 to your computer and use it in GitHub Desktop.

Select an option

Save justaguywhocodes/8c36933f2d356d632caf610488c4c637 to your computer and use it in GitHub Desktop.
# Retrieve Token-Signing Certificate
$signingCert = Get-AdfsCertificate -CertificateType "Token-Signing"
Export-PfxCertificate -Cert $signingCert.Certificate -FilePath "C:\temp\ADFS_Signing.pfx" -Password (ConvertTo-SecureString -String "YourSecurePassword!" -Force -AsPlainText)
# Retrieve Token-Decrypting Certificate
$decryptingCert = Get-AdfsCertificate -CertificateType "Token-Decrypting"
Export-PfxCertificate -Cert $decryptingCert.Certificate -FilePath "C:\temp\ADFS_Decrypting.pfx" -Password (ConvertTo-SecureString -String "YourSecurePassword!" -Force -AsPlainText)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment