From fc970971fb594b973c87407cd124c438accb8c82 Mon Sep 17 00:00:00 2001 From: Alvaro Sedano Date: Mon, 22 Jul 2019 01:41:06 +0200 Subject: [PATCH] Update result-example --- result-example | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/result-example b/result-example index 88e3c52..91d131c 100644 --- a/result-example +++ b/result-example @@ -33,7 +33,7 @@ FriendlyName : uaDedicated01(02) IssuerName : System.Security.Cryptography.X509Certificates.X500DistinguishedName NotAfter : 12/07/2020 14:10:54 NotBefore : 13/07/2018 14:10:54 -HasPrivateKey : False +HasPrivateKey : False <-- NOT IMPORTED BY THIS POWERSHELL SCRIPT PrivateKey : PublicKey : System.Security.Cryptography.X509Certificates.PublicKey RawData : {18, ...} @@ -57,4 +57,11 @@ revokedOn : {revocados, revCAcert} --- You can show certs that will expire in the next 90 days -$listaC | Where {$_.NotAfter -le (GetDate).AddDays(90)} +$listaC | Where-Object {$_.NotAfter -le (Get-Date).AddDays(90)} | Select sIssuer, SerialNumber, FriendlyName, DnsNameList, sSubject, revokedOn | ft + +--- +Or the list of revoked Certs + +$listaC | Where-Object {$_.revokedOn -ne $null} | Select sIssuer, SerialNumber, FriendlyName, DnsNameList, sSubject, revokedOn | ft +--- +And everything you want :)