Welcome to Part 2 of my “Quickly Build a Multi-Server SharePoint 2013 Developer Environment” blog post series. The idea for this series of posts started while I was reading Vlad Catrinescu’s blog about building a single server environment. It’s a great blog post, but I wanted a multi-server installation so decided to write a series of posts to describe the process of accomplishing this. If you’re wanting to build out a multi-server developer environment, the information in this series will help you achieve this..

In Part 1 I outlined the environment, showed you how to create and configure your VMs with PowerShell and walked you through installing Windows Server 2012. Click here to review that post. In this post I am going to show you how to configure your Domain Controller and Active Directory environment.

Posts in this series:


Special note: I like to give credit where it is due. Some of the ideas and code I use in this series come from Vlad’s blog series I linked to above.  And a huge thank you to Joanne Klein (@JoanneCKlein) for reviewing and editing the series for me.


I am going to make some assumptions here:

  • You already have your VMs created and configured as I listed in Part 1 of the series.
  • Note: When you created your VMs, you only added a private network switch. We will connect an external one later, but for now just the private.


As I stated above, we will only be using private and external switches. We could use an internal switch, but I have found that this causes problems with DNS routing. Although there may be an easier way around this, but I am not a networking expert and this is the solution I use. It does mean during the initial setup you are limited to the Hyper-V remote desktop and you can’t use other tools.  The upside is you won’t run into slow network connections caused by the VM network interfering with your host network and vice versa. Once you’ve added external connections to the VM, these tools will become available to you once you.

Note: You won’t be able to connect to your host PC until you enable your external switch. I will indicate when you can do that, but the scripts I have created are setup so you don’t actually have an external connection until a bit later.

Prep Work

You don’t have to do this, but I just found it easier to organize my files for future deployments. On your local system create a folder to contain all the scripts, configs and executables you will need. Let’s call it DevVMScripts. Inside create 3 folders for the DC, SQL and one to share for your SP servers.

  • In the domain controller folder place the Service Account config folder (XML) and the service account ps1 file.
  • Mount the Server 2012 image in your choice of DVD Daemon tools. From that image copy the sxs folder from Root\sources into your SQL server’s folder (ie. C:\VMPrep\SQLServer).
  • Download AutoSPInstaller and AutoSPSourceBuilder and store them in the SharePoint folder.  Extract AutoSPInstaller and place the copy the SP folder (with all contents) into the SharePoint folder (C:\VMPrep\SharePoint).  Place AutoSPSourceBuilder in  a folder of the same name within the SharePoint folder (SharePoint\AutoSPSourceBuilder).

Configure Domain Controller, Install Active Directory and DNS and build Service Accounts

So now we get to the good part – the scripts that do all the work for us. This first script will set the server’s name, configure its IP (static) and add Active Directory. Once it is complete it will reboot the server for you.

Before we can do any of this, we need to tell Windows to execute our scripts for us with out complaining.

Next we are going to rename the server to one of our choice and then configure the network on the private switch. Quick note: I am renaming the network adapter so we can tell the difference between the private connection and the external connection we will add later.


Our final step before we reboot the server is to install the AD feature. We will configure it, once the server reboots.

Now that AD has been installed, we need to configure it.  This will build out your forest and domain.  Remember to change the name of your domain to one of your choosing or you’re going to be using the same one I have setup for my environment.

Quick note: when you run the above command, you will still be prompted for a Safe Mode Administrator Password. Once it has completed the configuration, it is going to reboot the server.


Because this is the AD and DNS server for a multi-server environment we need to add a reverse lookup in DNS for any servers coming on.


Now that our network is configured; shutdown your VM and add the external switch.


Creating an external Switch

To add the external switch perform the following steps:

  • Click on Virtual Switch Manager in the Actions menu on the right hand side of the Hyper-V manager


  • In the right hand frame of the new window select external and click on Create Virtual Switch


  • Enter in a name for the switch, select the network adapter you want it to use (if multiple available)


  • Click finish.
  • From there update the settings of your VM
    • Under Add new Hardware select Network Adapter
    • Select the newly created switch
    • Restart the VM


Create SharePoint and SQL Service Accounts

Copy over the files I indicated above in the preparation section.

Now we want to add the SharePoint and SQL system accounts for our install. Vlad’s tool creates the accounts based on three different levels. You can read more about these levels here. To change the setting in the command line, simply change the -Level setting to Low, Medium or High based on your needs. Note: when you launch the tool, it will prompt you for a password to be used for all the accounts. You can enter whatever you choose.

Now that you have added the accounts and while we are still working on the DC, let’s setup the domain admin group with the admin accounts:


Finalize Your Scripts for Next Time

One of the things I suggest for your scripts is you split them up into separate .ps1 files so it is just a matter of executing them in order. When you have created your files, copy them to C:\SharePoint as all the scripts point there (I liked Vlad’s idea to have a central point and write all the scripts around it). Here’s what I did:




That’s it! You now have a fully functioning and ready to go domain controller for your environment. I bet it probably took you longer to read my post than to actually build out the environment.

Click here for the next post in this series: Installing and Configuring SQL Server 2012


Thanks for reading!