List installed certificate properties on remote computers

List installed certificate properties on remote computers

I have written this script to list the installed certificates on remote computers. The script lists first the computer accounts that match a specific OS type. Currently, the computer account in the Active Directory domain that have a “Server” operating system are stored in the variable $list.
Then, each computer account is queried through WinRM ( invoke-command cmdlet) to retrieve the certificates installed in the Cert store LocalMachine\Personal.
The retrieved attributes are the following:

  • thumbprint
  • CN
  • Issuer
  • Expiration date
  • Cert Template name

All the informations are finally stored in a variable called $array . The result can be exported to a csv file with the following command:
$array | select * | convertto-csv | out-file c:\temp\cert_report.csv

The script:


My Powershell script categories

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Social Media Auto Publish Powered By :