您現(xiàn)在訪問(wèn)的是微軟AZURE全球版技術(shù)文檔網(wǎng)站,若需要訪問(wèn)由世紀(jì)互聯(lián)運(yùn)營(yíng)的MICROSOFT AZURE中國(guó)區(qū)技術(shù)文檔網(wǎng)站,請(qǐng)?jiān)L問(wèn) https://docs.. 使用 PowerShellGet 在 Windows 上安裝 Azure PowerShell本文介紹了在 Windows 環(huán)境中使用 PowerShellGet 安裝 Azure PowerShell 模塊的步驟。 PowerShellGet 和模塊管理是安裝 Azure PowerShell 的首選方法,但是如果希望使用 Web 平臺(tái)安裝程序或 MSI 包進(jìn)行安裝,請(qǐng)參閱其他安裝方法。 有關(guān)如何在其他平臺(tái)上安裝 Azure PowerShell 的說(shuō)明,請(qǐng)參閱在 macOS 和 Linux 上安裝和配置 Azure PowerShell。 此版 Azure PowerShell 不支持 Azure 經(jīng)典部署模型。 若要獲取經(jīng)典部署的支持,請(qǐng)按安裝 Azure PowerShell 服務(wù)管理模塊中的說(shuō)明操作。 要求從 Azure PowerShell 版本 6.0 開(kāi)始,Azure PowerShell 需要 PowerShell 版本 5.0。 若要查看在計(jì)算機(jī)上運(yùn)行的 PowerShell 的版本,請(qǐng)運(yùn)行以下命令: PowerShell
如果版本已過(guò)時(shí),請(qǐng)參閱升級(jí)現(xiàn)有的 Windows PowerShell。 重要 本文檔中介紹的模塊 AzureRM 使用 .NET Framework。 這使得它與使用 .NET Core 的 PowerShell 6.0 兼容。 如果使用的是 PowerShell 6.0,請(qǐng)遵循適用于 macOS 和 Linux 的安裝說(shuō)明。 安裝 Azure Powershell 模塊需要提升的權(quán)限才能通過(guò) PowerShell 庫(kù)安裝模塊。 若要安裝 Azure PowerShell,請(qǐng)?jiān)谝烟嵘龣?quán)限的會(huì)話中運(yùn)行以下命令: PowerShell
備注 如果使用的 NuGet 版本低于 2.8.5.201,系統(tǒng)會(huì)提示下載并安裝最新版本的 NuGet。 默認(rèn)情況下,PowerShell 庫(kù)未配置為 PowerShellGet 的受信任存儲(chǔ)庫(kù)。 首次使用 PSGallery 時(shí)會(huì)看到以下提示: output
請(qǐng)回答
登錄若要開(kāi)始使用 Azure PowerShell,需使用 Import-Module cmdlet 將 PowerShell
需對(duì)每個(gè)啟動(dòng)的新 PowerShell 會(huì)話重復(fù)這些步驟。 自動(dòng)導(dǎo)入 更新 Azure PowerShell 模塊可以通過(guò)運(yùn)行 Update-Module 來(lái)更新 Azure PowerShell 安裝。 此命令不卸載以前的版本。 PowerShell
若要從系統(tǒng)中刪除舊版 Azure PowerShell,請(qǐng)參閱卸載 Azure PowerShell 模塊。 使用多個(gè)版本的 Azure PowerShell可以安裝多個(gè)版本的 Azure PowerShell。 如果使用本地 Azure Stack 資源、運(yùn)行不能更新到 PowerShell 5.0 的舊版 Windows,或者使用 Azure 經(jīng)典部署模型,則可能需要多個(gè)版本。 若要安裝舊版本,請(qǐng)?jiān)诎惭b時(shí)提供 PowerShell
加載 Azure PowerShell 模塊時(shí),默認(rèn)加載最新版本。 若要加載另一版本,請(qǐng)?zhí)峁? PowerShell
提供反饋如果在使用 Azure Powershell 時(shí)發(fā)現(xiàn) Bug,請(qǐng)在 GitHub 上提出問(wèn)題。 若要從命令行提供反饋,請(qǐng)使用 Send-Feedback cmdlet。 后續(xù)步驟若要開(kāi)始使用 Azure PowerShell,請(qǐng)參閱 Azure PowerShell 入門(mén),詳細(xì)了解此模塊及其功能。 |
|
來(lái)自: ar135 > 《待分類(lèi)PC》