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