• Skip to main content
  • Skip to primary sidebar

Technipages

Tutorials and fixes for smartphone, gadget, and computer problems

  • Topics
    • Android
    • Gaming
    • Hardware
    • Internet
    • iOS
    • MacOS
    • Office
    • Software
    • Windows
    • Definitions
  • Product Reviews
  • Downloads
  • About Technipages
Command to Add or Remove Computer from Domain

Command to Add or Remove Computer from Domain

By Mitch Bartlett 5 Comments

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 remove computername /domain:domainname

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

You Might Also Like

  • Bitwarden: How to Exclude a Domain
    Bitwarden: How to Exclude a Domain
  • Windows: How to Switch Domain Controller (Client)
    Windows: How to Switch Domain Controller (Client)
  • Slack: How To Block Link Previews for a Domain
    Slack: How To Block Link Previews for a Domain
  • Use Active Directory Domain Services to Block Website
    Use Active Directory Domain Services to Block Website
  • Active Directory: How to Check Domain and Forest Functional Level
    Active Directory: How to Check Domain and Forest Functional…
  • What Is a Command Line Interpreter?
    What Is a Command Line Interpreter?
  • How to Fix "No Command" Error on Android
    How to Fix "No Command" Error on Android
  • Windows: Command to Find MAC Address
    Windows: Command to Find MAC Address
  • Fix: Office Doesn't Recognize the Command It Was Given
    Fix: Office Doesn't Recognize the Command It Was Given

Filed Under: Windows Tagged With: win7, Windows 10

Reader Interactions

Comments

  1. Paul K says

    August 20, 2021 at 11:46 am

    So everyone knows – all you need is (after installing RSAT Active Directory Domain Services and Lightweight Directory Services Tools of course – is netdom remove computername /force

    No need to for a domain name or creds or anything else.

    Now – I do this with a LOCAL (non-domain) administrator account. Be sure to make sure you can log in that way so that when you are off the “domain”, you can still log on.

  2. Rajat chauhan says

    November 3, 2020 at 2:29 am

    i am try to join computer with domain via WINDOWS POWERSHELL but i am facing the issues “Cannot establish the WMI connection to the computer ‘RND-D33’ with the following error message: Access is denied. ” please give me tips how i can fix this issue.

  3. oVer says

    November 2, 2018 at 4:04 am

    Holla, i got some problems with a hpelitebook 820 g1 that is domain related.

    My account got admin rights, but i am unable to change anything that needs admin rights, due too the need to acess the domain.

    I am also unable to make admin changes in cmd.exe while logged in on windows.
    I am able to make some admin changes on the login screen with cmd.exe.

    Any tips how to leave the domain so that i can acess my full admin rights for the computer, without beeing locked out by the requested to log in to the domain?

  4. febry says

    August 27, 2018 at 10:09 pm

    hy mitch, the next problem
    if I can’t access Windows Server, can I do it on my local computer?
    the problem is I lost access on windows server.

    thanx

  5. Roy says

    July 23, 2018 at 5:10 am

    Thanks for the info Mitch. Upon running both commands, does it show up in a log.
    Also, I would like to create an icon on my desktop that will remove the pc from a domain just by clicking the icon and I would also like an icon to perform the rejoin option every morning.

Did this help? Let us know!

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Recent Posts

  • Windows 11: How to Fix Windows 11 Won’t Connect to a Network
  • What to Do When Firefox Won’t Load a Page
  • Chrome: How to Refresh Various Tabs Simultaneously
  • The Latest Foldable Phones – A Look At The Huawei Mate X2
  • Everything Announced at Google I/O 2022 That You Should Care About
  • How to Build the Best High-Spec PC for Your Budget
  • Google Shows Off Pixel 7 and Pixel Watch Ahead of Fall Launch
  • Windows 11: How to View Saved Passwords

Who’s Behind Technipages?

Baby and Daddy My name is Mitch Bartlett. I've been working in technology for over 20 years in a wide range of tech jobs from Tech Support to Software Testing. I started this site as a technical guide for myself and it has grown into what I hope is a useful reference for all.

You May Also Like

  • Public Domain
  • Best Mid-Market Computer Speakers 2021
  • Best Budget Computer Speakers 2022
  • Best High-End Computer Speakers 2022
  • Best Wireless Computer Speakers 2022
  • Best Wired Computer Speakers 2022

© Copyright 2022 Technipages · All Rights Reserved · Privacy