Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - Certificate Provider

Reply
 
Old 09-05-2007   #1 (permalink)
Joe G


 
 

Certificate Provider

I'm looking for documentation on the export method associated with an X509
Certificate object defined in the subject Powershell provider. Or for any of
the objects methods/properties. I can see the available methods/properties
by tabing after the object. string, I just can't find any of the
documentation on their parms.

My System SpecsSystem Spec
Old 09-05-2007   #2 (permalink)
Kiron


 
 

Re: Certificate Provider

Use Get-Member (alias 'gm')

$myCert = Get-PfxCertificate <cert's path>

# All members
$myCert | get-member | select Name, TypeName, Definition | format-list |
more

# Methods
$myCert | get-member -type Method | select Name, TypeName, Definition |
format-list | more

# Properties
$myCert | get-member -type Property | select Name, TypeName, Definition |
format-list | more

# Export method
$myCert | get-member Export | select Name, TypeName, Definition |
format-list

--
Kiron

My System SpecsSystem Spec
Old 09-05-2007   #3 (permalink)
rogwei


 
 

Re: Certificate Provider

On Sep 5, 9:22 am, Joe G <J...@xxxxxx> wrote:
Quote:

> I'm looking for documentation on the export method associated with an X509
> Certificate object defined in the subject Powershell provider. Or for any of
> the objects methods/properties. I can see the available methods/properties
> by tabing after the object. string, I just can't find any of the
> documentation on their parms.
http://msdn2.microsoft.com/en-us/lib...te.export.aspx

My System SpecsSystem Spec
Old 09-05-2007   #4 (permalink)
Joe G


 
 

Re: Certificate Provider

Would you know if there is a way to get the Enumerations available? I've
been trying to use the
[System.Security.Cryptography.X509Certificates.X509ContentType.Pfx] to no
avail.

"Kiron" wrote:
Quote:

> Use Get-Member (alias 'gm')
>
> $myCert = Get-PfxCertificate <cert's path>
>
> # All members
> $myCert | get-member | select Name, TypeName, Definition | format-list |
> more
>
> # Methods
> $myCert | get-member -type Method | select Name, TypeName, Definition |
> format-list | more
>
> # Properties
> $myCert | get-member -type Property | select Name, TypeName, Definition |
> format-list | more
>
> # Export method
> $myCert | get-member Export | select Name, TypeName, Definition |
> format-list
>
> --
> Kiron
>
>
My System SpecsSystem Spec
Old 09-05-2007   #5 (permalink)
Kiron


 
 

Re: Certificate Provider

"Unknown, Cert, SerializedCert, Pfx, Pkcs12, SerializedStore, Pkcs7,
Authenticode"

By assigning an empty string to the property PowerShell is kind enough to
list the enumeration values in the error message:

Try this:

[System.Security.Cryptography.X509Certificates.X509ContentType]:fx = ""

--
Kiron

My System SpecsSystem Spec
Old 09-06-2007   #6 (permalink)
Joe G


 
 

Re: Certificate Provider

Thanks Kiron. It's the double colon delimiter that I always seem to forget.

"Kiron" wrote:
Quote:

> "Unknown, Cert, SerializedCert, Pfx, Pkcs12, SerializedStore, Pkcs7,
> Authenticode"
>
> By assigning an empty string to the property PowerShell is kind enough to
> list the enumeration values in the error message:
>
> Try this:
>
> [System.Security.Cryptography.X509Certificates.X509ContentType]:fx = ""
>
> --
> Kiron
>
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Provider changes in V2.0 PowerShell
Select Certificate message, but no certificate to select Vista security
WMI Provider Vista mail
WMI Provider Vista mail
which provider is best ? Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46