Results 1 to 4 of 4

Thread: Interactive Rename and Domain Join Script Needed

  1. #1
    sc Guest

    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?


  2. #2
    Jeremy Guest

    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?
    >


  3. #3
    Iberê Jones Guest

    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?
    > >


  4. #4
    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

Similar Threads

  1. Remotely rename computer and join to domain
    By maketu in forum Windows Security
    Replies: 2
    Last Post: 16-07-2009, 06:40 AM
  2. Script to Rename Computer Name in Domain
    By skepper in forum Windows Server Help
    Replies: 3
    Last Post: 10-07-2009, 10:05 AM
  3. AD script to join domain
    By Anantram in forum Active Directory
    Replies: 1
    Last Post: 10-03-2009, 08:48 PM
  4. Replies: 1
    Last Post: 18-08-2008, 10:17 PM
  5. Delegate domain user permission to join domain
    By BlackSunReyes in forum Active Directory
    Replies: 3
    Last Post: 25-04-2005, 01:03 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,868,923.06738 seconds with 17 queries