Skip to content

Instantly share code, notes, and snippets.

@vshmoylov
Created June 6, 2017 22:02
Show Gist options
  • Save vshmoylov/86ea959a9654ed397055e97086d09634 to your computer and use it in GitHub Desktop.
Save vshmoylov/86ea959a9654ed397055e97086d09634 to your computer and use it in GitHub Desktop.
powershell script that prints out info for every x509 .cer certificate in current path
$certList = Get-ChildItem "."
foreach ($cert in $certList) {
$certPrint = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($cert.FullName)
Write-Host $certPrint.Subject
#$certPrint.Subject >> ".\output.txt"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment