Go Back   TechArena Community > Technical Support > Computer Help > Windows Server > Windows Server Help
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , ,

Sponsored Links



Interactive Rename and Domain Join Script Needed

Windows Server Help


Reply
 
Thread Tools Search this Thread
  #1  
Old 19-04-2007
sc
 
Posts: n/a
Interactive Rename and Domain Join Script Needed

Background:
I have Vista installed as a Guest onto a Virtual PC 2007 VM. I want to
customize it, sysprep it and then distribute it to our QA team. In XP and 2K
Pro i was able to do this in such a way that the VM would launch mini setup
and prompt users for a Host Name the first time the VM was launched after
being distributed. All other settings were automated by the sysprep process
including Joining the VM to the 2k3 Domain after being given a Host Name.
Apparently the Vista Sysprep process has been altered in such a way that it
wants to join the domain BEFORE allowing the user to specify a host name.
Microsoft has confirmed this as the problem and tells me i must develope a
script to solve the issue. Unfortunately i know NOTHING about scripting.

What I Need: So what plan to do is have Sysprep auto assign a hostname and
auto join a workgroup. I then would like to have a script auto run after the
first auto logon that prompts the user to rename the Host Name and then auto
Joins our domain with that newly specified hostname.

Is this possible?

Reply With Quote
  #2  
Old 20-04-2007
Jeremy
 
Posts: n/a
RE: Interactive Rename and Domain Join Script Needed

There are command line utilities you could use to do this. Here is an example:

SET /P NEWNAME="Please enter the new computer name: "
NETDOM RENAMECOMPUTER %COMPUTERNAME% /NewName:%NEWNAME%
NETDOM JOIN %COMPUTERNAME% /Domain:mydomain.local /UserD:DomainUser
/PasswordD:Domainpassword

You'll have to download netdom in the Windows XP SP2 support tools.
Unfortunately I have just found and article saying that Vista has a bug with
NETDOM. Fortuantely there is also a private hotfix you can get from MS
Support.

See this article: http://support.microsoft.com/kb/932173

Cheers,
Jeremy.
"sc" wrote:

> Background:
> I have Vista installed as a Guest onto a Virtual PC 2007 VM. I want to
> customize it, sysprep it and then distribute it to our QA team. In XP and 2K
> Pro i was able to do this in such a way that the VM would launch mini setup
> and prompt users for a Host Name the first time the VM was launched after
> being distributed. All other settings were automated by the sysprep process
> including Joining the VM to the 2k3 Domain after being given a Host Name.
> Apparently the Vista Sysprep process has been altered in such a way that it
> wants to join the domain BEFORE allowing the user to specify a host name.
> Microsoft has confirmed this as the problem and tells me i must develope a
> script to solve the issue. Unfortunately i know NOTHING about scripting.
>
> What I Need: So what plan to do is have Sysprep auto assign a hostname and
> auto join a workgroup. I then would like to have a script auto run after the
> first auto logon that prompts the user to rename the Host Name and then auto
> Joins our domain with that newly specified hostname.
>
> Is this possible?
>

Reply With Quote
  #3  
Old 28-05-2007
IberĂȘ Jones
 
Posts: n/a
RE: Interactive Rename and Domain Join Script Needed

If is required join not only one computer? Is possible? How?
I have 100 machines and I need join all to the same domain and OU.

Thanks in advance!
Jones

"Jeremy" wrote:

> There are command line utilities you could use to do this. Here is an example:
>
> SET /P NEWNAME="Please enter the new computer name: "
> NETDOM RENAMECOMPUTER %COMPUTERNAME% /NewName:%NEWNAME%
> NETDOM JOIN %COMPUTERNAME% /Domain:mydomain.local /UserD:DomainUser
> /PasswordD:Domainpassword
>
> You'll have to download netdom in the Windows XP SP2 support tools.
> Unfortunately I have just found and article saying that Vista has a bug with
> NETDOM. Fortuantely there is also a private hotfix you can get from MS
> Support.
>
> See this article: http://support.microsoft.com/kb/932173
>
> Cheers,
> Jeremy.
> "sc" wrote:
>
> > Background:
> > I have Vista installed as a Guest onto a Virtual PC 2007 VM. I want to
> > customize it, sysprep it and then distribute it to our QA team. In XP and 2K
> > Pro i was able to do this in such a way that the VM would launch mini setup
> > and prompt users for a Host Name the first time the VM was launched after
> > being distributed. All other settings were automated by the sysprep process
> > including Joining the VM to the 2k3 Domain after being given a Host Name.
> > Apparently the Vista Sysprep process has been altered in such a way that it
> > wants to join the domain BEFORE allowing the user to specify a host name.
> > Microsoft has confirmed this as the problem and tells me i must develope a
> > script to solve the issue. Unfortunately i know NOTHING about scripting.
> >
> > What I Need: So what plan to do is have Sysprep auto assign a hostname and
> > auto join a workgroup. I then would like to have a script auto run after the
> > first auto logon that prompts the user to rename the Host Name and then auto
> > Joins our domain with that newly specified hostname.
> >
> > Is this possible?
> >

Reply With Quote
  #4  
Old 28-12-2008
Member
 
Join Date: Dec 2008
Posts: 1
Re: Interactive Rename and Domain Join Script Needed

Try this it works
i have no time to explain all the stuff just enjoy

set /P newname=[Enter the computer name]
set /P code=[Enter Location Code CAPS ONLY]
set /P LorD=[Press "L" for Laptops "D" for desktops]

set /P UN=[Enter Domain ID User Name]
if "%LorD%" == "L" Goto LADD
if "%Loc%" == "l" Goto LADD
if "%Loc%" == "D" Goto DADD
if "%Loc%" == "d" Goto DADD
:LADD
netdom join %ComputerName% /D:asiapacific.abb.com /ou:ou=Laptops,ou=%code%,ou=Computers,ou=IN,dc=asiapacific,dc=abb,dc=com /ud:asiapacific\%UN% /pd:* /reboot:30

:DADD
netdom renamecomputer %computername% /newname:%newname%
netdom join %newname% /D:asiapacific.abb.com /ou:ou=Desktops,ou=%code%,ou=Computers,ou=IN,dc=asiapacific,dc=abb,dc=com /ud:asiapacific\%UN% /pd:* /reboot:30
Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows Server > Windows Server Help


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Interactive Rename and Domain Join Script Needed"
Thread Thread Starter Forum Replies Last Post
Remotely rename computer name and join to domain Kil Windows Security 2 16-07-2009 07:40 AM
Script to Rename Computer Name in Domain skepper Windows Server Help 3 10-07-2009 11:05 AM
AD script to join domain RC Active Directory 3 17-04-2009 03:14 PM
How to develop an interactive script in Unix systems Allanoo Software Development 4 16-10-2008 05:29 PM
Rename and join a computer to the domain at the same time??? Glenn Active Directory 4 27-02-2008 08:23 PM


All times are GMT +5.5. The time now is 04:45 PM.