-
Notifications
You must be signed in to change notification settings - Fork 0
Certificate
Discovery of certificates nearing expiration across local or remote certificate stores.
1 function(s) in Public/certificate/.
-
Get-ExpiringCertificate— Find local-store certificates expiring within a threshold of days
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 30Local usage example.
Get-ExpiringCertificate -ComputerName 'SRV01' -StoreName 'My','WebHosting' -DaysUntilExpiration 60Remote single-machine example.
'SRV01','SRV02' | Get-ExpiringCertificate -IncludeExpiredPipeline usage example.
Output: PSWinOps.ExpiringCertificate
One object per matching certificate, sorted by NotAfter ascending per machine.
Domains
- Active Directory (22)
- Certificate (1)
- Event Log (9)
- Health Check (16)
- IIS (9)
- Network (26)
- NTP (5)
- Proxy (4)
- RDP (6)
- Security (1)
- System (20)
- Utils (4)
- VSS (Shadow Copy) (6)
- Windows Update (10)