Resize-VirtualDisk Powershell command fails when you resize a thin provisioned volume in Windows Server 2012

S’applique à : Windows Server 2012 DatacenterWindows Server 2012 DatacenterWindows Server 2012 Essentials Plus

Symptoms


Assume that you try to resize a thin provisioned volume by using the Resize-VirtualDisk PowerShell command on a computer that is running Windows Server 2012. In this scenario, the command fails and you cannot resize the volume successfully.
For example, you use the following command to resize a volume in PowerShell:

PS C:\Windows\system32> Resize-VirtualDisk -FriendlyName tpv2 -Size 12GB

The results is as follows:

Resize-VirtualDisk : Invalid Parameter
At line:1 char:1
+ Resize-VirtualDisk -FriendlyName tpv2 -Size 12GB
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (StorageWMI:ROOT/Microsoft/...SFT_VirtualDisk) [Resize-VirtualDisk], CimException
+ FullyQualifiedErrorId : StorageWMI 5,Resize-VirtualDisk

Cause


This issue occurs because the storage service Windows Management Instrumentation (WMI) provider method that changes volume size always specifies StorageVolume as the value for the ElementType parameter. This fails on thin provisioned volumes because the value should be ThinlyProvisionedStorageVolume.

Resolution


Hotfix information


A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem.

If the hotfix is available for download, there is a "Hotfix Download Available" section at the top of this Knowledge Base article. If this section does not appear, submit a request to Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft website: Note The "Hotfix Download Available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

Prerequisites

To apply this hotfix, you must be running Windows Server 2012.

Registry information

To apply this hotfix, you do not have to make any changes to the registry.

Restart requirement

You must restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace a previously released hotfix.

Status


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

More Information


For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates