• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

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

#1
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.
 

My Computer

J

Joel Bennett

#2
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 wrote:

> 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.
 

My Computer

#3
Thanks a lot.

On Feb 25, 11:04 am, Joel Bennett <Jay...@xxxxxx> wrote:

>  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 wrote:

> > 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.
 

My Computer

Users Who Are Viewing This Thread (Users: 1, Guests: 0)