Please provide a PowerShell Script to find out SSL certificate Expiring date.

Murty M
Murty M used Ask the Experts™
on
How to trace an expiring SSL certificate in a domain.
We have 3 Legacy Citrix Farms in our environment.
Users are using web interface servers to access these Farms.
We have multiple SSL certificates for this environment.
Please provide a PowerShell Script to find out SSL certificate Expiring date.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Do you mean something like this?
Get-ChildItem -Path cert: -Recurse -ExpiringInDays 355

If you really want all of them:
Get-ChildItem -Path cert: -Recurse |select Thumbprint, Subject, NotAfter
Managing Consultant
Commented:
You probably only care about CurrentUser\My and LocalMachine\My.

And if you need to do this on multiple computers, you can wrap it with Invoke-Command:

Invoke-Command -Computer server1, server2, server3 -ScriptBlock { 
    Get-ChildItem -Path cert:\CurrentUser\My, cert:\LocalMachine\My -Recurse | 
        Select-Object @{ N = 'Computer'; E = { $env:ComputerName } }, Thumbprint, NotAfter, Subject 
}

Open in new window

Author

Commented:
Thank you

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial