Skip to content

Latest commit

 

History

History
132 lines (92 loc) · 3.67 KB

File metadata and controls

132 lines (92 loc) · 3.67 KB
external help file Microsoft.PowerShell.PSResourceGet.dll-Help.xml
Module Name Microsoft.PowerShell.PSResourceGet
ms.custom 1.2.0-p5
ms.date 03/18/2026
online version https://learn.microsoft.com/powershell/module/microsoft.powershell.psresourceget/get-psresourcerepository?view=powershellget-3.x&WT.mc_id=ps-gethelp
schema 2.0.0

Get-PSResourceRepository

SYNOPSIS

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: System.String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: True

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.String[]

OUTPUTS

Microsoft.PowerShell.PSResourceGet.UtilClasses.PSRepositoryInfo

NOTES

RELATED LINKS

Set-PSResourceRepository

Reset-PSResourceRepository

Register-PSResourceRepository

Unregister-PSResourceRepository