LabTech Support Forums

Domain join/disjoin script using netdom

This forum is for discussion of expansion script related issues.

Moderator: jware.connectwise

Domain join/disjoin script using netdom

Postby giossi.membank » Thu Jan 17, 2013 10:49 am

Hi,

I wrote a script that automates using netdom to join or disjoin a domain and I thought others might find it useful as well.

I've tested this with XP and Windows 7 (32 and 64 bit) and it works fine for us. It should work fine with Vista. You will need to do several things before you can use this:

First, you'll need to set the global parameters appropriately.

Secondly, you'll need to acquire netdom and set it up on the appropriate paths in your ltshare\transfer folder (see the paths in the script and match them). For the windows 7 netdom, download RSAT (you only need the x86 version's netdom - it works on x64 computers) here: http://www.microsoft.com/downloads/deta ... laylang=en

After it installs, run this to get netdom:

start /w pkgmgr /iu:RemoteServerAdministrationTools-Roles-AD-DS-SnapIns;RemoteServerAdministrationTools-Roles-AD-DS;RemoteServerAdministrationTools-Roles-AD;RemoteServerAdministrationTools-Roles;RemoteServerAdministrationTools

Then copy netdom.exe from system32 **AND** "netdom.exe.mui from the "en-US" folder.

For XP, get the XP Support Tools for SP2 (the latest version MS has) to get the XP copy of netdom. You don't need the "mui" for XP.

I would provide a zip file with the netdom versions, but I don't know what the board policy is regarding posting Microsoft files/etc. If a Labtech forum admin says that it's okay then I'll post that zip file as well and save people the trouble. Please don't ask for me to directly send you the files since they are publically available, though, thanks.

The join and disjoin scripts both create or update a local admin user account. We do this as a safety precaution on workstations we manage so we always have a fallback account to access, but you can remove that section if you don't want to do that.
Attachments
domain_scripts.zip
(267.65 KiB) Downloaded 1515 times
giossi.membank
Jr. Member
Jr. Member
 
Posts: 69
Joined: Wed Aug 17, 2011 9:50 am

Re: Domain join/disjoin script using netdom

Postby srosario.ciolanding » Fri Sep 19, 2014 12:25 pm

Delicious.
srosario.ciolanding
Newbie
Newbie
 
Posts: 1
Joined: Thu Aug 28, 2014 2:09 pm

Re: Domain join/disjoin script using netdom

Postby eduardo.souza.dominit » Sat Jan 24, 2015 8:09 am

Hi Giossi, congratulations.

Do you have a script to change PCname in netdom?

Thanks.

Eduardo.
eduardo.souza.dominit
Newbie
Newbie
 
Posts: 1
Joined: Sat Jan 24, 2015 8:03 am


Return to 29B. Scripts

Who is online

Users browsing this forum: No registered users and 1 guest