인증서에 대한 New-Item

업데이트 날짜: 2014년 10월

적용 대상: Windows PowerShell 4.0, Windows PowerShell 5.0

LocalMachine 저장소 위치에 새 인증서 저장소를 만듭니다.

구문

New-Item [-Path] <string[]> [-Name <string>] [-Confirm] [-WhatIf] [<CommonParameters>]

New-Item [-Path] <string[]> [-Confirm] [-WhatIf] [<CommonParameters>]

설명

Cert: 드라이브에서 New-Item cmdlet은 LocalMachine 인증서 저장소 위치에 새 인증서 저장소를 만듭니다. Windows PowerShell 인증서 공급자는 Windows PowerShell에 Cert: 드라이브를 추가합니다.

Windows PowerShell 3.0부터 인증서 공급자에서 New-Item cmdlet을 사용하여 새 인증서 저장소를 만들 수 있습니다. 만든 인증서 저장소를 Remove-Item cmdlet으로 삭제할 수도 있습니다. 인증서 또는 인증서 저장소 위치를 만들거나 CurrentUser 인증서 저장소 위치에 인증서 저장소를 만드는 데는 New-Item cmdlet을 사용할 수 없습니다.

참고: Cert: 드라이브에서는 New-Item의 Name, Path, WhatIf 및 Confirm 매개 변수만 사용할 수 있습니다. 다른 모든 매개 변수 및 매개 변수 값은 무시됩니다.

매개 변수

-Name <string>

새 인증서 저장소의 이름을 지정합니다. Name 매개 변수를 사용하거나 Path 매개 변수 값에 해당 이름을 포함할 수 있습니다.

필수 여부

false

위치

명명됨

기본값

파이프라인 입력 적용 여부

true (ByPropertyName)

와일드카드 문자 허용 여부

false

-Path <string[]>

새 인증서 저장소에 대한 전체 또는 상대 경로를 지정합니다. 경로에 인증서 저장소의 이름을 포함하거나 Name 매개 변수를 사용하여 이름을 지정할 수 있습니다.

필수 여부

true

위치

1

기본값

파이프라인 입력 적용 여부

true (ByPropertyName)

와일드카드 문자 허용 여부

false

-Confirm

명령을 실행하기 전에 확인을 요청하는 메시지가 표시됩니다.

필수 여부

false

위치

명명됨

기본값

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-WhatIf

명령을 실제로 실행하지 않으면서 명령을 실행할 경우 어떻게 되는지 설명해 보세요.

필수 여부

false

위치

명명됨

기본값

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

<CommonParameters>

이 cmdlet은 일반 매개 변수 -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, -OutVariable, -Verbose, -WarningAction 및 -WarningVariable을 지원합니다. 자세한 내용은 about_CommonParameters를 참조하세요.

입력 및 출력

입력 유형은 cmdlet에 파이프할 수 있는 개체의 유형입니다. 반환 유형은 cmdlet에서 반환되는 개체의 유형입니다.

입력

출력

System.Security.Cryptography.X509Certificates.X509Store

New-Item은 새 인증서 저장소를 나타내는 X509Store 개체를 반환합니다.

참고

-- Windows PowerShell 3.0부터 Cert: 드라이브를 포함하는 Microsoft.PowerShell.Security 모듈을 모든 세션으로 자동으로 가져올 수 없습니다. Cert: 드라이브를 사용하려면 Import-Module cmdlet을 사용하여 모듈을 가져오거나 Cert: 드라이브를 사용하는 명령(예: "Set-Location Cert:")을 실행합니다.

-- Cert: 드라이브에서 ItemType 매개 변수는 무시됩니다. 인증서 저장소를 만들려면 항목 종류를 지정할 필요가 없습니다.

예제 1

C:\PS>New-Item -Path Cert:\LocalMachine\TestStore

Name : TestStore

Description
-----------
This command uses the New-Item cmdlet to create the "TestStore" certificate store in the LocalMachine store location. 

The command returns a System.Security.Cryptography.X509Certificates.X509Store that represents the new certificate store.





예제 2

C:\PS>New-Item -Path Cert:\LocalMachine -Name TestStore

Name : TestStore

Description
-----------
This command uses the New-Item cmdlet to create the "TestStore" certificate store in the LocalMachine store location. It is identical to the previous command, but it uses the Name parameter to specify the store name, instead of the Path parameter. The effect is identical.





예제 3

C:\PS>Invoke-Command -ComputerName Server01 { New-Item -Path Cert:\LocalMachine\TestStore }

Description
-----------
This command creates the TestStore certificate store on the Server01 remote computer. It uses the Invoke-Command cmdlet to run the New-Item command remotely.





See Also

Concepts

인증서 공급자

Other Resources

Get-ChildItem
Get-Item
Get-PSDrive
Move-Item
Remove-Item