Remove & Join to doamin by batch file in windows 7

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
a_f
Posts: 3
Joined: 18 Jan 2015 09:37

Remove & Join to doamin by batch file in windows 7

#1 Post by a_f » 18 Jan 2015 09:40

Hello,

I want to make a batch file that does the:

Remove from domain

Join to doamin

All one script that performs this

I tried to make a batch file with the NETDOM but the thing did not work

Can anyone help?

Squashman
Expert
Posts: 4488
Joined: 23 Dec 2011 13:59

Re: Remove & Join to doamin by batch file in windows 7

#2 Post by Squashman » 18 Jan 2015 14:13

Would probably help if you supplied what you tried with NETDOM.

a_f
Posts: 3
Joined: 18 Jan 2015 09:37

Re: Remove & Join to doamin by batch file in windows 7

#3 Post by a_f » 19 Jan 2015 00:05

Yes, but what I need to write a command in the batch file?

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: Remove & Join to doamin by batch file in windows 7

#4 Post by Ed Dyreen » 19 Jan 2015 02:14

post the thing, the batch file that didn't work

a_f
Posts: 3
Joined: 18 Jan 2015 09:37

Re: Remove & Join to doamin by batch file in windows 7

#5 Post by a_f » 19 Jan 2015 02:35

NETDOM REMOVE /Domain:XXXXXX /user:XXXXXXX /password:XXXXXXX /SHUTDOWN /R
NETDOM ADD /Domain:XXXXXXX /user:XXXXXXX /password:XXXXXXX /SHUTDOWN /R

ShadowThief
Expert
Posts: 1167
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: Remove & Join to doamin by batch file in windows 7

#6 Post by ShadowThief » 19 Jan 2015 02:45

/SHUTDOWN and /R are not valid netdom options.

http://ss64.com/nt/netdom.html

Post Reply