Azure Powershell
- For installing Azure Powershell Refer Here
- For executing Azure Powershell we need powershell version 5.1 .
- Use CloudShell if you dont have powershell version 5.1
- Launch Powershell as Administrator
Install-Module -Name PowerShellGet -Force
Install-Module -Name Az -AllowClobber -Scope AllUsers
- For Powershell basics Refer Here
- All the commandlets of Azure Powershell module will be in the form of
<verb>-Az<noun>
Get-AzResourceGroup
New-AzVM
- Now connect to azure using a cmdlet
Connect-AzAccount - Tips for powershell:
- Ensure Powershell Extension for Visual Studio Code is enabled
- Lets create a azure linux virtual machine and azure windows vm using Azure Powershell Refer Here for windows vm creation
- Steps:
- Create a Resource Group:
- Find the appropriate paramters
- Refer Here for the powershell script used in the class
- Exercise:
- Create a Windows server as specified above
- Create a Linux VM in the same virtual network and subnet as what is created for windows Refer Here for reference
