Powershell – Where do dsrm, dsadd and dsmove come from

active-directorypowershell

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?

Best Answer

The ds* suite of tools is included with Windows Server 2003 Administration Tools Pack, AKA adminpack. 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.