PowerShell Logo Small

Get-PfxData



This is the built-in help made by Microsoft for the command 'Get-PfxData', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

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

SYNTAX


Get-PfxData [-FilePath] <String> [-Password <SecureString>] [<CommonParameters>]



Search powershellhelp.space

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.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/p/?linkid=287532
ConvertTo-SecureString
Export-PfxCertificate

REMARKS

<

Examples


EXAMPLE 1

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



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



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




EXAMPLE 2

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



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