Azure vm connection error through RDP

Mohamed Sulthan 0 Reputation points

while connecting vm through rdp it is showing this error: the user account is currently disabled and cannot be used. And error cdoe:0xb07, extended error code: 0x0. How to fix this?
User's image

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
6,332 questions
Azure Virtual Desktop
Azure Virtual Desktop
A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.
1,245 questions
Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
3,987 questions
Azure Virtual Machine Scale Sets
Azure Virtual Machine Scale Sets
Azure compute resources that are used to create and manage groups of heterogeneous load-balanced virtual machines.
313 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Andriy Bilous 10,381 Reputation points MVP

    Hello @Mohamed Sulthan

    If you are trying to login a new Azure Windows VM, try following steps:

    1. On the virtual machine page, head over to Run command
    2. Click on EnableAdminAccount
    3. Run the cmdlet
    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

    If the VM was uploaded from on premise source, you would need to add a SetupComplete2.cmd and EnableLocalAdminAccount.ps1 in C:/Windows/OEM to unlock the user account automatically upon VM creation. Strangely enough this does not appear on anywhere on Microsoft's guideline on how to migrate a on-prem VM to Azure, but the official windows image from the Marketplace do have those 2 files that are run after Sysprep.

    This blog article was also very useful and points towards the creation of a SetupComplete2.cmd

    Additional information

    0 comments No comments