ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Building a First Active Directory Domain Controller on Windows 2012 R2 Core

    IT Discussion
    active directory server core windows windows server windows server 2012 r2 windows server core powershell command line sam windows administration domain controller install-addsforest install-windowsfeature
    4
    11
    3.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by

      Assuming that we have just installed, manually, a Windows Server 2012 R2 machine and have configured it with networking we are ready to begin building a working Active Directory Domain Controller from the command line. There is no need to have any GUI access, or even a GUI installed, in order to run a Domain Controller.

      First we need to rename our machine, or ensure that it has a good, usable name already.

      Rename-Computer prd-win-ad1
      Restart-Computer -Force
      

      I like the naming convention style here. We have "prd" to denote production, "win" to denote a Windows server and "ad1" to tell us that this is our first Active Directory Domain Controller. You can use any convention that you like, of course. As always, reboot after a rename.

      Now that our machine is renamed (and we assume that you have a static IP assigned to it, AD DCs need static IP addresses to work properly) and rebooted, we can simply run a few PS commands to promote our machine to be an Active Directory Domain Controller.

      We should note here that the dcpromo command still exists for the moment, but has been deprecated in Server 2012 R2 and will not be available in future Windows Server releases, so we want to discontinue using it.

      First we just install the proper components:

      Install-WindowsFeature -Name AD-Domain-Services
      

      0_1469035051316_Screenshot from 2016-07-20 13:06:30.png

      Now we will create a password variable to use in our domain creation command, replace mypassword with a securepassword of your own...

      $Password = ConvertTo-SecureString -AsPlainText -String mypassword -Force
      

      And now we can do the actual promotion process.

      Install-ADDSForest -DomainName ad.mydomain.com -SafeModeAdministratorPassword $Password -DomainNetbiosName mydomain -DomainMode Win2012R2 -ForestMode Win2012R2 -DatabasePath "%SYSTEMROOT%\NTDS" -LogPath "%SYSTEMROOT%\NTDS" -SysvolPath "%SYSTEMROOT%\SYSVOL" -NoRebootOnCompletion -InstallDns -Force
      

      If this completes successfully you should get a message like this one:

      0_1469040377712_Screenshot from 2016-07-20 14:45:59.png

      Once this has completed, we simply need to reboot, again.

      Restart-Computer -Force
      

      References:

      Technet Guide to DCPromo

      A legacy dcpromo approach would be: dcpromo.exe /unattend /NewDomain:forest /ReplicaOrNewDomain:Domain /NewDomainDNSName:domain.tld /DomainLevel:4 /ForestLevel:4 /SafeModeAdminPassword:"mypassword"

      1 Reply Last reply Reply Quote 7
      • IRJI
        IRJ
        last edited by

        Good article. There is ZERO reason to have a GUI on a Domain Controller. Everything can be done through Server Manager on Windows 10/8

        thwrT 1 Reply Last reply Reply Quote 3
        • thwrT
          thwr @IRJ
          last edited by

          @IRJ said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

          Good article. There is ZERO reason to have a GUI on a Domain Controller. Everything can be done through Server Manager on Windows 10/8

          You mean RSAT 😉

          coliverC 1 Reply Last reply Reply Quote 0
          • coliverC
            coliver @thwr
            last edited by

            @thwr said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

            @IRJ said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

            Good article. There is ZERO reason to have a GUI on a Domain Controller. Everything can be done through Server Manager on Windows 10/8

            You mean RSAT 😉

            Both? You can do a lot of directory management through Server Manager as well.

            thwrT 1 Reply Last reply Reply Quote 1
            • thwrT
              thwr @coliver
              last edited by thwr

              @coliver said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

              @thwr said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

              @IRJ said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

              Good article. There is ZERO reason to have a GUI on a Domain Controller. Everything can be done through Server Manager on Windows 10/8

              You mean RSAT 😉

              Both? You can do a lot of directory management through Server Manager as well.

              Ok, agree. Just don't like the Server Manager this much, ugly interface. I want to be sure WHICH drive on WHICH host I'm going to format for example. But that is just my personal opinion and I'm more or less a console fetishist 😉

              But when it comes to ADSIedit or AD sites, you really want to have RSAT.

              coliverC IRJI 2 Replies Last reply Reply Quote 1
              • coliverC
                coliver @thwr
                last edited by

                @thwr said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

                @coliver said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

                @thwr said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

                @IRJ said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

                Good article. There is ZERO reason to have a GUI on a Domain Controller. Everything can be done through Server Manager on Windows 10/8

                You mean RSAT 😉

                Both? You can do a lot of directory management through Server Manager as well.

                Ok, agree. Just don't like the Server Manager this much, ugly interface. I want to be sure WHICH drive on WHICH host I'm going to format for example. But that is just my personal opinion and I'm more or less a console fetishist 😉

                But when it comes to ADSIedit or AD sites, you really want to have RSAT.

                Agreed, it will do most of the basic user management and configuration stuff. But anything LDAP related is better done with other tools.

                1 Reply Last reply Reply Quote 1
                • scottalanmillerS
                  scottalanmiller
                  last edited by

                  Strangely MS hasn't come up with a single tool set yet for remote management. But they are improving with every release. And PowerShell still does an awful lot without any GUI tools at all, even remote ones.

                  1 Reply Last reply Reply Quote 0
                  • IRJI
                    IRJ @thwr
                    last edited by

                    @thwr said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

                    @coliver said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

                    @thwr said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

                    @IRJ said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

                    Good article. There is ZERO reason to have a GUI on a Domain Controller. Everything can be done through Server Manager on Windows 10/8

                    You mean RSAT 😉

                    Both? You can do a lot of directory management through Server Manager as well.

                    Ok, agree. Just don't like the Server Manager this much, ugly interface. I want to be sure WHICH drive on WHICH host I'm going to format for example. But that is just my personal opinion and I'm more or less a console fetishist 😉

                    But when it comes to ADSIedit or AD sites, you really want to have RSAT.

                    huh?

                    0_1469044083616_2016-07-20_15-47-37.png

                    thwrT coliverC 2 Replies Last reply Reply Quote 0
                    • thwrT
                      thwr @IRJ
                      last edited by

                      @IRJ said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

                      @thwr said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

                      @coliver said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

                      @thwr said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

                      @IRJ said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

                      Good article. There is ZERO reason to have a GUI on a Domain Controller. Everything can be done through Server Manager on Windows 10/8

                      You mean RSAT 😉

                      Both? You can do a lot of directory management through Server Manager as well.

                      Ok, agree. Just don't like the Server Manager this much, ugly interface. I want to be sure WHICH drive on WHICH host I'm going to format for example. But that is just my personal opinion and I'm more or less a console fetishist 😉

                      But when it comes to ADSIedit or AD sites, you really want to have RSAT.

                      huh?

                      0_1469044083616_2016-07-20_15-47-37.png

                      That's RSAT

                      IRJI 1 Reply Last reply Reply Quote 1
                      • IRJI
                        IRJ @thwr
                        last edited by

                        @thwr said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

                        @IRJ said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

                        @thwr said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

                        @coliver said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

                        @thwr said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

                        @IRJ said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

                        Good article. There is ZERO reason to have a GUI on a Domain Controller. Everything can be done through Server Manager on Windows 10/8

                        You mean RSAT 😉

                        Both? You can do a lot of directory management through Server Manager as well.

                        Ok, agree. Just don't like the Server Manager this much, ugly interface. I want to be sure WHICH drive on WHICH host I'm going to format for example. But that is just my personal opinion and I'm more or less a console fetishist 😉

                        But when it comes to ADSIedit or AD sites, you really want to have RSAT.

                        huh?

                        0_1469044083616_2016-07-20_15-47-37.png

                        That's RSAT

                        I updgraded from Windows 8 so I assumed this was just Server Manager in Windows 10, but yes you are right.

                        1 Reply Last reply Reply Quote 1
                        • coliverC
                          coliver @IRJ
                          last edited by

                          @IRJ said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

                          @thwr said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

                          @coliver said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

                          @thwr said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

                          @IRJ said in Building a First Active Directory Domain Controller on Windows 2012 R2 Core:

                          Good article. There is ZERO reason to have a GUI on a Domain Controller. Everything can be done through Server Manager on Windows 10/8

                          You mean RSAT 😉

                          Both? You can do a lot of directory management through Server Manager as well.

                          Ok, agree. Just don't like the Server Manager this much, ugly interface. I want to be sure WHICH drive on WHICH host I'm going to format for example. But that is just my personal opinion and I'm more or less a console fetishist 😉

                          But when it comes to ADSIedit or AD sites, you really want to have RSAT.

                          huh?

                          0_1469044083616_2016-07-20_15-47-37.png

                          Those options are generally only there is RSAT is installed.

                          1 Reply Last reply Reply Quote 2
                          • 1 / 1
                          • First post
                            Last post