On 6 the Backing seems to provide the multi-writer state as well.
Only until 5.5 do you need to access the VMX (through the Get-AdvancedSettings cmdlet).
The following script test the version, and retrieves the setting accordingly
Get-VM | Get-HardDisk | %{
$ctrl = Get-ScsiController -HardDisk $_
$_ | Select @{N='VM';E={$_.Parent.Name}},
Name,
StorageFormat,
FileName,
@{N='Multi-Writer';E={
if($_.Parent.VMHost.ApiVersion -le "5.5"){
$ctrl = Get-ScsiController -HardDisk $_
Get-AdvancedSetting -Entity $_.Parent -Name "scsi$($ctrl.ExtensionData.BusNumber):$($_.ExtensionData.UnitNumber).sharing" |
Select -ExpandProperty Value
}
else{
$_.ExtensionData.Backing.Sharing
}
}}
}