Command to Add or Remove Computer from Domain (2024)

Command to Add or Remove Computer from Domain (1)

Using a simple command, you can add or remove a Windows computer to a Microsoft Windows domain remotely from another computer.

Add a Computer to the Domain

Execute this command from a domain controller:

  1. Open a command prompt.
  2. Type net computer \\computername /add, then press “Enter“.

Execute this command from a workstation where you have domain admin rights. Change the words in italics to suit your situation:

  • netdom join computername /domain:domainname

Remove a Computer from the Domain

Execute this command from a domain controller:

  1. Open a command prompt.
  2. Type net computer \\computername /del, then press “Enter“.

Execute this command from a workstation where you have domain admin rights. Change the words in italics to suit your situation:

  • netdom removecomputername /domain:domainname

These command are especially valuable if you are using batch files.

Command to Add or Remove Computer from Domain (2)

Author Mitch Bartlett

Through my career that spans over 20 years I have become an expert in Microsoft Systems Administration, Android, and macOS. I started this site as a technical guide for myself and it has grown into what I hope is a useful knowledgebase for everyone.

Command to Add or Remove Computer from Domain (2024)
Top Articles
Latest Posts
Article information

Author: Cheryll Lueilwitz

Last Updated:

Views: 6263

Rating: 4.3 / 5 (54 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Cheryll Lueilwitz

Birthday: 1997-12-23

Address: 4653 O'Kon Hill, Lake Juanstad, AR 65469

Phone: +494124489301

Job: Marketing Representative

Hobby: Reading, Ice skating, Foraging, BASE jumping, Hiking, Skateboarding, Kayaking

Introduction: My name is Cheryll Lueilwitz, I am a sparkling, clean, super, lucky, joyous, outstanding, lucky person who loves writing and wants to share my knowledge and understanding with you.