I am writing a script to join a machine to the domain after it has been imaged. (Don't want to do it in Sysprep.)
On the machine I am writing the script on (a battered, world weary IT workhorse with all sorts of crud on it) my script works fine. However on one of my shiny new test machines, it doesn't find dsrm and dsadd.
I can only assume I have inadvertently installed this on my machine in the past. I want these to be used just for the purpose of joining the machines to the domain, so don't want any full blown admin-ware installed.
Where do I get / turn on dsrm etc?
The
ds*
suite of tools is included with Windows Server 2003 Administration Tools Pack, AKAadminpack
. Windows 2003 and 2008 include the tools by default. You can extract the files from the MSI if you only want those couple tools.Have a look at
netdom
which can also add/remove computers from the domain.You can grab them from the Windows\System32 folder of a domain controller and copy them from there.
In order to join a PC to the domain, I have always used netdom. I believe dsadd just creates the computer object in the domain similar to creating a new computer object via ADUC.