Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to get "Intended Purposes" filed of a certificate?

399 views
Skip to first unread message

rmq

unread,
Feb 24, 2009, 6:08:51 AM2/24/09
to
By MMC->Certificates, I found every certificate has filed named
"Intended Purposes", whose value could be "Client Authentication",
etc. But in Powershell, I did not find this filed. Can someone help ?

By the way, my PS version is V2(CTP2)

Thanks a lot.

Joel Bennett

unread,
Feb 24, 2009, 10:04:55 PM2/24/09
to
From anywhere in the cert: psdrive ....


ls | select -expand Extensions |
select KeyUsages,EnhancedKeyUsages

--or--

ls | Format-List FriendlyName, Subject, @{l="Usages";e={
foreach($key in $_.Extensions){
if($key.KeyUsages){$key.KeyUsages}
if($key.EnhancedKeyUsages){$key.EnhancedKeyUsages}
}
}}


For some reason, this seems to miss the data on some keys where it still
shows up on the certificate property dialog ... not sure what to do
about that. Maybe someone else has a better clue :)
--
Joel

rmq

unread,
Feb 26, 2009, 12:15:07 AM2/26/09
to
Thanks a lot.
0 new messages