- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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