In this article, we will discuss how to check the available extension available for azure virtual machine and also how to check the installed extension on a virtual machine.

What is Virtual Machine Extension?

From msdn - Azure virtual machine extensions are small applications that provide post-deployment configuration and automation tasks on Azure virtual machines. Azure VM extensions can be run by using the Azure CLI, PowerShell, Azure Resource Manager templates, and the Azure portal.

If you require an Antivirus, docker configuration etc. then we can install these as an extension to our virtual machine after creation.

So, we can check the all available extensions to virtual machine using the cmdlet -

Get-AzureVMAvailableExtension | Select ExtensionName, Publisher, CompanyName, Description | Out-gridView

Press Enter.

A window will pop up with available extensions for a virtual machine.

If we want to check the extension installed at a particular virtual machine, then we can write the command with our VM name like –

$vm = Get-AzureVM -ServiceName "kkazurevm01" -Name "kkazurevm01"
Get-AzureVMExtension -VM $VM | select ExtensionName, Publisher, Version

It will tell us what extensions are installed on your VM. From the above image, we can see that in the virtual machine extension ‘BGInfo’ is installed by default.

So, using these few commands we can get the information about the virtual machine extension.