Deploying and Configuring Server Core VMs on Hyper-V (Part 4)

If you would like to read the other parts in this article series please go to


In my previous article, I showed you how you could manually provision a core server with an IP address and then verify network connectivity. Now that we have established connectivity to the network, it is time to join the server to a domain. In this article, I will show you how.

Renaming the Server

Technically, renaming the server isn’t a requirement to joining it to a domain. However, when I look at the list of computers on my network, I like to have some idea of which machine is which. Windows Server 2008 and 2008 R2 are nice in that they automatically provide you with unique computer names, but those names aren’t very meaningful.

To rename a core server you will have to use the NETDOM command and provide the old computer name and the new computer name. The exact command that you will use is:

NETDOM RenameComputer <old name> /NewName:<new name>

Of course there is one minor problem with this command. Being that core servers don’t have a full blown GUI, you can’t just right click on Computer and choose the Properties command from the shortcut menu to retrieve the computer name as you could with a regular deployment.

There are two ways that you can get around this problem. The first thing that you can do (in Windows Server 2008 R2 only) is to use the Sconfig tool. To do so, simply type SCONFIG.CMD at the command prompt and Windows will launch the tool. As you can see in Figure A, the tool will tell you what the computer name is.

Figure A: The Sconfig tool tells you what computer name is in use.

If you aren’t using Windows Server 2008 R2, or if you just prefer working from the command line you can determine the computer name by using environment variables. Windows has a built in environment variable called %computername% that contains the name of the computer. If you want to know the computer’s name, simply type this command:

Echo %computername%

You can see what the output from this command looks like in Figure B.

Figure B: You can use environment variables to determine the computer name.

Just as you can use the %computername% environment variable to determine the computer name, you can also use it as a shortcut to avoid having to type the computername into the NETDOM command that I showed you earlier. Simply replace the old name with the environment variable. For example, suppose that I wanted to rename my test server to ServerCore. I could do so by using this command:

NETDOM RenameComputer %computername% /NewName:ServerCore

You can see what this command looks like when executed in Figure C.

Figure C: You can use the %computername% environment variable in conjunction with the NETDOM command.

Keep in mind that you must reboot the server after renaming it.

Joining a Domain

Now that I have shown you how to rename a core server, I want to show you how to join your server to a domain. As with renaming a server, joining the server to a domain is accomplished by using the NETDOM command. This time though, we are going to be using a completely different set of parameters. Specifically, we must provide Windows with the name of the domain that we want to join, and a set of authentication credentials that can be used to actually join the domain. The command itself looks like this:

NETDOM Join <Computer Name> /Domain:<Domain Name> /Userd:<user name> /Passwordd:*

Before I demonstrate this command, there are a few things that I need to point out. First of all, pay attention to the /Userd switch. It’s spelled Userd, not UserID. Likewise, the /Passwordd switch has two Ds at the end. I don’t know why Microsoft chose to spell things the way that they did.

Another thing that is worth pointing out is that normally you can provide the NetBIOS name for your domain. Depending on how your DNS server is set up though, there may be situations in which you have to provide the Fully Qualified Domain Name (FQDN) instead of the domain’s NetBIOS name (for example instead of lab).

Finally, you will notice that I have placed a colon and an asterisks after Passwordd. This tells Windows that you want to key in the password yourself rather than entering it as a part of the command. The advantage to doing so is that the password is masked when you type it, whereas it would have appeared on screen in clear text had you included it in the command.

With that said, suppose that I want to join my server to a domain named The actual command that I would use to do so is:

NETDOM Join %computername% /Domain:lab /Userd:Administrator /Passwordd:*

You can see what this command looks like when executed in Figure D.

Figure D: You can use the NETDOM command to join the server to a domain.

You must reboot the server after jointing it to a domain.

Activating  Server Core

The last thing that I want to show you is how to activate a core server. Before activating your server, I recommend looking at the server’s activation status. The easiest way to do so is to enter the following command:

Start /W slmgr.vbs –dli

You can see what the output from this command looks like in Figure E.

Figure E: You can use the Start /W slmgr.vbs –dli command to view the server’s activation status.

Entering a Product Key

I have to admit that I am the world’s worst about installing Windows Server without entering a product key. Of course this always comes back to bite me when it comes time to activate the server. Thankfully, Microsoft does provide you with a way of entering a product key if you need to.

To provide a core server with a product key, enter the following command:


Of course you would replace AAAAA-BBBBB-CCCCC-DDDDD-EEEEE with your actual product key. I also want to mention that you only have to enter a product key if you did not provide one during Windows Setup. In this case I’m not going to show a screen capture, as I do not wish to expose my product key to the world.

Activating Windows

Once you have entered a product key (either during Windows installation or later using SLMGR.VBS), you can activate Windows. The actual activation process also uses the SLMGR.VBS command. The command for activating Windows is:

Start /W slmgr.vbs –ato


In this article, I have shown you how you can use the command line to rename your server, join the server to a domain, check the server’s activation status, and provide a product key and activate the server if necessary.

Now that we have established basic server functionality, it is time to configure our core server to actually do something. In Part 5 of this series, I will show you how to begin assigning roles to a core server.

If you would like to read the other parts in this article series please go to

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top