VMware Cloud Community
jliu2
Contributor
Contributor
Jump to solution

display host name when using Get-VMHostAdvancedConfiguration

I want to query for several config settings in advanced configuration on all ESXi hosts in my vcenter, for example I ran the following:

Get-VMHost|Sort-Object Name|Get-VMHostAdvancedConfiguration -Name UserVars.ESXiShellInteractiveTimeOut

which gave me the following output

Name                      Value
----                      -----

UserVars.ESXiShellInteracti... 300

UserVars.ESXiShellInteracti... 300

UserVars.ESXiShellInteracti... 300

UserVars.ESXiShellInteracti... 300

UserVars.ESXiShellInteracti... 300

UserVars.ESXiShellInteracti... 300

UserVars.ESXiShellInteracti... 300

the problem is it's missing the host name, anyway I can modify the cmdlets to see the host name an additional column?

thank you

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

I used the Get-AdvancedSetting cmdlet, not the Get-VMHostAdvancedConfiguration cmdlet


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
3 Replies
LucD
Leadership
Leadership
Jump to solution

That's why it is better to use the Get-AdvancedSetting cmdlet

Get-VMHost |

Get-AdvancedSetting -name UserVars.ESXiShellInteractiveTimeOut |

Select Entity,Name,Value


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
jliu2
Contributor
Contributor
Jump to solution

thanks for the tip but I don't see any output from this command, just blank lines

PowerCLI E:\Program Files (x86)\powercli\Scripts> Get-VMHost | Get-VMHostAdvancedConfiguration -Name UserVars.ESXiShellInteractiveTimeOut | Select Entity,Name,Value

Entity                                                             Name                                                               Value

------                                                             ----                                                               -----

in fact it seems like if I use the select cmdlet the output is always just blank

0 Kudos
LucD
Leadership
Leadership
Jump to solution

I used the Get-AdvancedSetting cmdlet, not the Get-VMHostAdvancedConfiguration cmdlet


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos