VMware Cloud Community
MattTWS
Contributor
Contributor

Listing all fields from SSO users and groups via powercli

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:

MattTWS_0-1647004759319.png

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:

IdServerDescriptionDomainNameUidExtensionData

 

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.

Tags (1)
0 Kudos
2 Replies
kwhornlcs
Enthusiast
Enthusiast

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)

0 Kudos
LucD
Leadership
Leadership

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

0 Kudos