I tired to use this function to change group in my ESXi AD domain in my Powershell script:
Get-VMHost | Get-AdvancedSetting -Name Config.HostAgent.plugins.hos