1. Open the Server Manager
2. From Server Manager Dashboard select Add roles and features. This will launch the Roles and Features Wizard allowing for modifications to be performed on the Windows Server 2012 instance.
3. Select Role-based or features-based installation from the Installation Type screen and click Next
4. Select the server you want to install Active Directory on and click next
5. From the Server Roles page place a check mark in the box next to Active Directory Domain Services
6. A popup will appear with the features required for Active Directory Domain Services click Add Features
7. Review and select optional features to install during the AD DS installation by placing a check in the box next to any desired features; Once done click Next
8. Review the information on the AD DS tab and click Next.
9. Review the installation and click Install
Watch Video on how to install Active Directory Domain Services in Server 2012 R2