The other day I was joining a Windows 7 RC machine to a domain and I figured I would use my old friend netdom.exe. Netdom has been around since NT and is a command line utility for joining a machine to a domain. It provides some nice extras over the GUI, most notably the ability to specify the OU for the domain account during the join. But Windows 7 just replied ‘netdom.exe’ is not recognized as an internal or external command, operable program og batch file when I typed in netdom.exe. Had Microsoft really removed this great tool?
Yes, they had, but fortunately for us they have given us something better. PowerShell v2 is included in Windows 7 and Windows Server 2008 R2 by default and is no longer an optional component that you can remove or add. It is there permanently. PS v2 has a couple of new cmdlets that perform the same operations that netdom.exe did. Namely Add-Computer which adds a computer to a workgroup or domain (with the ability to specify the OU) and Remove-Computer which removes a machine from a workgroup or domain. Both cmdlets have many parameters making them more than able to replace netdom.exe.
I think this is a great development and hope that all command line tools will be PowerShell cmdlets in the future.