Tuesday, December 3, 2019

Azure PowerShell installation & Configuration

Azure PowerShell Installation & Configurations

In this Module We will be learning Windows PowerShell installation, configurations, manage Azure using PowerShell commands.

We can manage Azure with many ways like Windows, Linux, macOS, ARM. Here we will be learning PowerShell Windows.
  • PowerShell Core on Window
  • PowerShell Core on Linux
  • PowerShell Core on macOS
  • PowerShell Core on ARM

Install the Azure PowerShell module- 

Azure PowerShell works with PowerShell 5.1 or higher on Windows, or PowerShell Core 6.x and later on all platforms. If you aren't sure if you have PowerShell, or are on macOS or Linux.

To check your PowerShell version, run the command:

PowerShell Command :

$PSVersionTable.PSVersion


To run Azure PowerShell in PowerShell 5.1 on Windows:  
Update to Windows PowerShell 5.1 if needed. If you're on Windows 10, you already have PowerShell 5.1 installed.
  1.  Install .NET Framework 4.7.2 or later.

There are no additional requirements for Azure PowerShell when using PowerShell Core.


Install the Azure PowerShell module -

The recommended install method is to only install for the active user:

PowerShell command

Install-Module -Name Az -AllowClobber -Scope CurrentUser





If you want to install for all users on a system, this requires administrator privileges. From an elevated PowerShell session either run as administrator or with the sudo command on macOS or Linux:
 

PowerShell command 
 
Install-Module -Name Az -AllowClobber -Scope AllUsers 


By default, the PowerShell gallery isn't configured as a trusted repository for PowerShellGet. The first time you use the PSGallery you see the following prompt:
 

output

Untrusted repository

You are installing the modules from an untrusted repository. If you trust this repository, change
its InstallationPolicy value by running the Set-PSRepository cmdlet.

Are you sure you want to install the modules from 'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"):

Answer Yes or Yes to All to continue with the installation.



The Az module is a rollup module for the Azure PowerShell cmdlets. Installing it downloads all of the available Azure Resource Manager modules, and makes their cmdlets available for use. 


PowerShell command 
 
Install-Module -Name Az -AllowClobber -Force

Click here for Free Azure Free Account -

No comments:

Post a Comment