Get-PfxCertificate
Gets information about PFX certificate files on the computer.
구문
ByPath (기본값)
Get-PfxCertificate
[-FilePath] <String[]>
[<CommonParameters>]
ByLiteralPath
Get-PfxCertificate
-LiteralPath <String[]>
[<CommonParameters>]
Description
The Get-PfxCertificate
cmdlet gets an object representing each specified PFX certificate file.
A PFX file includes both the certificate and a private key.
예제
Example 1: Get a PFX certificate
Get-PfxCertificate -FilePath "C:\windows\system32\Test.pfx"
Password: ******
Signer Certificate: David Chew (Self Certificate)
Time Certificate:
Time Stamp:
Path: C:\windows\system32\zap.pfx
This command gets information about the Test.pfx certificate file on the system.
Example 2: Get a PFX certificate from a remote computer
Invoke-Command -ComputerName "Server01" -ScriptBlock {Get-PfxCertificate -FilePath "C:\Text\TestNoPassword.pfx"} -Authentication CredSSP
This command gets a PFX certificate file from the Server01 remote computer. It uses Invoke-Command
to run a Get-PfxCertificate
command remotely.
When the PFX certificate file is not password-protected, the value of the Authentication
parameter of Invoke-Command
must be CredSSP.
매개 변수
-FilePath
Specifies the full path to the PFX file of the secured file. If you specify a value for this
parameter, it is not necessary to type -FilePath
at the command line.
매개 변수 속성
형식: | String[] |
Default value: | None |
와일드카드 지원: | False |
DontShow: | False |
매개 변수 집합
ByPath
Position: | 0 |
필수: | True |
파이프라인의 값: | True |
속성 이름별 파이프라인의 값: | True |
나머지 인수의 값: | False |
-LiteralPath
The full path to the PFX file of the secured file. Unlike FilePath, the value of the LiteralPath parameter is used exactly as it is typed. No characters are interpreted as wildcards. If the path includes escape characters, enclose it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences.
매개 변수 속성
형식: | String[] |
Default value: | None |
와일드카드 지원: | False |
DontShow: | False |
별칭: | PSPath |
매개 변수 집합
ByLiteralPath
Position: | Named |
필수: | True |
파이프라인의 값: | False |
속성 이름별 파이프라인의 값: | True |
나머지 인수의 값: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
입력
String
You can pipe a string that contains a file path to Get-PfxCertificate
.
출력
X509Certificate2
Get-PfxCertificate
returns an object for each certificate that it gets.
참고
When using the Invoke-Command
cmdlet to run a Get-PfxCertificate
command remotely, and the PFX
certificate file is not password protected, the value of the Authentication parameter of
Invoke-Command
must be CredSSP.