Header Ads

recent

How to Install a New Windows Server 2012 Active Directory Forest using PowerShell

There are many ways/methods are available to install the Active Directory, here I am going to explain you one of the PowerShell command line method to install Active Directory.
This step by step process explain you to install AD using PS command.
In Windows Server 2012, AD DS replaces the Dcpromo tool with a Server Manager and Windows PowerShell-based deployment system.
To install activity directory on windows Server 2012, we need to first install AD-DS Service
Install AD-DS Service using windows feature PS command as shown in below.
PS C:\> Add-WindowsFeature ad-domin-services
Once installation started you will see progress bar to give you status on it.
Once installation completed you will get successful installation exit code as shown below.
PS C:\> Add-WindowsFeature ad-domain-services

Success Restart Needed Exit Code      Feature Result                          
------- -------------- ---------      --------------                          
True    No             Success        {Active Directory Domain Services, Rem...

PS C:\> 
Now next step to start the actual installation of your Activity directory installation new DC in new Forest, go to PowerShell command control use the “Install-ADDSForest” command with -DomainName switch like showed in below.
PS C:\> Install-ADDSForest -DomainName sysadminworld.lab

Once you enter it will ask you to provide the “Safemodeadministratorpassword” you should remember this pass word since this password will useful when you restore the Active Directory please refer below snap.
PS C:\> Install-ADDSForest -DomainName sysadminworld.lab
SafeModeAdministratorPassword: ********
Confirm SafeModeAdministratorPassword: ********
Once you confirm the password it will as you reboot confirmation after successfully installation completed press Y to yes
PS C:\> Install-ADDSForest -DomainName sysadminworld.lab
SafeModeAdministratorPassword: ********
Confirm SafeModeAdministratorPassword: ********

The target server will be configured as a domain controller and restarted when this operation is
complete.
Do you want to continue with this operation?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"):
Once you confirm it will start installing AD on your server, it will show each background installation task progress.
After installation is completed you will get successful status message .
PS C:\> Install-ADDSForest -DomainName sysadminworld.lab
SafeModeAdministratorPassword: ********

 Install-ADDSForest

   Validating environment and user input
      All tests completed successfully
      [oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo]
   Installing new forest
      Configuring the DNS Server service on this computer...


Congratulation you have successfully installed AD

No comments:

Systemadminworld. Powered by Blogger.