Skip to content

Instantly share code, notes, and snippets.

@nivleshc
Created September 25, 2016 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nivleshc/91affa0680dbf66c7df63f90f4ec713b to your computer and use it in GitHub Desktop.
Save nivleshc/91affa0680dbf66c7df63f90f4ec713b to your computer and use it in GitHub Desktop.
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