I need a powercli script to automate some task in VC , I have found below script but here I can assign AD group permission to folder level. but I want to assign permission at VC level. is there any way we can do this.
$TargetVC="XXXX Set-PowerCLIConfiguration -DefaultVIServerMode multiple -Confirm:$false Connect-VIServer -server $TargetVC $rootFolder = (Get-Folder foldername) $user = get-viaccount -domain 'Domain name' -group -id 'AD group' $role = Get-VIRole -Name 'xxx' New-VIPermission -Entity $TargetVC -Principal $user -Role $role -Propagate $true -Confirm:$false
also i need to create few vsphere.local users and assign readonly permissions. i am can’t find any powercli script for this. kindly help to solve this