VMware Horizon Community
sjesse
Leadership
Leadership
Jump to solution

Connect-HVServer Could not find user or group in AD

I can't seem to get Connect-HVServer to work. I'm pointing it to a connection server, but it can't seem to find my user for some reason. I can logon fine to that connection, and perform any function there. I've tried even adding the user directly as an administrator in horizon view, currently we are using security groups. Neither work, the same security group is used fro vcenter and that works just fine.Thank you for any help or suggestions

Connect-HVServer : ExceptionType : VMware.Hv.EntityNotFound

ErrorMessage : Could not find user or group in AD

Id : VMware.Hv.UserOrGroupId

At line:2 char:1

+ Connect-HVServer -Server euc-conn-wp01.ur.rochester.edu -User 'sjesse ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Connect-HVServer], Exception

    + FullyQualifiedErrorId : System.Exception,VMware.VimAutomation.HorizonView.Commands.Cmdlets.ConnectHVServer

0 Kudos
1 Solution

Accepted Solutions
sjesse
Leadership
Leadership
Jump to solution

Of course I find the kb article after I add this

Logging in to Horizon View server fails to authenticate the user (2148374) | VMware KB

I had to create a new user to get it to work.

View solution in original post

0 Kudos
2 Replies
sjesse
Leadership
Leadership
Jump to solution

Of course I find the kb article after I add this

Logging in to Horizon View server fails to authenticate the user (2148374) | VMware KB

I had to create a new user to get it to work.

0 Kudos
Jeff_A
Contributor
Contributor
Jump to solution

PowerCLI C:\> Connect-HVServer -Server xxxx.xxxx.xx

Connect-HVServer : ExceptionType : VMware.Hv.EntityNotFound

ErrorMessage : Could not find user or group in AD

Id : VMware.Hv.UserOrGroupId

At line:1 char:1

+ Connect-HVServer -Server xxxx.xxxx.xx

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Connect-HVServer], Exception

    + FullyQualifiedErrorId : System.Exception,VMware.VimAutomation.HorizonVie

   w.Commands.Cmdlets.ConnectHVServer

This error can be caused by some AD groups with SID history.  Here is how you can check for this yourself and resolve the issue:

On the connection server your trying to connect to using connect-hvserver go into the logs directory at:

C:\ProgramData\VMware\VDM\logs

Locate the debug-yyyy-mm-dd-nnnn file that has this line:

Cannot get domain base DN by SID, copy the SID

Open PowerShell and run this command, substituting the sid found:

Get-ADObject -Filter {(SIDHistory -eq "S-1-5-21-nnnnnnnnn-nnnnnnnnnn-nnnnnnnnnn-nnnnn") }

In the DistinguishedName, you will find the AD Group name. 

Now, you need to remove the SID History from that AD group.

One way of doing this:

https://itfordummies.net/2015/12/09/remove-sidhistory-powershell/

That should resolve the issue

0 Kudos