VMware Cloud Community
Gabrie1
Commander
Commander
Jump to solution

Edit a host profile

Is it possible to edit a host profile using powercli?

We need to change our syslog server and I have scripts to edit the syslog entry on the ESXi hosts, but I see no way to edit the host profiles. I see cmdlets to create, re-apply host profiles, but not how to edit a specific setting.

Change the ESXi config, generate a new profile and apply that, is not an option since we have a number of items we need to exclude which also can't be done through powercli I think.

 

http://www.GabesVirtualWorld.com
Labels (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Theoretically yes, in practice rather no.
The layout and structure of these host profiles are not extensively documented I'm afraid.
You can do some reverse engineering and try to find out which setting goes where and in which format, like I did with he ESXi root password in the past, but it is a daunting task (which I don't really want to try).


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

View solution in original post

3 Replies
LucD
Leadership
Leadership
Jump to solution

Theoretically yes, in practice rather no.
The layout and structure of these host profiles are not extensively documented I'm afraid.
You can do some reverse engineering and try to find out which setting goes where and in which format, like I did with he ESXi root password in the past, but it is a daunting task (which I don't really want to try).


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

Gabrie1
Commander
Commander
Jump to solution

Was afraid so. Looking at doing this through API but not sure if that has the options I need.

http://www.GabesVirtualWorld.com
Reply
0 Kudos
StuDuncanHPE
Enthusiast
Enthusiast
Jump to solution

This is also one of the reasons I stopped using Profiles and moved to a script that sets up the same thing using a lot of lines like:

$vmhost | Get-AdvancedSetting -Name UserVars.ESXiShellTimeOut | Set-AdvancedSetting -Value $ShellTimeOut -Confirm:$false
or
$vmhost | Get-VmHostService | Where {$_.key -eq "ntpd"} | Set-VMHostService -policy $NTP
 
Tags (1)
Reply
0 Kudos