I was doing the audit of VMware vSphere vCenter servers to know the users and groups list on the vsphere.local SSO domain (If any custom new user or groups created), Below simple one-liner script helps to fetch the list of groups from vsphere.local single sign on domain.
Import-Module VMware.PowerCLI Connect-VIserver vCenterServer_IP -User [email protected] -Password Password Get-VIAccount -Group -Domain vsphere.local | Select-Object Name, Description
This one-liner command helps to know the Users lists.
Get-VIAccount -Domain vsphere.local | Select-Object Name, Id
Useful Blogs
Add NFS datastores to VMware ESXi hosts using PowerCLI
Using PowerCLI to Increase VMDK (Virtual disk) in VMware Virtual Machine
Add a VMFS datastore using VMware PowerCLI
POWERCLI: VMWARE ESXI CONFIGURE (VSWITCH) VMKERNEL NETWORK PORT FOR ISCSI STORAGE
POWERCLI VMWARE: CONFIGURE SOFTWARE ISCSI STORAGE ADAPTER AND ADD VMFS DATASTORE
POWERCLI: VIRTUAL MACHINE STORAGE MIGRATE/SVMOTION AND DATASTORE PORT BINDING MULTIPATHING
VMWare Powercli: Time Configuration (NTP - Network Time Protocol) on multiple Esxi server
vSphere PowerCLI - Configure syslog on VMware ESXi hosts and Enable security profile firewall