Skip to content

Instantly share code, notes, and snippets.

@themightyshiv
Created January 18, 2024 20:41
Show Gist options
  • Save themightyshiv/d2cbace385301d8f22809b8a8e37b6f3 to your computer and use it in GitHub Desktop.
Save themightyshiv/d2cbace385301d8f22809b8a8e37b6f3 to your computer and use it in GitHub Desktop.
Common ADFS Commands

Common ADFS Commands

List LocalMachine Certificates

dir Cert:\LocalMachine\My

Install WebApplicationProxy Certificate

Install-WebApplicationProxy -CertificateThumbprint '[THUMBPRINT]' -FederationServiceName '*.[DOMAIN].[TLD]'

Configure RPT Without Revocation Checks

Set-AdfsRelyingPartyTrust -TargetIdentifier https://[URL]/to/[METADATA] -EncryptionCertificateRevocationCheck None
Set-AdfsRelyingPartyTrust -TargetIdentifier https://[URL]/to/[METADATA] -SigningCertificateRevocationCheck None

Set ADFS Certificate

Set-AdfsSslCertificate -Thumbprint [THUMBPRINT]

Set ADFS Proxy Certificate

Set-WebApplicationProxySslCertificate -Thumbprint [THUMBPRINT]

Remove ADFS Certificates

Remove-ADFSCertificate -CertificateType token-signing -Thumbprint [THUMBPRINT]
Remove-ADFSCertificate -CertificateType token-decrypting -Thumbprint [THUMBPRINT]

Get Current ADFS Certificate Info

Get-AdfsCertificate –CertificateType token-signing
Get-AdfsCertificate –CertificateType token-decrypting

Update ADFS Certificates

Update-ADFSCertificate –CertificateType token-signing
Update-ADFSCertificate –CertificateType token-decrypting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment