So i'm pretty new to working with VMWare and PowerCLI but I'm trying to write an automation script to configure new ESX hosts. I'm getting stuck when it comes to adding our Domain Admins group as an admin on the ESXHost itself.
Was thinking something like:
$admin = "MyDomain\Domain Admins"
Get-VMHost | New-VIPermissions -Principal $admin -Propogate $True -Role Admin
Somehow I feel like I'm way off on this one though.
Essentially, I'm trying to perform the same function as if I added the Domain Admins throught the permissions tab on the host.
Any help would be appreciated.