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 image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQChRPHR-JOJJxh7VlvMx9hAHvJ36HqUeNBrUnLoc1gUAYs7-PpLXMALvOZiBVz0vO609TcZX2cVoRqQ9Khjbgq2fnY3ICJJEhdmHV_Jiy0m-B9VDkE5RnTd1JnQaZdQC29ItnewAv-vE/?imgmax=800)
Then I decided to play around with the harmless get-* cmdlets, starting with get-vm.
![image image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX6O-ThfgPxOBH6P29_JkxOBPmDMADmzgw2a2TJ2ig9Skf5-cyZXw3OKP8RMY7AuuK43W2wcPi04QGxyGlezo78Pc-iQaRW4t2xBmawaJsE7G5IvirR3e6-Y16whpRkHVGE7ciA4NAzIY/?imgmax=800)
Alright, now for something equally harmless. Let’s try changing the notes for the VM called “Arche”
![image image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2i00es8J4jchRtieuqFaLFZXEpcirMM-y22lUsPPHdpfSjkDnWc0H9Zem9tSlztJcyFJo6uNo57PIqE2JQ0kBIOLEIGuk8L84m2ODxS5zoUJln6RirL5UFTOTx1E2ytPb3nOZ_6B5iwc/?imgmax=800)
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:
![image image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_xPz-rG6sKivRRETPa30ZUL_rmzxi-X185DqA-L8BF2K3VxIEUUjs9Cf4GLAyq1lXv8y7EOb6h-aniVVyj6Dc2ll94y_wO3CvFhea5423blSkvPJxVuGV80d3j1ngAHMLYGndnnGMyeY/?imgmax=800)
I now need to set the DVD drive in the VM to the Windows Server 8 DVD ISO and start the VM:
![image image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTaf1LJu_UkEk4J8rPZOvcusYpolki3QwbuGia6A3SMPJuTTNVrSpJebqvYEg0oDuHmwaGJdXEaLFxufUTlnKtcbiJmvcHAHhUZfkr2g1hapLR_5JTTim3KMHAO6UM-gHTWpFqzhuHffE/?imgmax=800)
![image image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheNdCpCBhOqeFCx2fzqERCwFpNT85p1XlvhyphenhyphenTdr1BJXIBXkA37IOnpbkAhe9fTRjPMCrsb1HZrs-lZZ1F0zCMWyUfjFejTMmma1A4Op2K1gQHVps7JiP2WiD8k5SF1bem3dBLRT1s7Te4/?imgmax=800)
![image image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhelGz4Y2rsRnvb3jB2EUiqL0sWrWc-vnxkAtElmh46XfdikSgqe9y2eSGUfRM3_ko597HXQHq9VX7imfbpR3youkODeRuU9rWIxRw5nNCasdiYtnt3ntTP92_Grp2-I_FZaFFPXeDpKzs/?imgmax=800)
That’s it for now!
Then I fired up PowerShell, imported the Hyper-V module and retrieved a list of commands available in the new module.
Then I decided to play around with the harmless get-* cmdlets, starting with get-vm.
Alright, now for something equally harmless. Let’s try changing the notes for the VM called “Arche”
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
- 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!
I now need to set the DVD drive in the VM to the Windows Server 8 DVD ISO and start the VM:
That’s it for now!