The power is at your hands – HYPER-V

Today I got some time to myself.   A rarity.   And thus I got to really play with Hyper-v (Formerly known as Windows Server Virtualization, mostly I think because Hyper-V is so much cooler sounding.. ๐Ÿ™‚ )

Now just to let you know, I am cheap. I have no budget.  So my Virtualization environment has to fit that budget. 

So what do you need?

Uhhh… You need a computer (SLAP!)

Yeah I felt that one coming. 

Ok, reality.  You need a processor with 64bit capability. Itanium will not cut it.  Newer Intel / AMD chips and most newer Xeon processors will have this.

It needs to support Virtualization at a hardware level on the CPU directly.  Again, not all chips have this and you will need to research.  But mine is a 2.4 Ghz Core2 chip 6600 series.   Pretty budget minded if you look on eBay or even your local shop.   The board for my chip was about $200.

Four gig of ram (you can do it with 2 though, I did to start) is about $100.

You can run it on any hard drive but a 500 gig is just about $100 as well.

So with a budget of about $500 you can have the guts to play.  and I do mean PLAY!

If you don’t have the budget to Buy Server 2008 and you’re just a guy like me, you have two options.  You can download the Trial media from Microsoft for free.  I believe it runs for 120 days if not 180.

Or if you can swing it, get "Technet Direct".  It’s normally $300 but look about on the internet.  Microsoft has been having it on special for $200.  That will get you just about every operating system and server application they have to play with for a FULL YEAR (Even comes with two of those very expensive product support calls included!)

Now just so you get a feel for what you can do with this power, here’s what I am doing right now.

Running 7 operating systems side by side.  Server 2008, Server 2008 with Exchange 2007, Server 2008 Core, Server 2008 in Terminal Mode, Server 2003 and Server 2003 with Exchange 2007 with a Vista workstation to boot.  All in 64 bit mode.

All happy.  

Granted this is NOT best practice.  But my overall cpu is not spiking at all.  I’ll give you more details later tonight as I start loading it up but it is absolutely amazing what you can pull off with this.    And the more ram you throw at it.  The faster she goes… ๐Ÿ™‚

The Energized Tech
Dedication and Inspiration creating the new Generation

The Power of Command – Renaming your computer

Well we’re sitting down in front of our Server 2008 Core install.    If you’re lazy like me, you just dropped in the media, let it run and install.  Now you want to play.

But wait, what name does the computer have?

"Oh easy!" You say to yourself. "I’ll just pop into the "Properties" of the "System" and check the name from there.  

Oh right.  No GUI.

Panic sets in.     The boss is screaming.  "I need that new server online.  We need SRV2K8CORE online now. MOVE IT OR YOU’RE WORKING FOR the Burger King!"

Bosses say things like that.  It’s called "Employee incentive."  Lawyers call it "Potential Cashflow."

But back to reality.  You need to name this thing something other than the random "WIN-2349FNS" that the media created for you.

So how to start?

Surprisingly it’s very easy.  Another thing that, once done; you can throw into a script rather than remembering all that nonsense.  

I mean nobody actually memorizes these commands right?  That would be so… so … NERDY!

So at your command prompt (Because that’s all ya got in Core buddy!) type in


You’ll get some answer like






Whatever obscure or meaningful name it coughs up, that is the PRESENT name of your server.  Renaming is easy.  Just type in

/Alt/Sub Hyper -$%#@@ ^JOj8 !!! DIR — #$%! INSERT ….

No I was pulling your chain, it’s actually simpler and makes sense

You can use the NETDOM.EXE command.   This is your equivalent to the "Network Identifcation" tab from before in GUI land.

So at your command prompt key in


For help in playing with this command.  You’ll get the following screen.

NETDOM RENAMECOMPUTER machine /NewName:new-name
           [/UserD:user [/PasswordD:[password | *]]]
           [/UserO:user [/PasswordO:[password | *]]]
           [/REBoot[:Time in seconds]]

