I am trying to export a list of users and groups via PowerCLI. No matter what I do I don't seem to get all fields, for example if I look at the Vsphere GUI, I can see:
When I run the PowerCLI command I don't get these:
Connect-VIServer -Server xxx.xxx.xxx.xxx
Get-VIAccount -Verbose -Domain xxxxxx.xxx | export-csv -path "C:\temp\SSO data.csv" -NoTypeInformation -UseCulture
Which returns:
Id | Server | Description | Domain | Name | Uid | ExtensionData |
Specifically I want the email / locked / disabled fields included, but even using Verbose does not include it, and I can't see any specific String reference to get it.
Any ideas or easy ways to export this data into a list with all fields populated?
Much appreciated.
Doesn't look like Get-VIAccount is capable of doing what you're looking for.
You might want to take a look at the SSO module William Lam describes here to see if it would help -
PowerCLI Module for managing vCenter Single Sign-On (SSO) (williamlam.com)
Have you looked at the VMware.vSphere.SsoAdmin module?
For the localos domain and the vSphere SSO domain those missing properties are listed.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference