Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The administrative tasks performed in the ADAC can also be handled in PowerShell. While the focus of this book is not to teach PowerShell, it’s a good idea to become familiar with PowerShell to do major management tasks such as deploying AD.
To deploy AD via PowerShell, type the following in the PowerShell console (Figure 4-27):
Install-windowsfeature -name AD-Domain-Services -IncludeManagement Tools
Upon successful execution, the installation begins, as shown in Figure 4-28.
After AD is deployed, a confirmation is displayed, as well as any follow-up action needed for a successful AD deployment.
Just about any task that can be performed in the ADAC GUI can be done in PowerShell. For example, to enable the ADAC Recycle Bin, you can use this cmdlet:
Enable-ADOptionalFeature –Identity'CN=RecycleBinFeature, CN=OptionalFeatures,CN=DirectoryService,CN=WindowsNT, CN=Service,CN=Configuratio,DC=xyz, DC=local'ScopeForestofConfiguratioSet-Target 'xyzlocal'