Compartilhar via


Get-PSResourceRepository

Localiza e retorna informações do repositório registrado.

Syntax

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

Description

Esse cmdlet pesquisa repositórios de recursos do PowerShell registrados no computador. Por padrão, ele retorna todos os repositórios registrados.

Exemplos

Exemplo 1

Este exemplo retorna todos os repositórios registrados no computador.

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

Exemplo 2

Este exemplo usa o parâmetro Name para obter um repositório específico.

Get-PSResourceRepository -Name PSGallery

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

Exemplo 3

Este exemplo usa o parâmetro Name para obter todos os repositórios que terminam com 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

Exemplo 4

Este exemplo usa o parâmetro Name para obter uma lista de repositórios nomeados.

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

Parâmetros

-Name

O nome do repositório a ser pesquisado. Há suporte para caracteres curinga. A conclusão de tabulação para esse parâmetro percorre os nomes de repositório registrados.

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

Entradas

String[]

Saídas

Microsoft.PowerShell.PSResourceGet.UtilClasses.PSRepositoryInfo