
Install-WindowsFeature -name AD-Domain-Services -IncludeManagementTools

You need to specify "IncludeManagementTools to manage the local server or install Remote Server Administration Tools to manage a remote server. Server administration tools are not installed by default when you use Windows PowerShell. This command installs the AD DS server role and installs the AD DS and AD LDS server administration tools, including GUI-based tools such as Active Directory Users and Computers and command-line tools such as dcdia.exe. Start with adding the role using Windows PowerShell. įor more information about removing AD DS using Windows PowerShell, see Remove AD DS using Windows PowerShell. For more information about running dcpromo.exe with an answer file, see. The ability to continue running dcpromo.exe with an answer file provides organizations that have resources invested in existing automation time to convert the automation from dcpromo.exe to Windows PowerShell. Dcpromo.exe is deprecated beginning with Windows Server 2012, but you can still run dcpromo.exe by using an answer file (dcpromo /unattend: or dcpromo /answer:). Installing AD DS by Using Windows PowerShellīeginning with Windows Server 2012, you can install AD DS using Windows PowerShell.

If you have already run adprep /rodcprep in Windows Server 2008 or Windows Server 2008 R2, you do not need to run it again for Windows Server 2012.
