Windows Vista Forums

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

  1. #1


    rmq Guest

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

    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 System SpecsSystem Spec

  2.   


  3. #2


    Joel Bennett Guest

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

    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 System SpecsSystem Spec

  4. #3


    rmq Guest

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

    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 System SpecsSystem Spec


How to get "Intended Purposes" filed of a certificate?
Similar Threads
Thread Forum
"Access Denied" on Encrypted Files although Certificate Still Exists and is Valid Vista security
Certificate authority moving from "Third-Party Root CertificationAuthorities" store to "Trusted Root Certification Authorities" storeautomatically Server General
standard user gets empty "choose a digital certificate" Vista security
One of the "certificate services client" tasks doesn't start. Vista account administration
Many "Certificate Services Client" error messages (task doesn't st Vista security