How to: Remove a Computer from a Domain

Spread the love

When a computer is part of an Active Directory domain, you’ll usually log in with credentials assigned by the domain controller, and whoever manages it, rather than your local login accounts. You might want to remove a computer from a domain at some point if it’s going to be used independently or, naturally, add new devices to the domain as your business expands its computer inventory.

At times, you might want to disjoin a computer from a domain and have it work independently.

How to Leave a Domain

If your computer is a member of an Active Directory domain, you can disconnect it from the domain and make it part of a local work group, a simpler alternative to a domain that can even encompass only your one computer.

First, log in to the computer with an administrator account. If you don’t have the right credentials, ask your IT department (or whoever configured your network) for assistance. Once you’re logged in, hold down the Windows key on your keyboard, and press X to open the Windows Tools menu. Click “System” in the menu.

Within the “System” menu, click “Change Settings.” On the “Computer Name” tab, click “Change.” Choose “Workgroup” instead of “Domain,” and type the name of a new or existing work group. Click “OK,” and restart the computer for the changes to take effect.

You can also use this same configuration screen to join a computer to a domain. You may need to work with whoever manages your domain controller to get the necessary permissions and accounts set up to connect your computer to a new domain and log in with your user account.

Using PowerShell to Leave Domains

You can also leave a Windows domain using PowerShell, a free scripting tool from Microsoft. This can be useful if you want to automate entering and exiting domains.

Use the Remove-Computer command in PowerShell to remove a computer from a domain. You can provide a variety of parameters, including the name of a work group to move the computer to, and you must provide the username of a user allowed to remove the computer from the domain using the parameter “UnjoinDomaincredential.” By default, the computer will be joined to a work group simply called “WORKGROUP.” You may be prompted to enter the authorized user’s password.

You may need to restart your computer for changes to take effect. If you want to do so as part of the PowerShell command, use the parameter “-Restart.”

Use the PowerShell command Add-Computer to add your computer to a new domain.