How to Fix: Can't Resolve Windows Server 2012 Host Name (Remote Desktop)

Dennis Faas's picture

Infopackets Reader Giovani S. writes:

" Dear Dennis,

I happened to stumble across your website the other day -- very informative! I am using Windows 10 as my main PC, but I also installed Windows Server 2012 as a virtual machine. I am trying to connect to the Windows Server 2012 via Remote Desktop, however, the the UNC path of the Windows Server (\\server2012r2) will not resolve when I try and access it. I have googled this question a million times with a million different 'solutions', but I can't seem to find the answer. The only way I can connect to the Windows Server 2012 using remote desktop is if I use the IP address of the server. Obviously this isn't the desired way to do things. Can you help? "

My response:

I was also stumped by this question -- so I set up a new virtual machine to try and find the answer. To make things simple, I enabled the Windows Server GUI because I am not yet a Jedi master when it comes to the Windows Server command line.

How to Fix: Can't Resolve Windows Server 2012 Host Name (Remote Desktop)

Here is what I found:

  1. First, login to the Windows Server, then click Start (in the very utmost lower left hand corner of the screen), then type in "cmd" (no quotes); wait for Command Prompt to appear in the list, then right click it and select Run as Administrator.
     
  2. Run the 'sconfig' utility from the command line. Locate the option for "Remote Desktop" in the list and enable the feature.
     
  3. Exit the sconfig utility.
     
  4. The next thing you will want to do is load up the Windows Firewall. Click Start, then type in "windows firewall" (no quotes). Wait for "Windows Firewall with Advanced Security" to appear in the list, then click it. The Windows Firewall with Advanced Security window will appear; on the upper left hand side of the window, click on the "Inbound Rules" heading. Once it is highlighted, click the Action menu at the top of the window, then select New Rule.
     
  5. The "New Inbound Rule Wizard" window will appear. Click on the "Port" radio button option, then click Next. On the following window, select TCP, then in the "Specific local ports" heading, enter in "445" as the port number and click Next. On the following screen, click the "Allow the connection" radio button, then click Next. Now, choose whether you want the port accessible through Domain, Private or Public -- most likely you don't want it set for public; click Next. On the final page, enter in the name of the rule such as "SMB port 445 -- allow UNC resolution", then click Finish.
     
  6. You should now be back to the Windows Firewall with Advanced Settings page. At the top left of the screen, click on the Outbound Rules heading. Once it is highlighted, click the Action menu and select New Rule. Repeat Step #5 again, except this time you're setting it up for Port 445 as an outbound rule.
     
  7. Once you are finished, you should now be able to connect to the Windows Server 2012 virtual machine using the UNC path (\\server2012r2). I tested this myself and it works fine -- I am also using Windows 10 as my main machine.

I hope that helps.

Got a Computer Question or Problem? Ask Dennis!

I need more computer questions. If you have a computer question - or even a computer problem that needs fixing - please email me with your question so that I can write more articles like this one. I can't promise I'll respond to all the messages I receive (depending on the volume), but I'll do my best.

About the author: Dennis Faas is the owner and operator of Infopackets.com. With over 30 years of computing experience, Dennis' areas of expertise are a broad range and include PC hardware, Microsoft Windows, Linux, network administration, and virtualization. Dennis holds a Bachelors degree in Computer Science (1999) and has authored 6 books on the topics of MS Windows and PC Security. If you like the advice you received on this page, please up-vote / Like this page and share it with friends. For technical support inquiries, Dennis can be reached via Live chat online this site using the Zopim Chat service (currently located at the bottom left of the screen); optionally, you can contact Dennis through the website contact form.

Rate this article: 
Average: 5 (5 votes)