Didn't work. For me, SharedVolumeInfo has no property Partition.
In fact, my main issue is that I hardly found a way to 'look into' SharedVolumeInfo. That's what i tried:
get-clustersharedvolume -cluster 'cl1' -name 'vol1' | get-member -name SharedVolumeInfo | Format-List -Property *
Result:
TypeName : Deserialized.Microsoft.FailoverClusters.PowerShell.ClusterSharedVolume
Name : SharedVolumeInfo
MemberType : Property
Definition : Deserialized.System.Collections.ObjectModel.Collection`1[[Microsoft.FailoverClusters.PowerShell.ClusterSharedVolumeInfo,
Microsoft.FailoverClusters.PowerShell, Version=10.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]] {get;set;}
get-clustersharedvolume -cluster 'atndfhcicl01' -name 'datastore01' | select-object -ExpandProperty SharedVolumeInfo
Result:
Microsoft.FailoverClusters.PowerShell.ClusterSharedVolumeInfo
(get-clustersharedvolume -cluster 'atndfhcicl01' -name 'datastore01').SharedVolumeInfo.psobject
Result:
Members : {int Capacity {get;set;}, int Count {get;}, bool IsFixedSize {get;}, bool IsReadOnly {get;}…}
Properties : {int Capacity {get;set;}, int Count {get;}, bool IsFixedSize {get;}, bool IsReadOnly {get;}…}
Methods : {get_Capacity, set_Capacity, get_Count, get_IsFixedSize…}
ImmediateBaseObject : {Microsoft.FailoverClusters.PowerShell.ClusterSharedVolumeInfo}
BaseObject : {Microsoft.FailoverClusters.PowerShell.ClusterSharedVolumeInfo}
TypeNames : {Deserialized.System.Collections.ObjectModel.Collection`1[[Microsoft.FailoverClusters.PowerShell.ClusterSharedVolumeInf
o, Microsoft.FailoverClusters.PowerShell, Version=10.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]],
Deserialized.System.Object}
This is what I found shows me the 'contents' of SharedVolumeInfo:
(get-clustersharedvolume -cluster 'atndfhcicl01' -name 'datastore01').sharedvolumeinfo.psobject.members
That gives me properties like Capacity, Count, IsReadOnly etc. and several methods. None of them returns something I could use, Capacity for example gives '4'.
I gave up at that point and started to experiment with storage-related cmdlets. From what I've seen so far, this should work for me.
The question that remains for me is this 'mysterious' SharedVolumeInfo property. I was so far unable to extract more info out of it, like its properties, or what exactly this type is, by using 'regular' methods. As a workaround, I leveraged psobject, but I'm not enough expert to tell why this workaround seems to be able to do what I want and yield information about the 'contents' of SharedVolumeInfo...