Get-PSResourceRepository 
	查找并返回已注册的存储库信息。
语法
Default (默认值)
Get-PSResourceRepository
    [[-Name] <String[]>]
    [<CommonParameters>]
说明
此 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
要搜索的存储库的名称。 支持通配符。 此参数的 Tab 补全会循环访问已注册的存储库名称。
参数属性
| 类型: | String[] | 
| 默认值: | None | 
| 支持通配符: | True | 
| 不显示: | False | 
参数集
(All)
| Position: | 0 | 
| 必需: | False | 
| 来自管道的值: | True | 
| 来自管道的值(按属性名称): | False | 
| 来自剩余参数的值: | False | 
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。