Automation

 View Only
  • 1.  esxcli system account list

    Posted Jul 13, 2021 01:32 PM

    Hi there,
    Is anyone aware of any script that can be run to a VCenter (with multiple datacentrer, clusters ) and get "esxcli system account list again" from all the hosts attached?
    Not good with scripting, but this will help me grab the information I need on 100ts of hosts.
    Thanks



  • 2.  RE: esxcli system account list

    Posted Jul 13, 2021 02:36 PM

    PowerCLI?

    Want your thread moving to the area of VMTN dedicate to PowerCLI?

     



  • 3.  RE: esxcli system account list

    Posted Jul 13, 2021 05:37 PM

    Yes, How do I move it to VMTN?

    Thanks



  • 4.  RE: esxcli system account list

    Posted Jul 13, 2021 09:04 PM

    This entire forum is VMTN - look in the top-left of your screen.

    I've reported your thread, asking moderators to move it here: https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/bd-p/2805

    You should take a look at that area and do a search, rather than expecting someone else to write a script for you.

     



  • 5.  RE: esxcli system account list
    Best Answer

    Posted Jul 14, 2021 06:46 AM

    You could do something like this

    Get-VMHost -PipelineVariable esx |
    ForEach-Object -Process {
      $esxcli = Get-EsxCli -VMHost $esx -v2
      $esxcli.system.account.list.Invoke() |
      Select @{N='VMHost';E={$esx.Name}},UserId,Description
    }


  • 6.  RE: esxcli system account list

    Posted Jul 15, 2021 03:48 PM

    Thanks, Luc your help is much appreciated.

    Cheers,