AutomationStat1
Contributor
Contributor

Simple Syntax Questions: Listing Get Output

Jump to solution

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

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership

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

View solution in original post

0 Kudos
1 Reply
LucD
Leadership
Leadership

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

0 Kudos