S
Svensson
hello !
m trying to scrip our computers to join domain and then add a globalgroup in
local admingroup ...it is no problem to just join domain but i unable to add
the global group until i have restarted an logged on and rersun the
script..i get an trust error ..i know that i wont have to restart because im
able to do it manually but then i get an logonprompt...
how can i make this happen with a script ?
this is the script i use
%TEMP%\netdom.exe REMOVE %COMPUTERNAME% /Domain:OUDOMAIN
/UserD
OMAIN\adminuser /PasswordD:adminpassword > %TEMP%\netdom.log
%TEMP%\netdom.exe ADD %COMPUTERNAME% /Domain:OUDOMAIN
/UserD
OMAIN\adminuser /PasswordD:adminpassword > %TEMP%\netdom.log
%TEMP%\netdom.exe JOIN %COMPUTERNAME% /Domain:OUDOMAIN
/UserD
OMAIN\adminuser /PasswordD:adminpassword > %TEMP%\netdom.log
%TEMP%\netdom.exe VERIFY %COMPUTERNAME% /Domain:OUDOMAIN
/UserO
OMAIN\adminuser /PasswordO:adminpassword > %TEMP%\netdom.log
%SYSTEM32%\net.exe localgroup administrators DOMAIN\GLOBALGROUP /ADD
m trying to scrip our computers to join domain and then add a globalgroup in
local admingroup ...it is no problem to just join domain but i unable to add
the global group until i have restarted an logged on and rersun the
script..i get an trust error ..i know that i wont have to restart because im
able to do it manually but then i get an logonprompt...
how can i make this happen with a script ?
this is the script i use
%TEMP%\netdom.exe REMOVE %COMPUTERNAME% /Domain:OUDOMAIN
/UserD

%TEMP%\netdom.exe ADD %COMPUTERNAME% /Domain:OUDOMAIN
/UserD

%TEMP%\netdom.exe JOIN %COMPUTERNAME% /Domain:OUDOMAIN
/UserD

%TEMP%\netdom.exe VERIFY %COMPUTERNAME% /Domain:OUDOMAIN
/UserO

%SYSTEM32%\net.exe localgroup administrators DOMAIN\GLOBALGROUP /ADD