VMware Cloud Community
TheVMinator
Expert
Expert
Jump to solution

Getting ESXi properties in keyvalue form

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!

0 Kudos
1 Solution

Accepted Solutions
pkolom
Enthusiast
Enthusiast
Jump to solution

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?

View solution in original post

0 Kudos
4 Replies
LucD
Leadership
Leadership
Jump to solution

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

pkolom
Enthusiast
Enthusiast
Jump to solution

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?

0 Kudos
TheVMinator
Expert
Expert
Jump to solution

This is great thanks!

0 Kudos