共用方式為


Open-PackagePage (Visual Studio 中的 封裝管理員 控制台)

在 3.0+中已被取代;僅適用於 Windows 上 Visual Studio 封裝管理員 主控台

使用指定套件的專案、授權或報告濫用URL來啟動預設瀏覽器。

語法

Open-PackagePage [-Id] <string> [-Version] [-Source] [-License] [-ReportAbuse]
    [-PassThru] [<CommonParameters>]

參數

參數 描述
Id 所需套件的套件識別碼。 -Id 參數本身是選擇性的。
版本 套件的版本,預設為最新版本。
來源 套件來源,預設為來源下拉式清單中的選取來源。
授權 開啟瀏覽器至套件的授權URL。 如果未指定 -License 和 -ReportAbuse,瀏覽器會開啟套件的專案 URL。
ReportAbuse 開啟瀏覽器至套件的「報告濫用 URL」。 如果未指定 -License 和 -ReportAbuse,瀏覽器會開啟套件的專案 URL。
PassThru 顯示 URL;與 -WhatIf 搭配使用,以隱藏開啟瀏覽器。

這些參數都不接受管線輸入或通配符。

一般參數

Open-PackagePage 支援下列 常見的 PowerShell 參數:D ebug、Error Action、ErrorVariable、OutBuffer、OutVariable、PipelineVariable、Verbose、WarningAction 和 WarningVariable。

範例

# Opens a browser with the Ninject package's project page
Open-PackagePage Ninject

# Opens a browser with the Ninject package's license page
Open-PackagePage Ninject -License

# Opens a browser with the Ninject package's report abuse page  
Open-PackagePage Ninject -ReportAbuse

# Assigns the license URL to the variable, $url, without launching the browser
$url = Open-PackagePage Ninject -License -PassThru -WhatIf