Good morning,
the Script is:
$report = foreach($cluster in Get-Cluster -Name Cluster23){
Get-Datastore -Entity (Get-VMHost -Location $cluster) |
where {$_.Type -eq "NFS"} |
Sort-Object -Unique |
Select @{N="Cluster";E={$cluster.Name}},Name,RemoteHost,RemotePath
}
$report | Export-Csv "C:\NFS-datastores.csv" -NoTypeInformation -UseCulture
And its output in the csv is:
"Cluster";"Name";"RemoteHost";"RemotePath"
"Cluster23";"Cluster23_01";;
"Cluster23";"Cluster23_02";;
"Cluster23";"Cluster23_03";;
"Cluster23";"Cluster23_04";;
"Cluster23";"Cluster23_05";;
"Cluster23";"Cluster23_06";;
"Cluster23";"Cluster23_GW_RZ2_1";;
So, whats going wrong? For example, here are the Values ( in VI-Client) of the Datastore Cluster23_01
Identification: Cluster23_01
Server: 10.17.1.251
Path: /qvm03_001