Instantly share code, notes, and snippets.

Embed
What would you like to do?
Part of the ConfigureADFS.ps1 CSE. This shows how to import a certificate
#install the certificate that will be used for ADFS Service
Import-PfxCertificate -Exportable -Password $adminpassword -CertStoreLocation cert:\localmachine\my -FilePath $($localpath+"adfs_certificate.pfx")
#get thumbprint of certificate
$cert = Get-ChildItem -Path Cert:\LocalMachine\my | ?{$_.Subject -eq "CN=fs.adfsfarm.com, OU=Free SSL, OU=Domain Control Validated"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment