certificate automation

Prabuyuvaraj Ravichandran 21 Reputation points

We had the subordinate certificate expiry recently in the environment. Due to this most of the application and appliance not get the authentication.
To overcome the situation, management decided to do the automation (powershell script) to get the notification 30 days prior the certificate get expire. Also, they required the entire certificate list with the expire date.

Can anyone help me to get the script or the way to achieve the above statement.


Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 45,831 Reputation points

    This will get every certificate installed on the local machine:

    Get-ChildItem Cert:\ -Recurse

    This will get all the certs in the local machine personal store:

    Get-ChildItem -path cert:\LocalMachine\My 

    Get all the certificate installed on the local machine expiring in 30 days:

    Get-ChildItem Cert:\ -Recurse -ExpiringInDays 30
    0 comments No comments