次の方法で共有


Get-PSResourceRepository

登録済みのリポジトリ情報を検索して返します。

構文

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

説明

このコマンドレットは、マシンに登録されている 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 パラメーターを使用して名前付き 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

パラメーター

-Name

検索するリポジトリの名前。 ワイルドカードを利用できます。 このパラメーターのタブ補完は、登録済みのリポジトリ名を順番に表示します。

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

入力

String[]

出力

Microsoft.PowerShell.PSResourceGet.UtilClasses.PSRepositoryInfo