< Back

Read-X509Certificate

Sat Jan 18, 2020 9:33 pm

NAME Read-X509Certificate



SYNOPSIS

Reads the certificate information.





SYNTAX

Read-X509Certificate [-Certificate] <X509Certificate2> [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

The Read-X509Certificate cmdlet reads the X.509 certificate data and translate the data to human-readable format

output in console.





PARAMETERS

-Certificate <X509Certificate2>

Specifies the X509Certificate2 object type to read.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.Security.Cryptography.X509Certificates.X509Certificate2







OUTPUTS

System.Management.Automation.PSObject







NOTES





Author : Ryen Kia Zhi Tang



Blog : ryentang.wordpress.com (http://ryentang.wordpress.com/)



Example 1



PS C:\\> Get-X509Certificate -Uri msn.com | Read-X509Certificate





Archived : False

Handle : 2354025301952

SerialNumber : 5A0004D40784196ABB8F47E7BC00010004D407

NotBefore : 15/10/16 4:44:56 AM

EffectiveDate : 15/10/16 4:44:56 AM

NotAfter : 15/4/18 3:44:56 AM

ExpirationDate : 15/4/18 3:44:56 AM

FriendlyName :

Subject : CN=*.msn.com

Issuer : CN=Microsoft IT SSL SHA2, OU=Microsoft IT, O=Microsoft Corporation, L=Redmond,

S=Washington, C=US

Version : 3

HasPrivateKey : False

Thumbprint : EB5DC974F9AA001BFAC09F792B3A8C41C3874B63

SignatureAlgorithm : sha256RSA(1.2.840.113549.1.1.11)

SubjectKeyIdentifier : b82f31b7e175edb52ad5cbdfcc37414ccefcf805

KeyUsage : DataEncipherment, KeyEncipherment, DigitalSignature

AuthorityKeyIdentifier : KeyID=51af24269cf468225780262b3b4662157b1ecca5

CRLDistributionPoints : [1]CRL Distribution Point: Distribution Point Name:Full

Name:URL=http://mscrl.microsoft.com/pki/mscorp/crl/msitwww2.crl,

URL=http://crl.microsoft.com/pki/mscorp/crl/msitwww2.crl

AuthorityInformationAccess : [1]Authority Info Access: Access Method=Certification Authority Issuer

(1.3.6.1.5.5.7.48.2), Alternative

Name=URL=http://www.microsoft.com/pki/mscorp/msitwww2.crt, [2]Authority Info

Access: Access Method=On-line Certificate Status Protocol (1.3.6.1.5.5.7.48.1),

Alternative Name=URL=http://ocsp.msocsp.com

CertificateTemplateInformation :

Template=1.3.6.1.4.1.311.21.8.7587021.751874.11030412.6202749.3702260.207.15542268.3

366194, Major Version Number=100, Minor Version Number=25

EnhancedKeyUsage : {Server Authentication(1.3.6.1.5.5.7.3.1), Client

Authentication(1.3.6.1.5.5.7.3.2)}

CertificatePolicies : [1]Certificate Policy:Policy Identifier=1.3.6.1.4.1.311.42.1, [1,1]Policy

Qualifier

Info:Policy Qualifier Id=CPS, Qualifier:http://www.microsoft.com/pki/mscorp/cps

ApplicationPolicies : [1]Application Certificate Policy:Policy Identifier=Server Authentication,

[2]Application Certificate Policy:Policy Identifier=Client Authentication

SubjectAlternativeName : DNS Name=*.msn.com, DNS Name=msn.com, DNS Name=*.live-int.com, DNS

Name=*.msn.cn,

DNS Name=*.msn.com.cn, DNS Name=*.live.com, DNS Name=*.s-msn.com, DNS

Name=*.msn.it, DNS Name=*.msn.co.jp, DNS Name=*.msn.co.nz, DNS Name=*.msn.co.uk,

DNS Name=*.live.jp, DNS Name=*.msn.at, DNS Name=*.msn.ca, DNS Name=*.msn.ch, DNS

Name=*.msn.de, DNS Name=*.msn.es, DNS Name=*.msn.fi, DNS Name=*.msn.fr, DNS

Name=*.msn.gr, DNS Name=*.msn.ie, DNS Name=*.msn.jp, DNS Name=*.msn.kz, DNS

Name=*.msn.nl, DNS Name=*.msn.no, DNS Name=*.msn.pt, DNS Name=*.msn.ru, DNS

Name=*.msn.se, DNS Name=*.msn.sg, DNS Name=*.msnarabia.com, DNS

Name=*.msnautos.com, DNS Name=*.msncricket.com, DNS Name=*.msnlatino.com, DNS

Name=*.msnnews.com, DNS Name=*.msnsports.com, DNS Name=*.augurimessenger.it, DNS

Name=*.carpoint.ca, DNS Name=*.carpoint.com, DNS Name=*.detelefoonvanbritt.nl,

DNS

Name=*.digitaldemocracy.tv, DNS Name=*.discovermsn.com, DNS Name=*.gpslab.net,

DNS

Name=*.howzitmsn.com, DNS Name=*.investor.com, DNS Name=*.irbi.de, DNS

Name=*.liga-tippgemeinschaft.de, DNS Name=*.live.fr, DNS Name=*.live.sg, DNS

Name=*.livespacesvision.com, DNS Name=*.livevz.net, DNS Name=*.messenger.fr, DNS

Name=*.microsoftadcentre.ca, DNS Name=*.msn.ae, DNS Name=*.msn.be, DNS

Name=*.msn.cr, DNS Name=*.msn.dk, DNS Name=*.msn.hu, DNS Name=*.msn.net, DNS

Name=*.msn.pl, DNS Name=*.msnmoney.ca, DNS Name=*.msnstars.dk, DNS

Name=*.msntravel.com, DNS Name=*.msnweather.com, DNS Name=*.nyhetene24.no, DNS

Name=*.prodigymsn.com, DNS Name=*.securitymap.de, DNS Name=*.start.com, DNS

Name=*.webalfemminile.it, DNS Name=*.windowslive.be, DNS Name=*.windowslive.it,

DNS

Name=*.xboxemea.com, DNS Name=*.yupimsn.com, DNS Name=*.live.co.uk, DNS

Name=*.msn.co.cr, DNS Name=*.msn.co.id, DNS Name=*.msn.co.il, DNS

Name=*.msn.co.in,

DNS Name=*.msn.co.kr, DNS Name=*.msn.co.th, DNS Name=*.msn.co.za, DNS

Name=*.msn.com.au, DNS Name=*.msn.com.br, DNS Name=*.msn.com.gr, DNS

Name=*.msn.com.hk, DNS Name=*.msn.com.mx, DNS Name=*.msn.com.my, DNS

Name=*.msn.com.sg, DNS Name=*.msn.com.tr, DNS Name=*.msn.com.tw, DNS

Name=*.msn.net.ru, DNS Name=*.prodigymsn.com.mx, DNS Name=*.t1msn.com.mx, DNS

Name=*.windowslive.com.br

...



This command gets the certificate from msn.com website domain name and pipelining to Read-X509Certificate cmdlet

to output a human-readable information about the certificate.



RELATED LINKS

X509Certificate2 Class https://docs.microsoft.com/en-gb/dotnet ... ficates.x5

09certificate2?view=netcore-2.0