locked
Windows Server 2012 R2 (Promoting a Domain Controller) RRS feed

  • Question

  • To whomever can help,

    I'm still fairly new to the world of Powershell, so I'm not an experienced user. I'm trying to emulate what I've been reading in a book, to increase my understanding and knowledge. I was trying to promote my server to a domain controller.

    One of the first steps that I read was to acquire the AD Binaries, which I successfully did. The next step was promoting the DC. I tried the command:

    Test-ADDSDomainControllerInstallation -InstallDns -Credential (Get-Credential DomainName\User Name) -DomainName "Domain Name"  Format-List

    Questions:

    1. I bolded a few sections, because I want to make sure that I understand those. I'm assuming for Get-Credential, it wants the domain name and user name for an admin account, but I'm not 100% sure.

    2. This is a trial version of 2012 R2, and it's currently a workgroup. Does it need to be in a domain first?

    The book that I'm reading doesn't seem to want me to use the old DCPromo command, so I'm trying to follow along. Hopefully, I've provided enough info, but if I haven't, please ask.

    Regards,

    Friday, December 14, 2018 10:28 PM

Answers

  • Is this the first DC in the domain?  If it is not then you must join the domain before trying to promote.

    To create the second and later DCs start by joining the domain.  After the join and restart you can just promo the server with the options you require.  This is true with PS CmdLets or with DCPromo command.


    \_(ツ)_/


    • Edited by jrv Tuesday, December 25, 2018 10:46 PM
    • Marked as answer by jrv Wednesday, December 26, 2018 9:26 PM
    Tuesday, December 25, 2018 10:43 PM

All replies

  • Also, I forgot, when I ran the command, it asked me for a SafeModeAdministratorPassword. I don't remember setting that up.
    Friday, December 14, 2018 10:41 PM
  • When first learning PowerShell you need to fist learn to use "help".  All of you issues are answered clearly in the help.

    help Test-ADDSDomainControllerInstallation -online

    To learn how to use help type: help help

    You can also just paste the command into your search engine to find the documents:

    https://docs.microsoft.com/en-us/powershell/module/addsdeployment/test-addsdomaincontrollerinstallation?view=win10-ps

    If, after carefully reading all of the help, you still have an issue then post a single question and a code sample with any error.


    \_(ツ)_/

    Friday, December 14, 2018 11:38 PM
  • Yes, I should have consulted the help files.
    Saturday, December 15, 2018 11:58 AM
  • Hi,

    Thanks for your question.

    After you read the help file of "Test-ADDSDomainControllerInstallation" cmdlet, have you solved your problem?

    If you haven't solved your problem, please post your code with the error. If you have solved it,  please "mark it as answer" to help other community members find the helpful reply quickly. 

    About setting up Active Directory via PowerShell, please refer the link below:

    https://blogs.technet.microsoft.com/uktechnet/2016/06/08/setting-up-active-directory-via-powershell/

    Best Regards,

    Lee


    Just do it.

    Monday, December 17, 2018 1:49 AM
  • Well your book is making it a bit harder on you, I work in a prod environment for 17 years and have never had to use PowerShell or CLI to promote a DC. Once the Active Directory Domain Services role is installed, DCPromo works just fine.

    Here is a pretty good step by step:

    https://interworks.com/blog/ijahanshahi/2014/01/06/promoting-windows-2012r2-server-domain-controller/

    Tuesday, December 18, 2018 10:09 PM
  • Well your book is making it a bit harder on you, I work in a prod environment for 17 years and have never had to use PowerShell or CLI to promote a DC. Once the Active Directory Domain Services role is installed, DCPromo works just fine.

    Here is a pretty good step by step:

    https://interworks.com/blog/ijahanshahi/2014/01/06/promoting-windows-2012r2-server-domain-controller/

    While your suggestion is not wrong you should consider the following.

    There ae many good reasons to use PowerShell to install and promote a DC.  DCPromo does not do all of this as well and some things can only be done at the DC.

    The OP is trying to learn how to manage a domain with PowerShell.  Old utilities are not helpful in this case.


    \_(ツ)_/

    Tuesday, December 18, 2018 10:14 PM
  • Hi,

    Was your issue resolved?

    If you resolved it using our solution, please "mark it as answer" to help other community members find the helpful reply quickly.

    If you resolve it using your own solution, please share your experience and solution here. It will be very beneficial for other community members who have similar questions.

    If no, please reply and tell us the current situation in order to provide further help.

    Best Regards,

    Lee


    Just do it.

    Monday, December 24, 2018 3:06 AM
  • Tuesday, December 25, 2018 10:01 PM
  • Group,

    Using the error messages, I'm able to narrow down my problems. One more to go:

    Tuesday, December 25, 2018 10:22 PM
  • I'm trying to only use PowerShell. This server is currently a WORKGROUP.

    Regards,

    Tuesday, December 25, 2018 10:37 PM
  • Is this the first DC in the domain?  If it is not then you must join the domain before trying to promote.

    To create the second and later DCs start by joining the domain.  After the join and restart you can just promo the server with the options you require.  This is true with PS CmdLets or with DCPromo command.


    \_(ツ)_/


    • Edited by jrv Tuesday, December 25, 2018 10:46 PM
    • Marked as answer by jrv Wednesday, December 26, 2018 9:26 PM
    Tuesday, December 25, 2018 10:43 PM
  • Is this the reason I'm getting these warnings? I was under the impression that I was merely promoting my Server from a workstation to a domain. Then, I would join an existing domain, but perhaps I have it wrong. My parent domain is Windows Server 2008 Enterprise SP2. I know it's outdated, but this is all learning for me. No live customers. It seems that restarting my server got it pass the last step, minus the warnings:

    Wednesday, December 26, 2018 1:13 PM
  • You can only add a DC after the server has been joined to the domain.  If you promo a workgroup server directly it will always create a new domain.

    Before trying to use PowerShell you need to first study Windows domain networking.  Without the basic knowledge you will never be able to understand how to use the PS CmdLets or how to use PS in a domain.


    \_(ツ)_/

    Wednesday, December 26, 2018 1:29 PM
  • Understood and agreed. Things were done out of order, because I couldn't get some of the commands to work, so I just wanted to first understand the syntax. In this case, I skipped the Testing/Joining a Domain step. I will have to reverse a few steps, and work on this now.

    Regards,

    Wednesday, December 26, 2018 5:46 PM
  • Group,

    I will go ahead and mark this one as answered. In addition to having to understand the syntax a little better. There was a step that was not included in the literature that I'm studying, the Install-ADDSForest command. The literature began under the assumption that the system was already a member of a domain. I did a little research, so all is good now.

    Thank you all for your advice!

    Regards,

    • Marked as answer by WoodStarz Wednesday, December 26, 2018 9:19 PM
    • Unmarked as answer by jrv Wednesday, December 26, 2018 9:26 PM
    Wednesday, December 26, 2018 9:19 PM