| 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 |
Finds and returns registered repository information.
Get-PSResourceRepository [[-Name] <String[]>] [<CommonParameters>]
This cmdlet searches for PowerShell resource repositories that are registered on the machine. By default, it returns all registered repositories.
This example returns all the repositories registered on the machine.
Get-PSResourceRepositoryName 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
This example uses the Name parameter to get a specific repository.
Get-PSResourceRepository -Name PSGalleryName Uri Trusted Priority
---- --- ------- --------
PSGallery https://www.powershellgallery.com/api/v2 False 50
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
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
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: TrueThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.