Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to automate workgroup to domain

Status
Not open for further replies.

orman

IS-IT--Management
Jun 14, 2001
123
US
Is there a way to automate changing Xp PCs from a workgroup to a domain?
That is, instead of right clicking on "My Computer", "Properties", "Computer Name", "Change", etc...
,use a script or batch file or something?
Thanks.
 
I think (though i could be wrong) that the ADMT tool may be able to help you in this.

iMachiavellian - think dissident
 
The real problem is user profiles.. you'll find that when your users login via the domain they wont have access to their local profiles anymore.. it'll be a new one

You have to manually modify their current profiles to give access to their domain accounts.

 
Not worried about profiles - we have that covered. Just need a faster, easier way to change the domain on the pc's.
 
well.. we used a simple vbs program

you only have to modify the str's

...may I ask how you handled the profile quandry?

----------------------------
Dim WSHShell

Const JOIN_DOMAIN = 1
Const ACCT_CREATE = 2
Const ACCT_DELETE = 4
Const WIN9X_UPGRADE = 16
Const DOMAIN_JOIN_IF_JOINED = 32
Const JOIN_UNSECURE = 64
Const MACHINE_PASSWORD_PASSED = 128
Const DEFERRED_SPN_SET = 256
Const INSTALL_INVOCATION = 262144

Set WSHShell = CreateObject("WScript.Shell")

strDomain = "DOMAINNAME"
strPassword = "ADMINPASSWORD"
strUser = "ADMINUSERID"

Set objNetwork = CreateObject("WScript.Network")
strComputer = objNetwork.ComputerName

Set objComputer = GetObject("winmgmts:{impersonationLevel=Impersonate}!\\" & _
strComputer & "\root\cimv2:Win32_ComputerSystem.Name='" & _
strComputer & "'")

ReturnValue = objComputer.JoinDomainOrWorkGroup(strDomain, _
strPassword, strDomain & "\" & strUser, NULL, _
JOIN_DOMAIN + ACCT_CREATE)

WScript.Echo "AD Add Complete. Now Rebooting"
WSHShell.Run "shutdown -r -t 0"


'Quit the Script
WScript.quit
-----------------------------------
 
A consultant brought in a moveuser.exe utility and we used that to move local profile to a new domain profile. I not sure where he got it from...
Generally it worked well, however not consistent, different tweeks had to be implemented: user had to be local admin, in File Explorer you have be able to view all hidden and system files, and you had to delete files from the Temporary Internet folder, (and on occasion, the Temp folder) in order to get it to work. (Occationally, you could get by by not doing any of these.) Once it worked, it seemed to do a better job than other 'profile moving options' we tried.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top