Skip to content

Certificatesยค

Functions for working with X509 certificates - inspecting chains, converting between PEM and .NET objects, and managing root certificates.

Function Alias Description
Add-CertificateProperties Add CN, SAN, SKI, AKI
ConvertFrom-PEM PEM string to X509 object
ConvertTo-PEM X509 object to PEM string
Get-Certificate Get cert(s) from URI
Get-CertificateOpenSSL Get cert(s) via OpenSSL
Get-RootCertificates List system root certs
Show-Certificate Show cert chain for URI
Show-CertificateChain Show full cert chain
Show-ConvertedPem pemdec Decode and display PEM
Split-UriHostPort Parse host and port

Inspect a certificate chain

Show-Certificate -Uri 'https://github.com'

Inspect a certificate on a non-default port

# port appended to the host, like `openssl s_client -connect host:port`
Show-Certificate -Uri 'example.com:8443' -PresentedChain

# or passed explicitly with -Port
Show-Certificate -Uri 'example.com' -Port 8443 -PresentedChain