Skip to content

Certificate

Franck SALLET edited this page Sep 5, 2026 · 1 revision

Certificate

Discovery of certificates nearing expiration across local or remote certificate stores.

1 function(s) in Public/certificate/.

Functions

Reference

Get-ExpiringCertificate

Find local-store certificates expiring within a threshold of days.

Scans one or more local machine certificate stores (My, WebHosting, CA, ...) on one or more computers and returns the certificates whose NotAfter falls within the given number of days, sorted by expiry date ascending. Optionally includes already-expired certificates. Complements Get-SSLCertificate (network endpoints) and Get-IISCertificateBinding (IIS bindings) on the local-store side.

Syntax

Get-ExpiringCertificate [-ComputerName <string[]>] [-Credential <System.Management.Automation.PSCredential>] [-DaysUntilExpiration <int>] [-StoreName <string[]>] [-IncludeExpired]

Examples

Get-ExpiringCertificate -DaysUntilExpiration 30

Local usage example.

Get-ExpiringCertificate -ComputerName 'SRV01' -StoreName 'My','WebHosting' -DaysUntilExpiration 60

Remote single-machine example.

'SRV01','SRV02' | Get-ExpiringCertificate -IncludeExpired

Pipeline usage example.

Output: PSWinOps.ExpiringCertificate

One object per matching certificate, sorted by NotAfter ascending per machine.


PSWinOps Wiki

Home

Domains

Clone this wiki locally