Let me backup and start over. Here is the original output from your script:
Name Cluster DS Count ESXi DS Count Missing DS
---- ---------------- ------------- ----------
HOSTD 9 6 HOSTB-Local|HOSTC-Local|HOSTA-Local
HOSTB 9 6 HOSTD-Local|HOSTC-Local|HOSTA-Local
HOSTC 9 5 HOSTD-Local|VVOL-DS|HOSTB-Local|HOSTA-Local
HOSTA 9 6 HOSTD-Local|HOSTB-Local|HOSTC-Local
It works great but I want to exclude all "Local" Datastores because when I run this against a Cluster with 20 hosts it will show 19 Local Datastores for each host. If you notice HOSTC, it has "VVOL-DS" missing ( I modified the font), this was on purpose. I wanted to validate this script.
I basically want the output like this:
Name Cluster DS Count ESXi DS Count Missing DS
---- ---------------- ------------- ----------
HOSTD 9 5
HOSTB 9 5
HOSTC 9 5 VVOL-DS
HOSTA 9 5
Here is the output from your 1st suggestion:
"$dsNames = (Get-Datastore -RelatedObject $cluster | where{$_.ExtensionData.Summary.MultipleHostAccess}).Name"
Name Cluster DS Count ESXi DS Count Missing DS
---- ---------------- ------------- ----------
HOSTD 5 6
HOSTB 5 6
HOSTA 5 6
Lastly, here is the output from your latest suggestion:
PS /root> Get-Cluster IRC-00-MGMT | Get-Datastore |Select Name,@{N='Multi';E={$_.ExtensionData.Summary.MultipleHostAccess}}
Name Multi
---- -----
TEMPLATES True
3PR1-01 True
3PR2-01 True
LOGI-NMB1-01 True
HOSTC-Local False
VVOL-DS True
HOSTB-Local False
HOSTB-Local False
HOSTA-Local False
To answer your last question, no, the datastore "VVOL-DS" is missing on HostC.
Sorry for not being so thorough, Powershell is new for me. I appreciate the help!