Windows PowerShell command on Get-command Get-PfxData
MyWebUniversity

Windows PowerShell command on Get-command Get-PfxData

NAME

Get-PfxData

SYNOPSIS

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

SYNTAX

Get-PfxData [-FilePath] [-Password ] []

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

Specifies the path to the PFX file. Required? true Position? 1 Default value none

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false

-Password []

Specifies the password for the imported PFX file. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

System.String A string containing the path to PFX file.

OUTPUTS

Microsoft.CertificateServices.Commands.PFXData A PFXData object.

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.

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/p/?linkid=287532

ConvertTo-SecureString

Export-PfxCertificate



Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 OurUNIX.com ™