- Open Command Prompt as Administrator:
- Click on the Start menu, type cmd, right-click on the Command Prompt and choose “Run as administrator”.
- Alternatively, press Windows Key + X and select “Windows PowerShell (Admin)” or “Command Prompt (Admin)” from the menu.
- Unregister the Device from Azure AD/AD (dsregcmd /leave):
- In the administrative Command Prompt or PowerShell window, type dsregcmd /leave and hit Enter.
- This command will unregister the device from Azure AD/AD.
- Reboot the Device (Optional but Recommended):
- It’s a good practice to restart the computer after unregistering it before attempting to rejoin the directory. This ensures all changes are applied correctly.
- Register the Device to Azure AD/AD (dsregcmd /join):
- Open an administrative Command Prompt or PowerShell window again after the reboot.
- Type dsregcmd /join and hit Enter.
- This command will register the device with Azure AD/AD.
Copyright @2025 The University of Hong Kong. All Rights Reserved.