Automation

 View Only
  • 1.  Setting a new advanced-setting

    Posted Sep 16, 2021 05:57 AM

    Hi,

    Changing an existing advanced-setting is no problem, but setting a new one is a bit challenging.

     

    Any ideas how this could be solved?

     

    Lars



  • 2.  RE: Setting a new advanced-setting

    Posted Sep 16, 2021 06:46 AM

    Shouldn't you be using New-AdvancedSetting for that?
    I normally would use a Try-Catch


     wrote:

    Hi,

    Changing an existing advanced-setting is no problem, but setting a new one is a bit challenging.

     

    Any ideas how this could be solved?

     

    Lars






  • 3.  RE: Setting a new advanced-setting

    Posted Sep 16, 2021 07:09 AM

    It says it's not supported.



  • 4.  RE: Setting a new advanced-setting
    Best Answer

    Posted Sep 16, 2021 07:17 AM

    Strange, I didn't realise that.
    On the other hand, Set-VMHostAdvancedConfiguration says it is deprecated and to use Set-AdvancedSetting.

    That would mean the only valid alternatie is to use Get-EsxCli, and the $esxcli.system.settings.advanced.set.Invoke(@{....}) command



  • 5.  RE: Setting a new advanced-setting

    Posted Sep 17, 2021 07:26 AM

    Thank you Luc!

    I ended up with the following:

    Lars