Sunday, 18 March 2012

Hands on with: Windows Server 2012 (8) –Hyper-V PowerShell Module

I recently upgraded my home lab Hyper-V server to Windows Server 8. Then I installed all the Hyper-V associated roles and role services including the new Hyper-V PowerShell cmdlets.
Then I fired up PowerShell, imported the Hyper-V module and retrieved a list of commands available in the new module.
image
Then I decided to play around with the harmless get-* cmdlets, starting with get-vm.
image
Alright, now for something equally harmless. Let’s try changing the notes for the VM called “Arche”
image
What’s surprising is that the Hyper-V manager is immediately updated with the new data. I thought I would have to do a refresh to pick up the changes.

Alright, enough with the easy stuff, let’s create a new VM! Here’s the details:
  • Name: DC1
  • Start-up RAM: 512MB (Dynamic)
  • 1 HDD: 40GB
  • Other hardware: CDROM, Network
A couple of gotchas:
  • VHDs in Windows Server 8 now have the VHDX extension, old habits!
  • The ComputerName parameter is used to specify which Hyper-V host to host the VM on. That’s actually pretty standard in PowerShell and it shouldn’t have got me!
image
I now need to set the DVD drive in the VM to the Windows Server 8 DVD ISO and start the VM:
image
image
image
That’s it for now!

No comments:

Post a Comment