3 Replies Latest reply on Jan 12, 2018 7:35 AM by tdubb123

    get-vmhostaccount - the requested operation is only suported when connected directly to esx host

    tdubb123 Master

      I am trying to find out if this local user exist on my esx servers with this


      $accountName = "test"


      connect-viserver vc

      $esxlist = Get-VMHost

      foreach($esx in $esxlist){

      $esx = Connect-VIServer -Server $esx -User root -Password "xxxxxx"

        get-VMHostAccount -Id $accountName


         Disconnect-VIServer -Server $esx -Confirm:$false





      but keep getting the error



      Screen Shot 2018-01-11 at 9.05.27 AM.png