Nick's Blog

Azure PowerShell Virtual Machine is missing provisioning configuration


When you use PowerShell to create VM in Azure and join the vm into the specific domain. You may end up getting the following error:

1
Virtual Machine is missing provisioning configuration

This error normanlly occurred parameters missing or wrong parameter within command Add-AzureProvisioningConfig

Because of the Azure stuff getting update real fast in the real world, therefore the documentation may lag as well. The following script is the one I’ve test and work recently.

1
2
3
4
Add-AzureProvisioningConfig -VM $vm `
-WindowsDomain -JoinDomain $joinDomain -Domain $domain -DomainUserName $domainCred.GetNetworkCredential().UserName -DomainPassword $domainCred.GetNetworkCredential().Password `
-Adminusername $vmcred.GetNetworkCredential().UserName -Password $vmcred.GetNetworkCredential().Password `
-MachineObjectOU $machineObjectOU

Make sure that you have AdminUserName parameter even though you may not need it.