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:
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.
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).
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)
Please log in to answer
Posted by:
sfigg
12 years ago
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.
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
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.