VMware Horizon Community
prime_id2
Enthusiast
Enthusiast

Cannot logoff while Windows session is locked

Hi,

I have thought this was by design since I cant find any information about this.

But this is there a workaround so that the View client can still logoff user even if the session is locked?

The only way to logoff for the user is to unlock Windows and logoff from View client menu.

We use Windows 8.1 with VMware View 5.3.1.

Linked-clones non-persistent pool

Windows Server 2012 R2

NB: We have removed the logoff button in Windows because we want only one way(from View client) for users logoff to keep simplicity.

Tags (4)
6 Replies
Gaurav_Baghla
VMware Employee
VMware Employee

Is this the Error message "the remote session cannot be logged off because it is locked.Please unlock the remote session and try again "

Workaround: From the pool Settings>Under Remote Settings >Automatically logoff After Disconnect >Immediately so whenever a user would close the View client or disconnect the View Client he would be logged off

Regards Gaurav Baghla Opinions are my own and not the views of my employer. https://twitter.com/garry_14
0 Kudos
prime_id2
Enthusiast
Enthusiast

It seems this is a common problem. Doesn't any else got any related issues??

It breaks a some user friendliness when users need to close the whole View client to get a new desktop, if not they only get a local administer user logon.

Seems the credentials is not passed to the new desktop.

NB: We also use F5 as loadbalancing cluser with persistent rule to the last logged on connection server.

Yorick1
Contributor
Contributor

Hi,

we have the same Issue. We have a couple of Users who we can not logoof while the Windows session is locked. Have anybody a solution for this Issue?

Thx

0 Kudos
JHT_Seattle
Hot Shot
Hot Shot

You can disable the ability to lock the workstation, which we did, and which made this issue go away, but the problem is that doing so introduces another issue noted in a KB article in which the only resolution is to enable workstation locking.  This issue has been frustrating us for awhile now.  The closest I can get is running a script to force logoffs, and then noting which users it fails for and manually sending a VM reset (looking at the Sessions, sorting by Status so Disconnected are at the top).  Save the code below as something like "Logoff.ps1" and kick it off from PowerCLI on one of the Connection Brokers:

$DisconnectedSessions = Get-RemoteSession -State "Disconnected" | Sort

foreach ($DisconnectedSession in $DisconnectedSessions) {

  Send-SessionLogoff -Session_id $DisconnectedSession.session_id

  write-host "$($DisconnectedSession.username) has been logged off."

  }

That at least makes it easy to see which sessions are going to hang up.

0 Kudos
EricNichols
Hot Shot
Hot Shot

For the vm you wan to log someone out of, use the reset or remove button in horizon view admin or use reset in vsphere. Once the computer reboots, the user will not be logged in anymore. Sometimes this results in the vm being falgged with status "already used"

You can also use "psexec \\computername logoff 1"

Where 1 is usually the session number of the logged in user.

0 Kudos
brickleberry
Enthusiast
Enthusiast

expected?

i guess you might be right. why have an option and then have that option work..

why not? right? because reasons?

pastedImage_0.png

click logoff session, click ok on confirmation, fail.

yeah, that is right inline with vmware.

so no, this to me is not an expected behavior.

let me guess, this too will be ignored and never looked into or resolved.

vmware already has the overpriced $$. just keep pushing out unreliable products.