Get-PfxData
업데이트 날짜: 2015년 9월
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.
별칭 |
FullName |
필수 여부 |
true |
위치 |
1 |
기본값 |
none |
파이프라인 입력 허용 여부 |
true (ByPropertyName) |
와일드카드 문자 허용 여부 |
false |
-Password<SecureString>
Specifies the password for the imported PFX file.
별칭 |
none |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
<CommonParameters>
이 cmdlet은 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, -OutVariable 등의 일반 매개 변수를 지원합니다. 자세한 내용은 TechNet의 about_CommonParameters(https://go.microsoft.com/fwlink/p/?LinkID=113216)
입력
입력 형식은 cmdlet으로 파이프할 수 있는 개체의 형식입니다.
System.String
A string containing the path to PFX file.
출력
출력 형식은 cmdlet 실행 시 출력되는 개체의 형식입니다.
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