Hello,
Some updates:
======================================================================================================
##--------------- Discovery ------------------##
$readOnly = [System.Security.Cryptography.X509Certificates.OpenFlags]"ReadOnly"
$localMachine = [System.Security.Cryptography.X509Certificates.StoreLocation]"LocalMachine"
##$store = new-object System.Security.Cryptography.X509Certificates.X509Store( "\\##SYSTEM.SYSNAME##\root", $localMachine )##
$store = new-object System.Security.Cryptography.X509Certificates.X509Store( "\\##SYSTEM.SYSNAME##\my", $localMachine )
$store.Open( $readOnly )
$store.Certificates `
| Select-Object {$_.Thumbprint + "##" + $_.Subject } `
| Format-Table -HideTableHeaders
##--------------------------------------------##
======================================================================================================
and
======================================================================================================
##-------------- Counters --------------------##
$readOnly = [System.Security.Cryptography.X509Certificates.OpenFlags]"ReadOnly"
$localMachine = [System.Security.Cryptography.X509Certificates.StoreLocation]"LocalMachine"
$store = new-object System.Security.Cryptography.X509Certificates.X509Store( "\\##SYSTEM.SYSNAME##\root", $localMachine )
$properties = @(
@{n='DaysUntilExpire';e={($_.NotAfter -[datetime]::Today ).Days}},
@{n='CommonName';e={"##WILDALIAS##"}}
)
$store.Open( $readOnly )
$store.Certificates `
| Where-Object {($_.Thumbprint -like "##WILDVALUE##")} `
| Select-Object $properties
======================================================================================================
with two datapoints ...
I am progressing but not yet okay... I did a poll and I have No data for CommonName and DaystoExpire but I have the information in the Raw Request/Response output so I think I have wrongly associated some fields!!!!
Thanks,
Dom