Run dsregcmd remotely. Mar 22, 2023 · Enter dsregcmd /forcerecovery (You need to be an administrator to perform this action). Click "Sign in" in the dialog that opens up and continue with the sign in process. Use dsregcmd /leave (as an Administrator): You're already doing this, but make sure to open the Command Prompt or PowerShell with "Run as administrator" to ensure it has the necessary permissions. I would run all this in a proactive remediation script. Additional suggestion: When deploying scripts using SCCM, it's a good practice to use the Start-Process cmdlet to run external commands, like dsregcmd. /leave Perform a Hybrid Unjoin. A PowerShell module that wraps "dsregcmd. /forcerecovery For Azure AD Microsoft Intune is a cloud-based endpoint management solution that secures, deploys, and manages users, apps, and devices across Windows, Android, macOS, iOS, and Linux operating systems. It also supports pulling the output from a remote computer through WinRM (using PSSessions). Jul 17, 2025 · Learn how to use dsregcmd to check if devices are correctly joined to Microsoft Entra ID, hybrid-joined, or domain-joined Active Directory. Using the tool, admins can check various aspects of a hybrid Microsoft Entra ID configuration and current status, such as the current state of the Azure Active Directory join. Select the account and click Disconnect. dsregcmd is a standalone executable, not a PowerShell command. - Latest version May 13, 2024 · If you're running PowerShell as a non-admin user, it might not have access to the dsregcmd command. Sep 16, 2025 · Go to Settings > Accounts > Access work or school. exe to run the connectivity tests to cloud service URLs. DSREGCMD. Aug 1, 2024 · Running the dsregcmd /forcerecovery command will initiate a recovery process for a device that is joined to Azure Active Directory (Azure AD). exe" executable''s output. Feb 12, 2024 · DSRegTool PowerShell is a comprehensive tool that performs more than 50 different tests that help you to identify and fix the most common device registration issues for all join types (Microsoft Entra hybrid join, Microsoft Entra join and Microsoft Entra Register). Here is what happens step-by-step: Command Execution: When you run the command in an elevated command prompt (as an administrator), it will start the recovery process. /join Schedule and monitor the Autojoin task to Hybrid Join the device. This article covers how to use the output from the dsregcmd command to understand the state of devices in Microsoft Entra ID. You can set the criteria and hit a large amount of devices while only affecting those that have issues. Removes the device from azure and then re-joins on the next delta sync. Aug 31, 2023 · dsregcmd is a command line tool that allows viewing the current details of Azure Active Directory joined devices. Jan 15, 2026 · Note On Windows 10 and 11, Windows Server 2019 and 2022, or Windows Server 2012R2 and 2016 with the modern unified solution installed, the client analyzer script calls into an executable file called MDEClientAnalyzer. /status_old Display the device join status in old format. Try running PowerShell as an administrator, and see if that resolves the issue. exe Directory Service Registration, device join status. . May 15, 2024 · The issue is that the PowerShell script is trying to execute dsregcmd as a PowerShell command, which is not correct. Syntax DSREGCMD options Key /status Display the device join status. qxmog iwfvl dtzbxz xkun labsvt