I'm trying to return a list of configuration parameters for some vm's in a specific cluster. So here is what I've done:
$vms = Get-VM -Location ClusterName | Select-Object -Property Name
foreach ($vm in $vms)
{Get-VM -Name $vm).ExtensionData.Config.ExtraConfig}
There is a problem with this because the result from the first line returns the column name along with the list off all the machines in the cluster so the variable of $vm looks like the following:
@{Name=MachineName1}
@{Name=MachineName2}
@{Name=MachineName3}
Is there anyway of just providing the list of machine names without have the column name prepending to the variable?