Using esxcli I get get properties from ESXi in keyvalue form like this:
esxcli --formattter=keyvalue network firewall get
which returns the values in keyvalue format like this:
Firewall.defaultaction.string=DROP
I would like to try to get ALL of the ESXi properties on an ESXi host outputted in keyvalue format.
How can I do this with powercli?
Thanks!
OP probably wanted to have specific formatting:
get-AdvancedSetting -Entity $esx |select Name, Value |ForEach-Object{$_.Name +'='+$_.value}
BTW LucD, how do you format scripts so nicely?
You mean something like this ?
$esx = Get-VMHost -Name MyEsx
Get-AdvancedSetting -Entity $esx |
Select Name,Value
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
OP probably wanted to have specific formatting:
get-AdvancedSetting -Entity $esx |select Name, Value |ForEach-Object{$_.Name +'='+$_.value}
BTW LucD, how do you format scripts so nicely?
This is great thanks!