Export (0) Print
Expand All

Get-PfxData

Windows Server 2012 R2 and Windows 8.1

Updated: March 3, 2014

Applies To: Windows 8.1, Windows PowerShell 4.0, Windows Server 2012 R2

Get-PfxData

Extracts the content of a Personal Information Exchange (PFX) file into a structure without importing it to certificate store.

Syntax

Parameter Set: Default
Get-PfxData [-FilePath] <String> [-Password <SecureString> ] [ <CommonParameters>]




Detailed Description

The Get-PfxData cmdlet extracts the content of a Personal Information Exchange (PFX) file into a structure that contains the end entity certificate, any intermediate and root certificates.

Parameters

-FilePath<String>

Specifies the path to the PFX file.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Password<SecureString>

Specifies the password for the imported PFX file.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • System.String

    A string containing the path to PFX file.


Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.CertificateServices.Commands.PFXData

    A PFXData object.


Examples

EXAMPLE 1

This example returns certificate information for the file mypfx.pfx located on the C: drive that is secured with the specified password.


 

PS C:\> $mypwd = ConvertTo-SecureString -String "1234" -Force –AsPlainText

 

PS C:\> $mypfx = Get-PfxData –FilePath C:\mypfx.pfx –Password $mypwd

EXAMPLE 2

This example shows how one can change an existing password for mypfx.pfx file from $OldPwd to $NewPwd.


 

PS C:\> $NewPwd = ConvertTo-SecureString -String "abcd" -Force –AsPlainText

 

PS C:\> $mypfx = Get-PfxData –FilePath C:\mypfx.pfx -Password $Oldpwd

 

PS C:\> Export-PfxCertificate -PfxData $mypfx –FilePath C:\mypfx.pfx -Password $NewPwd –Force

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft