PowerCLI

 View Only
  • 1.  Listing all fields from SSO users and groups via powercli

    Posted Mar 11, 2022 01:26 PM

    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.



  • 2.  RE: Listing all fields from SSO users and groups via powercli

    Posted Mar 11, 2022 01:53 PM

    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)



  • 3.  RE: Listing all fields from SSO users and groups via powercli

    Posted Mar 11, 2022 02:04 PM

    Have you looked at the VMware.vSphere.SsoAdmin module?
    For the localos domain and the vSphere SSO domain those missing properties are listed.