Month: January 2016

SCCM 2012 R2 (Configuration Manager) – Setup is unable to connect to SQL Server

Chances are you have a named instance for your SCCM SQL install, which is definitely the way to go. However, when installing SCCM 2012 (R2) you are presented with the following error.

Setup is unable to connect to SQL Server with the connection information provided. Verify the following:

  • The SQL Server and instance names are entered correctly
  • The specified SQL Server instance is not configured to use dynamic ports
  • If a firewall is enabled on the SQL Server, inbound rules exist to allow connections to the correct ports
  • The account used to run Setup has permissions to connect to the specified SQL server instance



To resolve this is pretty pain-less.

In my scenario, I implemented the following two solutions:

  1. Enable Named Pipes for your SQL Server Network Configuration
  2. Delete all Dynamic (TCP/IP) Ports within the Protocols for your SQL Named Instance

First, to Enable Named Pipes, Launch SQL Server Configuration Manager, expand the SQL Server Network Configuration. Locate your named instance, right-click on TCP/IP and enable.


Second, within the same console view, double-click and open the TCP/IP properties.

  • Here you need to delete any 0‘s (Zero’s) assigned to the TCP Dynamic Ports (Yes, remove for all IPv4, IPv6, IPAll, etc.).
  • Also within the IPAll there will be a random port assigned here (TCP Dynamic Ports), go ahead and delete this too.
  • Lastly, now you need to assign some port (ensure this port is open between your SCCM server and SCCM SQL server, if you are making use of the Windows or any Firewall(s)). In my case, I decided to assign port 1433. Within each interface, IPv4, IPv6, etc. apply your port here within the TCP Port. (See below)



Once you have implemented the two solutions above, now go ahead and restart the SQL Server (instance name) service.


Now proceed with your SCCM 2012 R2 Install.

If you want to learn more on Configuring SQL Server and TCP Port(s), please see the following Microsoft article, HERE.


Exporting and Importing VMs in Hyper-V 2012R2

Let’s say you have a Virtual Machine on one Hyper-V server, and need to migrate it over to another Hyper-V server. For whatever reasons, end of life on the existing server, different data center, etc. Of course this is one of the many good reasons why having a clustered Hyper-V environment is the way to go, but this post is not about that. So, let’s get to it.


  • First, shutdown your VM and determine a destination to store the VM. Simply shutdown the VM within the Hyper-V console, and right-click and select Export. Once you define this, you can track its progress. Depending on your storage, how big the VM is, Hyper-V server specs, etc. this could take a few minutes…




  • Next, copy the VM data (you just exported) to the new Hyper-V server or some storage location. Again, based on your environment, network, server etc., this could take a few minutes.


  • Next, on your (new) Hyper-V server, launch the Hyper-V console, and select Import. Browse to the location where the VM being imported resides.



  • When selecting the Import Type, I chose the third option (Copy the virtual machine (create a new unique ID))


  • Now you can set the location of the VMs properties, or leave them defaulted to your Hyper-V servers settings.


  • Depending on your VM/Hyper-V server, you may have had some fancy properties, like a virtual switch. In my case I did, and on the new Hyper-V server I did not have the same virtual switch, or at least not the same name. You can either create the Network Switch your VM requires, or select “Not Connected” and finish this task later.


  • Now you can go ahead and finish the import process, and allow the new machine to be officially imported on your new Hyper-V hypervisor. Again, based on your environment, this may take a few moments, so go get another coffee, and enjoy!




Setting up a KMS Server – Windows Server 2012R2

What is a KMS? Microsoft’s KMS allows you to automate license activation for Windows servers and/or applications. In my case, I am using KMS for Windows 2012R2 license activation.  (Oh, KMS stands for Key Management Server) The setup is simple, it took me no more than 15 minutes. Below are the steps I took to set this up. Some pieces of information, I decided to dedicate a server for KMS. Also, when adding the Windows server key, double check and ensure you are using a valid Volume License key, and a KMS key — not MAK! (Yes, there is a difference)

For starters I am going to assume you already made note of the license key from your Microsoft Volume License Servicing Center portal.

As mentioned, I decided to stand up a server dedicated for KMS.

From the Windows Server Manager, install the “Volume Activation Services” role either via the GUI, or via PowerShell. If via PowerShell, here is that command, “Install-WindowsFeature -Name VolumeActivation -IncludeAllSubFeature

Once the role has been installed, launch the Volume Activation Tool console, and essentially next, next, finish!

  • Browse/Select the server that will be hosting the KMS (service):


  • Paste in your KMS Host/License Key:



  • Choose “Active online



Here, you have some options, how often would you like KMS to check-in, how often would like KMS to apply the key, etc. I left my settings at default, but (assuming) your environment is domain based, check mark Domain for KMS firewall exceptions. Also, by default, KMS listens on TCP port 1688.



And that is is! Now your existing/new Windows 2012R2 servers will have their licence automatically activated within 2 hours.