Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Windows Server » microsoft.public.windows.server.scripting
Thread: Interactive Rename and Domain Join Script Needed

HTVi
TV Discussion Newsgroups

Interactive Rename and Domain Join Script Needed
sc 4/19/2007 4:46:00 PM
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?

RE: Interactive Rename and Domain Join Script Needed
Jeremy 4/20/2007 11:18:00 AM
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:

[Quoted Text]
> 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?
>
RE: Interactive Rename and Domain Join Script Needed
Iberê Jones 5/28/2007 3:17:03 PM
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:

[Quoted Text]
> 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?
> >
Re: Interactive Rename and Domain Join Script Needed
anand919[ at ]gmail.com <anand919gmail.com.3l4lvb[ at ]DoNotSpam.com> 12/28/2008 10:38:33 AM
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 -- anand919[ at ]gmail.com ------------------------------------------------------------------------ anand919[ at ]gmail.com's Profile: http://forums.techarena.in/members/anand919-gmail-com.htm View this thread: http://forums.techarena.in/server-scripting/732287.htm http://forums.techarena.in

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen