Get-PSRepository
PowerShell 리포지토리를 가져옵니다.
구문
Default (기본값)
Get-PSRepository
[[-Name] <String[]>]
[<CommonParameters>]
Description
Get-PSRepository cmdlet은 현재 사용자에 대해 등록된 PowerShell 모듈 리포지토리를 가져옵니다.
예제
예제 1: 모든 모듈 리포지토리 가져오기
PS C:\> Get-PSRepository
Name SourceLocation OneGetProvider InstallationPolicy
---- -------------- -------------- ------------------
PSGallery http://go.micro... NuGet Untrusted
myNuGetSource https://myget.c... NuGet Trusted
이 명령은 현재 사용자에 대해 등록된 모든 모듈 리포지토리를 가져옵니다.
예제 2: 이름으로 모듈 리포지토리 가져오기
PS C:\> Get-PSRepository -Name "*NuGet*"
이 명령은 이름에 NuGet을 포함하는 모든 모듈 리포지토리를 가져옵니다.
예제 3: 모듈 리포지토리 가져오기 및 출력 형식 지정
PS C:\> Get-PSRepository -Name "Local01" | Format-List * -Force
Name : local01
SourceLocation : http://manikb-dev:8765/api/v2/
Trusted : True
Registered : True
InstallationPolicy : Trusted
PackageManagementProvider : NuGet
PublishLocation : http://pattif-dev:8765/api/v2/package/
ScriptSourceLocation : http://pattif-dev:8765/api/v2/artifacts/psscript
ScriptPublishLocation : http://pattif-dev:8765/api/v2/package/
ProviderOptions : {}
이 명령은 Local01이라는 리포지토리를 가져오고 파이프라인 연산자를 사용하여 해당 개체를 Format-List cmdlet에 전달합니다.
매개 변수
-Name
가져올 리포지토리의 이름을 지정합니다.
매개 변수 속성
| 형식: | String[] |
| Default value: | None |
| 와일드카드 지원: | False |
| DontShow: | False |
매개 변수 집합
(All)
| Position: | 0 |
| 필수: | False |
| 파이프라인의 값: | False |
| 속성 이름별 파이프라인의 값: | True |
| 나머지 인수의 값: | False |
CommonParameters
이 cmdlet은 일반적인 매개 변수인 -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction 및 -WarningVariable 매개 변수를 지원합니다. 자세한 내용은 about_CommonParameters를 참조하세요.