Skip to content

Latest commit

 

History

History
62 lines (40 loc) · 2.29 KB

README.md

File metadata and controls

62 lines (40 loc) · 2.29 KB

X509Details

PSGallery Version PSGallery Downloads

Decode an X509 Certificate and present it as a PowerShell Object. Certificate PowerShell Object details updated to include the X509 Certificate time to expiry (timeToExpiry).

Available in the PowerShell Gallery

Associated Blogpost

v1.0.6 - May 2024

Module updated thanks to Ben's PR to support Linux (LF) in addition to the existing Windows (CRLF) line ending.

Install

Install direct from the PowerShell Gallery (Powershell 5.x and above)

install-module -name X509Details

DESCRIPTION

Decode an X509 Certificate and present it as a PowerShell Object. Certificate PowerShell Object details updated to include the X509 Certificate time to expiry (timeToExpiry).

PARAMETER cert

The X509 Certificate to decode and udpate with time to expiry

INPUTS

Certificate from Pipeline.

OUTPUTS

PowerShell Object

SYNTAX

Get-X509Details('certBase64String')

EXAMPLE

PS> Get-X509Details('MIIDtzCCAp+gAwIBAgIQZpJpy9zmR........URpc0T9DzsUUfoHfbQ==')
or
PS> 'MIIDtzCCAp+gAwIBAgIQZpJpy9zmR........URpc0T9DzsUUfoHfbQ==' | Get-X509Details
or 
PS> Get-X509Details('-----BEGIN CERTIFICATE-----
                    MIIDtzCCAp
                    ........URpc0T9DzsUUfoHfbQ==
                    -----END CERTIFICATE-----
                    ')

LINKS