微軟發布Azure PowerShell 1.0,如何安裝和導入
微軟已經正式 RTM 了 Azure PowerShell 1.0,此次 1.0 版本的重大更新已經正式開始支持 Azure 全新的資源部署模型。Azure Resource Manager (ARM)資源管理器為 IT Pro 提供了不同于經典部署方式的全新 Azure 資源部署模型。在新的部署模型下,虛擬機和網站都不再依賴于云服務并用資源組作為容器進行了替代。資源組可將所有應用程序的組件部署和管理統一為一個整體,以方便用戶以更為簡便的方式在云中運營應用。
Microsoft Azure 博客中列出了 Azure PowerShell 1.0 的如下新特性和變化:
◆支持 Azure Automation 中的資源管理器(Resource Manager)
◆單獨的 Azure 服務管理和資源管理器功能,以提供清晰的 Azure cmdlet
◆采用強語義化的 cmdlet,以保證 Azure PowerShell 升級不會給用戶帶來太大變化
◆Azure PowerShell 文檔改進
◆Azure 資源管理器支持證書認證
◆可使用 Azure Key Vault 進行虛擬機磁盤加密
◆介紹了Azure Data Lake 及 Notification Hub 相關 cmdlet
◆針對資源管理器、Web 應用及其它 Azure 服務方面的許多改進
安裝Azure PowerShell 1.0
Azure PowerShell 1.0 依賴于 Windows Management Framework (WMF) 5.0,其只被 Windows 10 系統默認集成,要下載或獲取 WMF5.0 的更多信息,請參閱 Microsoft 的網站。
接下來安裝 Azure PowerShell 1.0 RTM 與之前安裝預覽版的步驟是一樣的,大家可以參考我之前的文章。或直接按如下步驟操作:
使用 PowerShellGet 安裝 Azure PowerShell 1.0 的命令如下:
- # 通過 PowerShell Gallery 安裝 Azure Resource Manager modules
- Install-Module AzureRM
- Install-AzureRM
- # 通過 PowerShell Gallery 安裝 Azure Service Management module
- Install-Module Azure
完成 Azure PowerShell 1.0 安裝之后,即可導入 Azure 和 AzureRM modules。
- # 導入 AzureRM.* modules
- Import-AzureRM
- # 單獨導入 AzureRM module
- Import-Module AzureRM.Compute
- # 導入 Azure Service Management
- Import-Module Azure
【編輯推薦】