Reply to Message

View discussion in a popup

Replying to:
LucD
Leadership
Leadership

My mistake, try something like this

$user = "root" 
$pswd
= "password"

Get-VMHost
| %{   $esx = Connect-VIServer $_.Name -User $user -Password $pswd
  Get-VMHostAccount -Server $esx |
 
Select @{N="Host";E={$esx.Name}},@{N="Uid";E={$_.ExtensionData.Id}},Id,@{N="Name";E={$_.ExtensionData.FullName}}   Disconnect-VIServer -Server $esx -Confirm:$false
}


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

View solution in original post

Reply
0 Kudos