Using a simple command, you can add or remove a computer to a domain. You must be a domain administrator to run this command.
Open a command prompt and type the following to add a computer to the domain:
net computer \\computername /add
Type the following to remove a computer from the domain:
net computer \\computername /del
These command are especially valuable if you are using batch files.