Compare Windows 2008 R2 to Windows 2012 Storage Cmdlets

Windows Server 2012 and 2012 R2 introduced a new set of storage cmdlets that provided specific support for disk management, multipath I/O configuration, MSDSM settings and more. These new cmdlets allowed for much simpler scripting which was a great advantage, but at the same time caused some headaches with customers that were running older versions […]


Windows Server 2012 and 2012 R2 introduced a new set of storage cmdlets that provided specific support for disk management, multipath I/O configuration, MSDSM settings and more. These new cmdlets allowed for much simpler scripting which was a great advantage, but at the same time caused some headaches with customers that were running older versions of the Server such as 2008 or 2008 R2. The issue was that these new cmdlets were not available in the older versions of Windows Server which meant this took writing script that used Get-WmiObject (aka gwmi) with specific classes such as Win32_LogicalDisk, Win32_DiskDrive or Win32_DiskPartition.

Most (if not all) customers running Microsoft Server run multiple versions which means everyone faces this problem of supporting either one common approach using Get-WmiObject or two sets of scripts using the old and new cmdlets. Some times supporting the two different approaches can be a daunting task so I wanted to put together the command specifics that supports the Server 2008 R2 and Windows Server 2012/2012 R2.

The following sections describe the settings that we recommend to our customers when configuring the Server. This includes configuring MPIO HW values, formatting volumes, initializing volumes (aka disks) and other tasks. I have mapped out the differences in cmdlets and command line tools between Windows Server 2008 R2 and Windows Server 2012/2012 R2 so that everyone can benefit from understanding the specific commands.

Get Logical Disk & Partition Windows Information

Server 2008 R2 SP1

Server 2012 or 2012 R2

Get Installed Windows Hotfixes

Server 2008 R2 SP1

Windows Server 2012 or 2012 R2

Install MultiPath I/O (MPIO)

Windows Server 2008 R2 SP1

Windows Server 2012 or 2012 R2

Configure New MPIO Device

Windows Server 2008 R2 SP1

Note: Format is important including spaces, Vendor=PURE + 4 spaces, ProductId= FlashArray + 6 spaces

Windows Server 2012 or 2012 R2

Note: No need for the spaces.

Windows Disk Management

View Pure Storage FlashArray Volumes Only

Server 2008 R2 SP1

Server 2012 or 2012 R2

Rescan for new volumes

Server 2008 R2 SP1 & Windows Server 2012/2012 R2

Initialize Newly Added Pure Storage Volumes

Server 2008 R2 SP1

Server 2012 or 2012 R2

Create New Partition, Set Mount Point and Format Volume

Server 2008 R2 SP1

Windows Server 2012 or 2012 R2

Set SAN Policy

Windows Server 2008 R2 SP1

Server 2012 or 2012 R2

Note: When using Server Failover Clustering be sure to keep the default setting of OfflineShared.

Configure MPIO Windows Policies

Display Current MPIO Policies

Server 2008 R2 SP1

Server 2012 or 2012 R2

Get & Set Recommended MPIO Policy Settings

Windows Server 2008 R2 SP1

Windows Server 2012 or 2012 R2

 

Windows References

 

It is easy to see that the Windows Server 2012/2012 R2 approach is much simpler and less prone to scripting snafus.

Thanks,
barkz