Powershell: Enable MOB on ESXi host

#
$Host = '192.168.X.Y'

Connect-VIServer $ESXHost
Get-AdvancedSetting -Entity $ESXHost -Name 'Config.HostAgent.plugins.solo.enableMob' | Format-List

Get-AdvancedSetting -Entity $ESXHost -Name 'Config.HostAgent.plugins.solo.enableMob' | Set-AdvancedSetting -Value True

Disconnect-VIServer $ESXHost
#
Advertisements

PowerShell: Add account and assign role on VMWare ESXi host

First you need to install PowerCLI

#========================================
$esxi_host = "FQDN_or_IP_of_VMhost"
$admin_user = "root"
$admin_pass = "root password"
$new_user = "new username"
$new_pass = "new user password"

Connect-VIServer -Protocol https -Server $esxi_host -User $admin_user -Password $admin_pass
New-VMHostAccount -Id $new_user -Password $new_pass
New-VIPermission -Entity $esxi_host -Principal $new_user -Role Admin -Propagate:$true
#========================================

Source