How to Configure Windows Server 2016 for Azure Hybrid Benefit

Azure Hybrid Benefit is a licensing program from Microsoft that allows organizations to use their existing on-premises Windows Server licenses with Software Assurance to reduce costs when migrating workloads to Microsoft Azure. When you bring your own Windows Server license to Azure, you can save significantly on the compute costs of running Windows Server virtual machines in the cloud. This guide walks through the process of configuring Windows Server 2016 for Azure Hybrid Benefit, covering eligibility requirements, activation steps, and ongoing management.

Azure Hybrid Benefit applies to Windows Server Datacenter and Standard editions covered by active Software Assurance or Windows Server subscriptions. Each two-processor license with Software Assurance grants you the right to run up to 16 virtual cores in Azure, and Datacenter edition licenses additionally allow unlimited virtualization rights in Azure. Understanding this licensing model is critical before enabling the benefit to ensure compliance.

Prerequisites

Before configuring Azure Hybrid Benefit, confirm the following requirements are met. You must have an active Microsoft Azure subscription, Windows Server 2016 Datacenter or Standard licenses with active Software Assurance, and appropriate permissions to manage virtual machines in the Azure portal or via Azure CLI or PowerShell. You should also have the Azure PowerShell module installed on your management workstation or be able to use the Azure Cloud Shell.

To install the Azure PowerShell module on Windows Server 2016, open an elevated PowerShell prompt and run:

Install-Module -Name Az -AllowClobber -Scope AllUsers -Force

After installation, connect to your Azure account:

Connect-AzAccount

Enabling Azure Hybrid Benefit on a New VM

When deploying a new Windows Server 2016 virtual machine through the Azure portal, you can enable Azure Hybrid Benefit during the creation wizard. On the Basics tab, scroll to the Licensing section near the bottom. You will see the option “Would you like to use an existing Windows Server license?” Check the confirmation box that you have an eligible license with Software Assurance, then complete the VM creation as normal.

To deploy a new VM with Azure Hybrid Benefit using Azure PowerShell, use the following command structure. Replace the placeholder values with your actual resource group, VM name, location, and image details:

New-AzVm `
    -ResourceGroupName "MyResourceGroup" `
    -Name "MyWS2016VM" `
    -Location "EastUS" `
    -ImageName "Win2016Datacenter" `
    -LicenseType "Windows_Server" `
    -Size "Standard_D2s_v3" `
    -Credential (Get-Credential)

The key parameter here is -LicenseType “Windows_Server”. Setting this value activates Azure Hybrid Benefit for the virtual machine, instructing Azure to apply your on-premises license credit rather than charging the standard Windows Server license rate.

Enabling Azure Hybrid Benefit on an Existing VM

If you have already deployed a Windows Server 2016 virtual machine in Azure and want to apply the Hybrid Benefit retroactively, you can update the license type on the existing VM. This can be done through the Azure portal by navigating to the VM resource, selecting Configuration from the left-hand menu, and toggling the Azure Hybrid Benefit option.

To apply Azure Hybrid Benefit to an existing VM via PowerShell:

$vm = Get-AzVM -ResourceGroupName "MyResourceGroup" -Name "MyWS2016VM"
$vm.LicenseType = "Windows_Server"
Update-AzVM -ResourceGroupName "MyResourceGroup" -VM $vm

To verify the license type is correctly set after the update:

Get-AzVM -ResourceGroupName "MyResourceGroup" -Name "MyWS2016VM" | Select-Object Name, LicenseType

Applying Hybrid Benefit to Multiple VMs at Scale

For environments with many virtual machines, manually updating each VM is impractical. Use the following PowerShell script to apply Azure Hybrid Benefit to all Windows Server VMs in a resource group at once:

$vms = Get-AzVM -ResourceGroupName "MyResourceGroup"
foreach ($vm in $vms) {
    if ($vm.StorageProfile.OsDisk.OsType -eq "Windows") {
        $vm.LicenseType = "Windows_Server"
        Update-AzVM -ResourceGroupName "MyResourceGroup" -VM $vm
        Write-Host "Updated: $($vm.Name)"
    }
}

Verifying Compliance and Cost Savings

After enabling Azure Hybrid Benefit, you should verify that the licensing is correctly applied and that you are receiving the expected cost reduction. In the Azure portal, navigate to Cost Management + Billing, then select Cost Analysis. Filter by the service type “Virtual Machines” and review the meter details. VMs with Azure Hybrid Benefit applied will show the Windows Server compute rate without the additional license component.

You can also use Azure Policy to audit your environment and ensure all eligible VMs have Azure Hybrid Benefit enabled. Create a policy assignment using the built-in definition “Audit VMs that do not use Azure Hybrid Benefit”:

New-AzPolicyAssignment `
    -Name "AuditHybridBenefit" `
    -PolicyDefinition (Get-AzPolicyDefinition | Where-Object {$_.Properties.DisplayName -eq "Audit Windows VMs with no Azure Hybrid Benefit"}) `
    -Scope "/subscriptions/YOUR_SUBSCRIPTION_ID"

Hybrid Benefit for Azure Stack HCI and Azure VMware Solution

Azure Hybrid Benefit also extends beyond standard Azure IaaS virtual machines. If your organization uses Azure Stack HCI or Azure VMware Solution, you can apply your Windows Server licenses with Software Assurance to reduce or eliminate guest VM licensing costs on those platforms as well. The same eligibility rules apply: Datacenter edition with Software Assurance provides unlimited virtualization rights, while Standard edition licenses cover specific core counts.

To apply the benefit on Azure Stack HCI, the registration and licensing is managed through the Windows Admin Center or PowerShell. Ensure your Azure Stack HCI cluster is registered with Azure, then apply the Hybrid Benefit designation through the cluster’s billing properties in the Azure portal.

Removing Azure Hybrid Benefit

If a Windows Server license with Software Assurance expires or is no longer applicable to a specific VM, you must remove the Hybrid Benefit designation to maintain compliance. Use the following PowerShell command to revert a VM back to standard pay-as-you-go Windows Server licensing:

$vm = Get-AzVM -ResourceGroupName "MyResourceGroup" -Name "MyWS2016VM"
$vm.LicenseType = "None"
Update-AzVM -ResourceGroupName "MyResourceGroup" -VM $vm

Proper license tracking is essential when using Azure Hybrid Benefit. Microsoft may audit your Software Assurance entitlements, and it is the customer’s responsibility to ensure the number of Azure VMs covered by Hybrid Benefit does not exceed the number of licensed cores available under your Software Assurance agreements. Maintain accurate records of your on-premises licenses and periodically reconcile them against your Azure VM inventory to ensure ongoing compliance.