Q. How can I check if a VHDX file is shared using PowerShell?
A. Shared VHDX enables a single VHDX file to be attached to multiple VMs SCSI controllers which is then seen as shared SAS storage by the VMs and can be used as clustered storage for guest clusters. To check if a VHDX file is shared you need to look at the VHDX file as its attached to a VM since its not actually a property of the VHDX file but rather its connection to a VM. To check use the following:
PS C:\> Get-VMHardDiskDrive -VMName savdalfc01 | ft Path, SupportPersistentReservations -AutoSize Path SupportPers istentReser vations ---- ----------- C:\ClusterStorage\VMs\savdalfc01\Virtual Hard Disks\savdalfc01.vhdx False C:\ClusterStorage\VMs\Shared VHDX\savdalfcshared1.vhdx True
If SupportPersistent Reservations is true then it is a shared VHDX file.