Send Email Alerts when Azure VM is Shut down using PowerShell
In this page , I'll explains "Send email alerts if the Azure VMs is deallocated or stopped using PowerShell". This scenerio will help when Azure Virtual machines suddenly stopped due to netwok issue or data center is down. These type of issues we can't monitor every time,so i have explained below article to identifies when VM is stopped. Prerequisite : Powershell IDE AzureRm Module in powershell Gmail Account First we need to Azure Rm module: Open PowerShell from your local machine and install the Azure RM Module And Type the command "install-module azure rm" in your powershell command window By default it will give yes by typing [Y] to install NuGet Provider. Wait for 5 min. Azure Rm module installing. PowerShell commands to send email alerts: After sucessfully installing the AzureRm module, copy below powershell script into your local. Below code reads the all VM under in a specific resource group. PowerShell Script: Login-AzureRmAccount # Firs
Comments
Post a Comment