Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

NETDOM in Win7


  • Please log in to reply
7 replies to this topic

#1
fuscob

fuscob
  • Member
  • 4 posts
  • Joined 18-May 08
So in XP and Vista, I use NETDOM after imaging to join the computer to the domain and then rename the computer (and its AD account) if necessary.

I noticed that Win7 didn't work with the old copy of NETDOM that I used for XP and Vista, but I see that a copy gets installed when you install the RSAT (Remote Server Administration Tools).

However, if you take the RSAT copy and move it to another machine that does not have RSAT installed, it doesn't work - when you launch it, it just exits without any output. (As a matter of fact, even if you move it to a different machine that does have RSAT installed, it still doesn't work!)

I would use the PowerShell cmdlet Add-Computer, but I need to rename the computer in the same operation without restarting, which I was able to do under XP and Vista with NETDOM (NETDOM ADD and then NETDOM RENAMECOMPUTER).

Any ideas, or has anyone else experienced this issue? If you add your machines to the domain post-imaging, how are you doing it?

Edited by fuscob, 24 August 2009 - 02:05 PM.



How to remove advertisement from MSFN

#2
cluberti

cluberti

    Gustatus similis pullus

  • Supervisor
  • 11,252 posts
  • Joined 09-September 01
  • OS:Windows 8.1 x64
  • Country: Country Flag
Windows 7 no longer uses netdom, it instead has a PowerShell cmdlet called "Add-Computer".
MCTS Windows Internals, MCITP Server 2008 EA, MCTS MDT/BDD, MCSE/MCSA Server 2003, Server 2012, Windows 8
--------------------
Please read the rules before posting!
Please consider donating to MSFN to keep it up and running!

#3
fuscob

fuscob
  • Member
  • 4 posts
  • Joined 18-May 08

Windows 7 no longer uses netdom, it instead has a PowerShell cmdlet called "Add-Computer".


Yes, I mentioned that in my first post, but Add-Computer does not offer the ability to rename the computer, as NETDOM did.

#4
Yoko

Yoko
  • Member
  • 9 posts
  • Joined 23-March 05
I do this with a script:

Install RSAT (After you have extracted the tools):

start /w pkgmgr /n:%SystemDrive%\Install\RSAT\Windows6.1-KB958830-x86.xml

Enable some RSAT tools (including NETDOM)

start /w pkgmgr /iu:RemoteServerAdministrationTools-Roles-AD-DS-SnapIns;RemoteServerAdministrationTools-Roles-AD-DS;RemoteServerAdministrationTools-Roles-AD;RemoteServerAdministrationTools-Roles;RemoteServerAdministrationTools

I essentially do the same as you except I use a VB script to rename the computer.

#5
cluberti

cluberti

    Gustatus similis pullus

  • Supervisor
  • 11,252 posts
  • Joined 09-September 01
  • OS:Windows 8.1 x64
  • Country: Country Flag

Yes, I mentioned that in my first post, but Add-Computer does not offer the ability to rename the computer, as NETDOM did.

So you did - not sure how I missed it. Anyway, I'd probably suggest looking into using powershell a bit, as this is fairly easily done in powershell.
MCTS Windows Internals, MCITP Server 2008 EA, MCTS MDT/BDD, MCSE/MCSA Server 2003, Server 2012, Windows 8
--------------------
Please read the rules before posting!
Please consider donating to MSFN to keep it up and running!

#6
fuscob

fuscob
  • Member
  • 4 posts
  • Joined 18-May 08

So you did - not sure how I missed it. Anyway, I'd probably suggest looking into using powershell a bit, as this is fairly easily done in powershell.


Yes, I've found all of those solutions - believe it or not, I actually do some research before I post ;)

Unfortunately, they require the computer to be restarted before the new name can be applied, which doesn't work out for me.
With NETDOM, I use NETDOM ADD to add the machine with its current name, and then give the user the option to rename the computer (and its corresponding Active Directory account) with NETDOM RENAMECOMPUTER.

I do this with a script:

Install RSAT (After you have extracted the tools):

start /w pkgmgr /n:%SystemDrive%\Install\RSAT\Windows6.1-KB958830-x86.xml

Enable some RSAT tools (including NETDOM)

start /w pkgmgr /iu:RemoteServerAdministrationTools-Roles-AD-DS-SnapIns;RemoteServerAdministrationTools-Roles-AD-DS;RemoteServerAdministrationTools-Roles-AD;RemoteServerAdministrationTools-Roles;RemoteServerAdministrationTools

I essentially do the same as you except I use a VB script to rename the computer.


Thanks, I might try that method. I'll post back with my results.

#7
jpmorgan

jpmorgan
  • Member
  • 5 posts
  • Joined 15-May 07
Windows 7 and Vista both have their own NETDOM.EXE, for 32-bit and 64-bit.

You have to install:

Install RSAT (After you have extracted the tools): (took me awhile to find the link)


http://www.microsoft...;displaylang=en



start /w pkgmgr /n:%SystemDrive%\Install\RSAT\Windows6.1-KB958830-x86.xml


Enable some RSAT tools (including NETDOM)

start /w pkgmgr /iu:RemoteServerAdministrationTools-Roles-AD-DS-SnapIns;RemoteServerAdministrationTools-Roles-AD-DS;RemoteServerAdministrationTools-Roles-AD;RemoteServerAdministrationTools-Roles;RemoteServerAdministrationTools


You will then have a "c:\windows\system32\netdom.exe" that supports the 'older' Netdom syntax.


HOWEVER, IF YOU MOVE THE 'NETDOM.EXE" FROM THE 'SYSTEM32' SUB-DIR IT WILL NOT WORK???!!
IT WILL JUST 'EXIT' UPON EXECUTION??


BUT , if you WANT to move it, which i did. you have to do 'something' EXTRA.

To whatever sub-dir you move the RSAT NETDOM.EXE to :

1) FOR EXAMPLE, create a sub-dir called : %temp%\EN-US

2) COPY /Y "%SYSTEMROOT%\SYSTEM32\EN-US\NETDOM.EXE.MUI" "%TEMP%\EN-US

Then if you execute NETDOM.EXE from "%TEMP%" you should 'see' the familiar 'help'
messages..

NOTE: I have not, as of Dec 8, 2009 actually TESTED the FULL 'moved' NETDOM.EXE functionality,
but WILL in the next day or so,.

ALSO, someone made the comment that if it was moved' to another compouter it would not work also,
I will verify that statement also.

Hope this helps, as i DONT like the Powershell approach..

J P Morgan james_p_morgan@hotmail.com

#8
cluberti

cluberti

    Gustatus similis pullus

  • Supervisor
  • 11,252 posts
  • Joined 09-September 01
  • OS:Windows 8.1 x64
  • Country: Country Flag
Looks like there's a new version of wsname available as of November 24th:

http://mystuff.clark...tuff/wsname.asp
MCTS Windows Internals, MCITP Server 2008 EA, MCTS MDT/BDD, MCSE/MCSA Server 2003, Server 2012, Windows 8
--------------------
Please read the rules before posting!
Please consider donating to MSFN to keep it up and running!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users