NETDOM RENAMECOMPUTER renames a computer. If the computer is joined to a
domain, then the computer object in the domain is also renamed. Certain
services, such as the Certificate Authority, rely on a fixed machine name.
If any services of this type are running on the target computer, then a
computer name change would have an adverse impact. This command should not
be used to rename a domain controller.

machine is the name of the workstation or member server to be renamed

/NewName        Specifies the new name for the computer. Both the DNS host
                label and the NetBIOS name are changed to new-name. If
                new-name is longer than 15 characters, the NetBIOS name is
                derived from the first 15 characters

/UserD          User account used to make the connection with the domain.
                The domain can be specified as "/ud:domainuser". If domain is
                omitted, then the computer’s domain is assumed.

/PasswordD      Password of the user account specified by /UserD. A * means
                to prompt for the password

/UserO          User account used to make the connection with the machine to
                be renamed. If omitted, then the currently logged on user’s
                account is used. The user’s domain can be specified as
                "/uo:domainuser". If domain is omitted, then a local computer
                account is assumed.

/PasswordO      Password of the user account specified by /UserO. A * means
                to prompt for the password

/Force          As noted above, this command can adversely affect some services
                running on the computer. The user will be prompted for
                confirmation unless the /FORCE switch is specified.

/REBoot         Specifies that the machine should be shutdown and automatically
                rebooted after the Rename has completed. The number of seconds
                before automatic shutdown can also be provided. Default is
                30 seconds

                Use secure credentials popup to specify credentials. This
                option should be used when smartcard credentials need to be
                specified. This option is only in effect when the password
                value is supplied as *

NETDOM HELP command | MORE displays Help one screen at a time.


As you can see, a pile of information is presented.  But I can see from the top line, the one I want is really obvious.

NETDOM RENAMECOMPUTER machine /NewName:new-name

There are additional parameters I can add, like my credentials in order to be allowed to rename it, force a reboot etc.  But all I want is to name this silly machine to something normal before my boss gets ideas about transferring me to the sanitation division.

So in my case my computer was called


Because as I said before, I was lazy, shoveled in the media and just went with it.

So quickly typing


Now PRESUMING you had the credentials to do that and you didn’t break any other rules (like I don’t know, renaming a Domain Controller in the process.  Nobody would do that right?) you now have a Windows 2000
Core box called "SRV2

We’ve got to reboot our little friend to make it live as the new name.  We could just cheat, do a CTRL-ALT-DELETE and click the red button to restart the machine.  But what fun would that be?

Please allow me to introduce one more command.  SHUTDOWN.

Embrace the shutdown command.   It is your friend.  Use it more often than the GUI version.  It’s easy to remember and powerful and ALWAYS REBOOTS (Well except for the power outage, couldn’t get it to work then for some reason.)

We’ll go into further details on this command later but in a nutshell type in


This will FORCE an immediate REBOOT in 0 TIME (Pick up the hint what it means?)

In a short reboot time you will have a core server online with a real name.

Next time, we’ll look into making it as a Domain Controller.

The EnergizedTech –
Dedication and Inspiration creating the new Generation

The Power of Command – Setting and playing with TCP/IP without a GUI

Well folks we’re all sitting here at this pretty core screen on Server 2008.  The cursor is just a blinking away on "C:UsersAdministrator".  Just teasing you and poking fun at you.

"No GUI! Come on! Gimme your worst!"

You feel so helpless. 

But you aren’t.

Helpless would be un-armed.  No way to work.  System useless.

Today we’re going to play a little bit with NETSH.EXE

"And just what is THAT?!" they’re all screaming at the back.

Potatoes fly down.  "I thought you were going to tell us something useful!  We just use that sometimes after spyware!"

Well in truth you do.  NETSH INTERFACE IPV4 RESET is a nice simple way to reset the Winsock in your system.  But that’s not ALL it does.  Do you think Microsoft put it there BECAUSE of Malware?


