다음을 통해 공유


Get-PSResourceRepository

등록된 리포지토리 정보를 찾아 반환합니다.

Syntax

Get-PSResourceRepository
   [[-Name] <String[]>]
   [<CommonParameters>]

Description

이 cmdlet은 컴퓨터에 등록된 PowerShell 리소스 리포지토리를 검색합니다. 기본적으로 등록된 모든 리포지토리를 반환합니다.

예제

예 1

이 예제에서는 컴퓨터에 등록된 모든 리포지토리를 반환합니다.

Get-PSResourceRepository

Name             Uri                                          Trusted   Priority
----             ---                                          -------   --------
PoshTestGallery  https://www.poshtestgallery.com/api/v2          True         40
PSGallery        https://www.powershellgallery.com/api/v2       False         50
psgettestlocal   file:///c:/code/testdir                         True         50

예제 2

이 예제에서는 Name 매개 변수를 사용하여 특정 리포지토리를 가져옵니다.

Get-PSResourceRepository -Name PSGallery

Name         Uri                                        Trusted   Priority
----         ---                                        -------   --------
PSGallery    https://www.powershellgallery.com/api/v2     False         50

예제 3

이 예제에서는 Name 매개 변수를 사용하여 로 끝나는 모든 리포지토리를 Gallery가져옵니다.

Get-PSResourceRepository -Name "*Gallery"

Name             Uri                                          Trusted   Priority
----             ---                                          -------   --------
PoshTestGallery  https://www.poshtestgallery.com/api/v2          True         40
PSGallery        https://www.powershellgallery.com/api/v2       False         50

예제 4

이 예제에서는 Name 매개 변수를 사용하여 명명된 리포지토리 목록을 가져옵니다.

Get-PSResourceRepository -Name "PSGallery","PoshTestGallery"

Name             Uri                                          Trusted   Priority
----             ---                                          -------   --------
PoshTestGallery  https://www.poshtestgallery.com/api/v2          True         40
PSGallery        https://www.powershellgallery.com/api/v2       False         50

매개 변수

-Name

검색할 리포지토리의 이름입니다. 와일드카드가 지원됩니다. 이 매개 변수에 대한 탭 완성은 등록된 리포지토리 이름을 순환합니다.

Type:String[]
Position:0
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:True

입력

String[]

출력

Microsoft.PowerShell.PSResourceGet.UtilClasses.PSRepositoryInfo