Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

4. Active Directory > Using PowerShell to Deploy Active Directory

Using PowerShell to Deploy Active Directory

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.

Deploying AD with PowerShell

Figure 4-27. Deploying AD with PowerShell

Installing AD in PowerShell

Figure 4-28. Installing AD in PowerShell

After AD is deployed, a confirmation is displayed, as well as any follow-up action needed for a successful AD deployment.

Note

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'