VMware Cloud Community
robertandru
Contributor
Contributor
Jump to solution

esxcli system account list

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

Labels (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

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
}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Reply
0 Kudos
5 Replies
scott28tt
VMware Employee
VMware Employee
Jump to solution

PowerCLI?

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

 


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
Reply
0 Kudos
robertandru
Contributor
Contributor
Jump to solution

Yes, How do I move it to VMTN?

Thanks

Reply
0 Kudos
scott28tt
VMware Employee
VMware Employee
Jump to solution

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.

 


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

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
}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
robertandru
Contributor
Contributor
Jump to solution

Thanks, Luc your help is much appreciated.

Cheers,

Reply
0 Kudos