Posts tagged PowerShell 3.0

Mike Kolitz’s SuperDuper Windows 8/Server 2012 Deployment cmdlet

Updated June 7, 2012

I have already blogged several times about how to create a Boot from VHD installation for the Developer and Beta versions of Windows 8 and Windows Server 8 Beta.

Now that the Release Preview version of Windows 8 and the Release Candidate version of Windows Server 2012 have been released, it is a good occasion to revisit this very flexible boot method.

My first assumption this time is that you already have a system running PowerShell 3.0 which is the case if your machine runs an earlier version of Windows (Server) 8. This blog you will learn how to configure Native VHD without touching diskpart for preparing the VHD file.  In fact we are going to create a VHDX file which is recognized by Windows 8 and Windows Server 2012 machines.

A second assumption is that you have the Hyper-V role installed. This is required because we need the Hyper-V PowerShell module which comes with the Hyper-V role.

To fully understand what is going on, I suggest you first run the classical route and then be surprised by the simplest of deployment methods which has much less requirements [See update and comments Mike Kolitz below) compared to the Classical Route. More on this later on in the blog!

The Classical Route

Let’s start creating a 60GB dynamic VHDX file named ws2012rc.vhdx in a directory we shall name D:VHDX. A downloaded ISO image file of Windows Server 2012 should be copied to D:Download.


New-VHD -Path d:vhdxws2012rc.vhdx -Dynamic -SizeBytes 60GB

Once the VHDX file is created, it can be mounted as follows:
Mount-VHD -Path D:vhdxws2012rc.vhdx –verbose

As you can see in the next screen, the newly mounted VHDX has a RAW partition style, so we need to find a way to only initialize the mounted virtual hard disk.



Jump Starting Windows Server 2012

With a new operating system around the corner there is an awful lot to learn. The release candidate of Windows Server 2012 that is expected in the first week of June contains a wealth of new features you have most likely already heard about. I have been able to test a large number of very rich features including Hyper-V, File & Storage and Networking. It is very hard to touch everything in a short period.

Therefore I strongly advise you to register for this Windows Server 2012 Jumpstart which is a two day live virtual class presented by Rick Claus and Corey Hynes.

Day One
Morning |
Beyond Virtualization
• Game changers in the next release of the Hyper-V role on Windows Server 2012
• Massive scale increases, networking improvements, replication and disaster recovery is all in the box
Afternoon | Manageability
• Learn how you can manage a few systems up to a hundred – all from one console
• Server Core installs scaring you off? Learn about all your installation and management options
• Windows PowerShell automation and management at scale – all with built in tools
• Clustering—Cluster-aware updating
• Networking, Network Teaming, network configuration, SMB MultiChannel and RDMA

Day Two
Morning |
• Learn how Continuous Availability of File Services improves workload reliability and performance
• Storage groups, disk provisioning, iSCSI and SAN integration
Afternoon | Remote Users
• Remote connectivity options for your workforce (DA)
• VDI and Remote Desktop Services deployment and changes

You can find more details here:


Windows 8 Storage and Hyper-V – Part 3: The Art of Creating a VHD

In the last blog in my series on Windows 8 storage I already touched upon creating a VHDX with PowerShell 3.0 in Windows Server 8. In this blog I will focus on the subject a little bit more, showing the myriad ways of creating VHDs and show you some powerful commands to create multiple VHD files in Windows Server 8.

Here are a number of methods for creating a VHD:

  • WMI
  • Diskpart
  • Disk2VHD
  • VHD Tool
  • Disk Management
  • Hyper-V Manager
  • PowerShell 3.0

The WMI Method

Three years ago Taylor Brown in his blog “Hyper-V WMI Using PowerShell Scripts” demonstrated how we could create a VHD using a Hyper-V WMI method. Back then we did not have a Hyper-V PowerShell module as we now have in Windows 8. Borrowing from his work this is how we could accomplish our goal:



Our Sponsors

Powered by