Import-Certificate
Import-Certificate
Imports one or more certificates into a certificate store.
구문
Parameter Set: Default
Import-Certificate [-FilePath] <String> [-CertStoreLocation <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
자세한 설명
The Import-Certificate cmdlet imports one or more certificates into a certificate store.
매개 변수
-CertStoreLocation<String>
Specifies the path to the certificate store where the certificates will be imported. If the path to the certificate store is not specified, then the current store is used.
별칭 |
없음 |
필수 여부 |
false |
위치 |
named |
기본값 |
. |
파이프라인 입력 적용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-FilePath<String>
Specifies the path to a certificate file to be imported. Acceptable formats include .sst, .p7b, and .cert files. If the file contains multiple certificates, then each certificate will be imported to the destination store.
별칭 |
없음 |
필수 여부 |
true |
위치 |
1 |
기본값 |
없음 |
파이프라인 입력 적용 여부 |
true (ByPropertyName) |
와일드카드 문자 허용 여부 |
false |
-Confirm
cmdlet을 실행하기 전에 확인 메시지가 표시됩니다.
필수 여부 |
false |
위치 |
named |
기본값 |
false |
파이프라인 입력 적용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-WhatIf
cmdlet이 실행될 경우 결과 동작을 표시합니다. cmdlet이 실행되지 않습니다.
필수 여부 |
false |
위치 |
named |
기본값 |
false |
파이프라인 입력 적용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
<CommonParameters>
이 cmdlet은 일반 매개 변수 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer 및 -OutVariable을 지원합니다. 자세한 내용은 다음을 참조하세요. about_CommonParameters(https://go.microsoft.com/fwlink/p/?LinkID=113216).
입력
입력 유형은 cmdlet에 파이프할 수 있는 개체의 유형입니다.
System.String
A String containing the file path.
출력
출력 유형은 cmdlet이 내보내는 개체의 유형입니다.
System.Security.Cryptography.X509Certificates.X509Certificate2[]
The output is an array of X509Certificate2[] objects.
예제
EXAMPLE 1
This example imports the certificate from the file into the root store of the current user.
PS C:\> $file = ( Get-ChildItem -Path C:\files\root.cer )
PS C:\> $file | Import-Certificate -CertStoreLocation cert:\CurrentUser\Root
EXAMPLE 2
This example imports the certificate from the file into the current store.
PS C:\> Set-Location -Path cert:\CurrentUser\My
PS C:\> Import-Certificate -Filepath "C:\files\intermediate.cert"