Get-PfxData

Get-PfxData

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

構文

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

詳細説明

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.

パラメーター

-FilePath<String>

Specifies the path to the PFX file.

Aliases

FullName

必須/オプション

true

位置

1

既定値

none

パイプライン入力の受け入れ

true (ByPropertyName)

ワイルドカード文字の受け入れ

false

-Password<SecureString>

Specifies the password for the imported PFX file.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

<CommonParameters>

このコマンドレットは共通のパラメーターをサポートしています(-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、および -OutVariable)。詳細については、TechNet の「 「about_CommonParameters」 (https://go.microsoft.com/fwlink/p/?LinkID=113216) を参照してください。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

  • System.String

    A string containing the path to PFX file.

出力

出力型は、コマンドレットが出力するオブジェクトの型です。

  • Microsoft.CertificateServices.Commands.PFXData

    A PFXData object.

使用例

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

関連項目

Export-PfxCertificate

ConvertTo-SecureString