Hyper-V v3, PowerShell, Virtualization
comment 1

PoshUtils: Retrieve Cluster Shared Volume (CSV) to physical disk mapping

Last week, I was looking for a way to retrieve the Clustered Shared Volume (CSV) to physical disk mapping on Windows Server 2012 using PowerShell. I have seen some scripts elsewhere that use DiskSignature to get this mapping using WMI. However, I wasn’t able to follow the same approach as the disk signature for some of the volumes I am using turned out to be 0x0 for some reason.

So, I started looking at an alternate approach and figured that I could use the volume path as the key. So, I started wrapping that code in a function and this is what I ended up with.

The code is self-explanatory. Since I am using the Windows Server 2012 storage cmdlets, this will work only on Windows Server 2012 systems and that is all I tested also.

Here is how you can use this function

And, this is what you will see.

Hope this is helpful.

Filed under: Hyper-V v3, PowerShell, Virtualization

by

Ravikanth is a principal engineer and the lead architect for Microsoft and VMware virtualized and hybrid cloud solutions within the Infrastructure Solutions Group at Dell EMC. He is a multi-year recipient of Microsoft Most Valuable Professional (MVP) award in Windows PowerShell (CDM) and Microsoft Azure. Ravikanth is the author of Windows PowerShell Desired State Configuration Revealed (Apress) and leads Bangalore PowerShell and Bangalore IT Pro user groups. He can be seen speaking regularly at local user group events and conferences in India and abroad.