Using Azure Powershell create a new VM using my own Vhd based on the tutorial: https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-create-upload-vhd-windows-server/
When try to connect to the VM it pops the error:
The user account is currently disabled and cannot be used.
Below is the scripts for creating the VM
#create the vm using the image
$image = Get-AzureVMImage $MyImage
$vmname = "Test-Machine"
$vmsize = "Large"
$vm1=New-AzureVMConfig -Name $vmname -InstanceSize $vmsize -ImageName $image.imageName
$vm1 | Add-AzureProvisioningConfig -Windows -AdminUsername $username -Password $password
New-AzureVM –ServiceName $myServiceName -VMs $vm1
I just ran into this issue as well, trying to login a fresh Azure Windows 10 virtual machine.
You can fix this issue by:
You should see something like:
Admin account was disabled. Enabling the Admin account.
Path : \\localhost\root\cimv2:Win32_UserAccount.Domain="PaoloWin10",Name="PaoloUser"
RelativePath : Win32_UserAccount.Domain="PaoloWin10",Name="PaoloUser"
Server : localhost
NamespacePath : root\cimv2
ClassName : Win32_UserAccount
IsClass : False
IsInstance : True
IsSingleton : False
You should now be able to login in the virtual machine successfully.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With