We're using the script posted on KACE's website for joining the domain & renaming the machine. It goes into Windows for the first time, renames the PC, then reboots. It then goes in and runs a join domain script and reboots again.

For some reason, some computers we test this on aren't joining the domain. I can't figure out why. Here is my join domain script:

C:\source\SSCdomainjoin.vbe CUSD200.LOCAL pctech PASSWORD

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 0 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /t REG_SZ /d pctech /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d techsup /f

reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /v V1 /t REG_SZ /d "CMD /C \"rd /s /q C:\source\""

shutdown -r -t 45

Not sure why it doesn't join the domain. We can also use "CUSD200" as the domain, so I've tried making it this, with the assumption that if it somehow fails .LOCAL, that it will try joining CUSD200 and it should work...but some computer still don't join.
C:\source\SSCdomainjoin.vbe CUSD200.LOCAL pctech PASSWORD
C:\source\SSCdomainjoin.vbe CUSD200 pctech PASSWORD

I don't know if it outputs any errors because the cmd prompt window just flashes really quickly when loading into Windows, then shows the shutdown notice.

Any suggestions? It worked fine on a whole lab of XP machines, but only working on some Dell optiplex 390 Windows 7 machines (32bit).
0 Comments   [ + ] Show Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.


Oh, and we have the user/password info encrypted into the .VBE file, so I've tried using just this:


But that didn't work on the 3 I tested it on either.
Answered 01/20/2012 by: sfigg
Red Belt

  • Try using a answer file for adding to the domain <Identification>
  • This also worked for me
Please log in to comment

Try useing the netbios name instead of the FQDN.


joindomain.vbs Netbiosname username password ip of dns server

this worked for me.

I was trying to use the forest name but it was doing the same thing as you were


Answered 03/04/2013 by: mikesharp1
Second Degree Black Belt

Please log in to comment
Answer this question or Comment on this question for clarity