Azure Azure Compute

Azure Tip: Quickly find out if an Azure VM is domain joined or not via the Azure Portal


Not only can you run Windows Azure virtual machines (VMs) that are domain joined or run as a stand-alone (non-domain joined) server in a workgroup, but you can also run Azure AD joined Azure VMs.

When you are performing management tasks or troubleshooting one of these VMs, it can be useful to know in what join state a specific VM (Device State) is running at this exact moment. In this blog post, I show you how you can quickly find this out via the use of the Azure Portal.


Azure Portal

Log on to the Azure Portal and type “vm” in the Global search bar. Then click on Virtual machines.


Click on the VM Name of the VM from which you want to know the device join state (in my example, swpdc004).


On the Virtual machine page, select Run command under the Operations section. Then, on the Run command window, in the list of available commands, click on RunPowerShellScript.

The Run Command Script window will open as a side-window, and here you need to type in the following command:

dsregcmd /status




After the command finishes, it returns the output, and you should be able to find the current Device State of the server. In the example, you can see that server swpdc004 is domain-joined, as well as the domain to which it is joined.


If we run the same command on another Azure VM in my environment (swnts002), you can see that this server, for example, is Azure AD joined.


I hope this tip helps you and comes in handy whenever you quickly need to find out the current device join state of an Azure VM.


Unknown's avatar

Wim is an Azure Technical Advisor and Trainer with over fifteen years of Microsoft technology experience. As a Microsoft Certified Trainer (MCT), his strength is assisting companies in the transformation of their businesses to the Cloud by implementing the latest features, services, and solutions. Currently, his main focus is on the Microsoft Hybrid Cloud Platform, and especially on Microsoft Azure and the Azure hybrid services.   Wim is also a Microsoft MVP in the Azure category and a founding board member of the MC2MC user group. As a passionate community member, he regularly writes blogs and speaks about his daily experiences with Azure and other Microsoft technologies.

0 comments on “Azure Tip: Quickly find out if an Azure VM is domain joined or not via the Azure Portal

Leave a comment