Hello LuCD
Thank you for your help always, I am again making use of your very helpful script below
Can you help me modify the below script to return corresponding Naa id of the datastore as well
&{$VCName = Read-Host "Enter the VC name "
Connect-VIServer VCname -WarningAction Continue
clear
Get-Cluster -PipelineVariable cluster |
Get-Datastore |
where {$_.name -notlike "*local*" -and $_.name -notlike "*template*"} |
Select @{N='Cluster';E={$cluster.Name}},Name,CapacityGB,FreespaceGB,@{N='UsedSpace';E={$_.FreeSpaceGB/$_.CapacityGB*100}}
} | Export-Csv report.csv -NoTypeInformation -UseCulture
Source: VMware PowerCLI Forum - VMware {code}
Thanks in advance !
Try like this
&{$VCName = Read-Host "Enter the VC name "
Connect-VIServer VCname -WarningAction Continue
clear
Get-Cluster -PipelineVariable cluster |
Get-Datastore |
where {$_.name -notlike "*local*" -and $_.name -notlike "*template*"} |
Select @{N='Cluster';E={$cluster.Name}},Name,CapacityGB,FreespaceGB,
@{N='UsedSpace';E={$_.FreeSpaceGB/$_.CapacityGB*100}},
@{N='CanonicalName';E={$_.ExtensionData.Info.Vmfs.Extent.DiskName -join '|'}}
} | Export-Csv report.csv -NoTypeInformation -UseCulture
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Try like this
&{$VCName = Read-Host "Enter the VC name "
Connect-VIServer VCname -WarningAction Continue
clear
Get-Cluster -PipelineVariable cluster |
Get-Datastore |
where {$_.name -notlike "*local*" -and $_.name -notlike "*template*"} |
Select @{N='Cluster';E={$cluster.Name}},Name,CapacityGB,FreespaceGB,
@{N='UsedSpace';E={$_.FreeSpaceGB/$_.CapacityGB*100}},
@{N='CanonicalName';E={$_.ExtensionData.Info.Vmfs.Extent.DiskName -join '|'}}
} | Export-Csv report.csv -NoTypeInformation -UseCulture
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
