次の方法で共有


Get-PSRepository

Gets PowerShell repositories.

構文

Default (既定)

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

説明

The Get-PSRepository cmdlet gets PowerShell module repositories that are registered for the current user.

This is a proxy cmdlet for the Get-PSResourceRepository cmdlet in the Microsoft.PowerShell.PSResourceGet. For more information, see Get-PSResourceRepository.

Example 1: Get all module repositories

Get-PSRepository

This command gets all module repositories registered for the current user.

Example 2: Get module repositories by name

Get-PSRepository -Name "*NuGet*"

This command gets all module repositories that include NuGet in their names.

Example 3: Get a module repository and format the output

Get-PSRepository -Name "Local01" | Format-List * -Force
Name                      : local01
SourceLocation            : http://manikb-dev:8765/api/v2/
Trusted                   : True
Registered                : True
InstallationPolicy        : Trusted
PackageManagementProvider : NuGet
PublishLocation           : http://pattif-dev:8765/api/v2/package/
ScriptSourceLocation      : http://pattif-dev:8765/api/v2/artifacts/psscript
ScriptPublishLocation     : http://pattif-dev:8765/api/v2/package/
ProviderOptions           : {}

This command gets the repository named Local01 and uses the pipeline operator to pass that object to the Format-List cmdlet.

パラメーター

-Name

Specifies the names of the repositories to get.

パラメーターのプロパティ

型:

String[]

規定値:None
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

(All)
配置:0
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:True
残りの引数からの値:False

CommonParameters

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

入力

String

出力

Object