NETSH.EXE is your command line version of "Network Connections" or "Network Sharing Center".   This is your magic box to get into network card settings.

Now NETSH.EXE like a LOT of the command based utilities is incredibly powerful.  I particularly like it since it has both a regular "Shell" to dip into which actually has a simple and useful help system.

It can also be pre written up as a batch file or scriptable command line.

If you just typed in your old familiar NETSH INTERFACE IPV4 RESET you would have just seen it say "Yeah ok, whatever." and finished it’s job.

If however you typed in NETSH.EXE by itself you’d get


Seems to be prompting you for something doesn’t it?

Key in either "help" or "?" and hitting enter will open up this little world.

The following commands are available:

Commands in this context:
..             – Goes up one context level.
?              – Displays a list of commands.
abort          – Discards changes made while in offline mode.
add            – Adds a configuration entry to a list of entries.
advfirewall    – Changes to the `netsh advfirewall’ context.
alias          – Adds an alias.
bridge         – Changes to the `netsh bridge’ context.
bye            – Exits the program.
commit         – Commits changes made while in offline mode.
delete         – Deletes a configuration entry from a list of entries.
dhcp           – Changes to the `netsh dhcp’ context.
dhcpclient     – Changes to the `netsh dhcpclient’ context.
dump           – Displays a configuration script.
exec           – Runs a script file.
exit           – Exits the program.
firewall       – Changes to the `netsh firewall’ context.
help           – Displays a list of commands.
http           – Changes to the `netsh http’ context.
interface      – Changes to the `netsh interface’ context.
ipsec          – Changes to the `netsh ipsec’ context.
lan            – Changes to the `netsh lan’ context.
nap            – Changes to the `netsh nap’ context.
netio          – Changes to the `netsh netio’ context.
offline        – Sets the current mode to offline.
online         – Sets the current mode to online.
p2p            – Changes to the `netsh p2p’ context.
popd           – Pops a context from the stack.
pushd          – Pushes current context on stack.
quit           – Exits the program.
ras            – Changes to the `netsh ras’ context.
rpc            – Changes to the `netsh rpc’ context.
set            – Updates configuration settings.
show           – Displays information.
unalias        – Deletes an alias.
winhttp        – Changes to the `netsh winhttp’ context.
winsock        – Changes to the `netsh winsock’ context.
wlan           – Changes to the `netsh wlan’ context.

The following sub-contexts are available:
advfirewall bridge dhcp dhcpclient firewall http interface ipsec lan nap netio
p2p ras rpc winhttp winsock wlan

To view help for a command, type the command, followed by a space, and then
type ?.


"WHOA!" I can hear you say.  "THAT’S inside NETSH.EXE?"

That’s right.  Now the fun part is playing with it.   Let’s try something simple.  I’ll go in step by step.  Mostly because I personally can’t remember all the command structure.    Setting an IP address.  This is of course PRESUMING you have a network card installed.   Of some type.

Now I can do the showoff version which says "JUST TYPE THIS IN, IN ONE SHOT.  NOW GO AWAY AND STOP BOTHERING ME FOR ANSWERS."

I COULD do that, but that would be rude and not very interesting.

So enter the "Net Shell"

NETSH (Of course hit Enter, really, you DO have to…. Hey who threw that?)


Now at this prompt type "interface" to choose the particular interface you’re going to work with

netsh>interface <ENTER> (Don’t type <ENTER> or this won’t work…. Hey you at the back, I know where you live)

netsh interface>

Is your new prompt.  You see as you go in it will remind you what you’re doing.  This will also be part of the context if you ever wanted to write this as a batch file and drop it onto another system.

now choose tcp since we’re going to work with TCP/IP.  By the way, I’m not picking "random words".  If you’re curious where they’re coming from, any time, key in "?" or "HELP" to get a gander what you can do at each level of the tree.

netsh inteface>tcp (We’ll skip all the Enter jokes from here on in, that joker at the back is really pelting me)

Today we’re going to work with IPV4.  What you didn’t read? There’s more than one version of TCP/IP.  We want to work with THAT version.   I’m certain we’re all running a TCP/IP V6 class network in our house.

netsh interface tcp>ipv4

Now at all these points there
‘s a pile of commands you
can mess with.  Some dangerous and some simple.  I like the simple ones.  They keep me out of trouble.  "show" is one of them.  Pretty obvious what it wants.  At the prompt key in "show" after you see

netsh interface tcp ipv4> (You remembered to Enter before, ri….*OUCH* stop that!)

netsh interface tpc ipv4>show

The following commands are available:

Commands inherited from the netsh context:
show alias     – Lists all defined aliases.
show helper    – Lists all the top-level helpers.
show mode      – Shows the current mode.

Commands in this context:
show addresses – Shows IP address configurations.
show compartments – Shows compartment parameters.
show config    – Displays IP address and additional info
show destinationcache – Shows destination cache entries.
show dnsservers – Displays the DNS server addresses.
show dynamicportrange – Shows dynamic port range configu
show global    – Shows global configuration parameters.
show icmpstats – Displays ICMP statistics.
show interfaces – Shows interface parameters.
show ipaddresses – Shows current IP addresses.
show ipnettomedia – Displays IP net-to-media mappings.
show ipstats   – Displays IP statistics.
show joins     – Displays multicast groups joined.
show neighbors – Shows neighbor cache entries.
show offload   – Displays the offload information.
show route     – Shows route table entries.
show subinterfaces – Shows subinterface parameters.
show tcpconnections – Displays TCP connections.
show tcpstats  – Displays TCP statistics.
show udpconnections – Displays UDP connections.
show udpstats  – Displays UDP statistics.
show winsservers – Displays the WINS server addresses.

My goodness this is pile more.   Well in this case I’m interesting in viewing my current IP address and how it’s been setup.   And believe it or not, it’s obvious!

netsh interface tcp ipv4>show addresses

In my case I get these off my test machine.

Configuration for interface "Local Area Connection"
    DHCP enabled:                         No
    IP Address:                 
    Subnet Prefix:               (mask
    Default Gateway:            
    Gateway Metric:                       256
    InterfaceMetric:                      20

Configuration for interface "Loopback Pseudo-Interface 1"
    DHCP enabled:                         No
    IP Address:                 
    Subnet Prefix:               (mask
    InterfaceMetric:                      50


So here’s where you get useful information about the IP address and gateway typing "show dnsservers" in this context gets you a list of DNS Servers in use, "show interfaces" will show you the descriptive name of all your network cards.  This comes in handy with the next step.  SETTING your IP address. 

netsh interface tcp ipv4>set address

If you just typed "set" by itself it would show you all the things you can "set".  Right now I just want to "SET" my ip address so I can do something with this.   Keying "set address" by itself will give me more instructions.  But I want to "SET" my IP address before my coffee gets cold.

netsh interface tcp ipv4>set address name="Local Area Connection" source=static

Ding.  Now I have the IP address changed to

Now if you want to forget how to do all this in the future, because you’re lazy; like me.   Get out your copy command and paste that whole line into notepad and save it as a BAT or CMD file.  Then just edit the IP address later for the next machine.  Take out the ">" from the line of course so it reads.

netsh interface tcp ipv4 set address name="Local Area Connection" source=static

But what if the name of the Lan Connection was "Server Connection" or more importantly what if I have SEVERAL network cards?   the "show interfaces" lists them all by name.  You can modify the section that says "Local Area Connection" with whatever names are assigned to your card.

There’s a lot more power to the command line than just setting an IP address, like allowing firewall exclusions for example.  The great part is.  It’s not bandwidth intensive.   Copy, paste, run.  

Next time we’ll touch on other commands like how to rename your computer or maybe join it to a domain.

Until next time

The EnergizedTech –
Dedication and Inspiration creating the new Generation