/build/static/layout/Breadcrumb_cap_w.png

K2000 Rename PC & Join Domain script - join domain only sometimes works

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 10.100.7.11

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 10.100.7.11
C:\source\SSCdomainjoin.vbe CUSD200 pctech PASSWORD 10.100.7.11


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

Answers (2)

Posted by: sfigg 12 years ago
Red Belt
0
Oh, and we have the user/password info encrypted into the .VBE file, so I've tried using just this:

C:\source\SSCdomainjoin.vbe

But that didn't work on the 3 I tested it on either.

Comments:
  • Try using a answer file for adding to the domain <Identification>
    <Credentials>
    <Domain>fabrikam.com</Domain>
    <Password>MyPassword</Password>
    <Username>MyUserName</Username>
    </Credentials>
    <JoinDomain>fabrikam.com</JoinDomain>
    <MachinePassword>ComputerPassword</MachinePassword>
    </Identification> - mikesharp1 11 years ago
  • This also worked for me - mikesharp1 11 years ago
Posted by: mikesharp1 11 years ago
2nd Degree Black Belt
0

Try useing the netbios name instead of the FQDN.

Example:

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

experiencing.

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