Azure for Architects
上QQ阅读APP看书,第一时间看更新

PowerShell

PowerShell is an object-based command-line shell and scripting language used for the administration, configuration, and management of infrastructure and environments. It is built on top of the .NET framework and provides automation capabilities. PowerShell has truly become a first-class citizen among IT administrators and automation developers for managing and controlling the Windows environment. Today, almost every Windows and many Linux environments can be managed by PowerShell. In fact, almost every aspect of Azure can also be managed by PowerShell. Azure provides rich support for PowerShell. It provides a PowerShell module for each resource provider containing hundreds of cmdlets. Users can use these cmdlets in their scripts to automate interaction with Azure. The Azure PowerShell module is available through the web platform installer on as well as through the PowerShell Gallery. Windows Server 2016 and Windows 10 provide package management and PowerShellGet modules for quick and easy downloading, and installation of PowerShell modules from the PowerShell gallery. The PowerShellGet module provides the Install-Module cmdlet for downloading and installing modules on the system.

Installing a module is a simple act of copying the module files at well-defined module locations that can be done as follows:

Import-module PowerShellGet
Install-Module -Name AzureRM -verbose