Applying And Removing A Hybrid Use Benefit License For An Existing Azure VM With PowerShell

The Azure Hybrid use Benefit is a quick and easy way to save money on Windows Virtual Machines in Azure. It applies our on-prem licenses to the Azure virtual machines and reduces the cost because we already have a license. It’s a great benefit but it can be laborious to apply the benefit to many virtual machines. This is where PowerShell comes in. In this topic, we quickly create a couple of simple functions to add and remove the hybrid use license for existing machines. This makes it very easy, and scalable, to swap the benefit from one machine to another.

Prerequisites include: An Azure Subscription An Azure Virtual Machine The AzureRM modules loaded