Get-PSResourceRepository

Finds and returns registered repository information.

Syntax

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

Description

This cmdlet searches for PowerShell resource repositories that are registered on the machine. By default, it returns all registered repositories.

Examples

Example 1

This example returns all the repositories registered on the machine.

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

Example 2

This example uses the Name parameter to get a specific repository.

Get-PSResourceRepository -Name PSGallery

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

Example 3

This example uses the Name parameter to get all repositories that end with 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

Example 4

This example uses the Name parameter to get a list of named respositories.

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

Parameters

-Name

The name of the repository to search for. Wildcards are supported. Tab completion for this parameter cycles through the registered repository names.

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

Inputs

String[]

Outputs

Microsoft.PowerShell.PSResourceGet.UtilClasses.PSRepositoryInfo