With the example below to gather VMs and list their datacenter and hosts and clusters:
get-vmhost | Select Name, @{N=”Cluster”;E={Get-Cluster -VMHost $_}},@{N=”Datacenter”;E={Get-Datacenter -VMHost $_}}
What does the @ symbol, N and E mean in this syntax?
Thank you
That is what is called a calculated property.
The @{} indicates a hash table, the N stands for the Name of the property, the E for Expression (where you calculate the value of the property)
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
That is what is called a calculated property.
The @{} indicates a hash table, the N stands for the Name of the property, the E for Expression (where you calculate the value of the property)
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference