Share via

virtual desktop

eg1995 1,156 Reputation points
2022-01-07T12:38:06.427+00:00

hi team,

i want to deploy azure virtual desktop resource manager model for 10 users in a pooled scenario. can i force log off users? and not all of them by terminating the sessions

so is there any option to check who are the users connected and then remove one of them if i dont want him to connect?

thank you in advance

Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.

Azure Virtual Desktop
Azure Virtual Desktop

A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.

0 comments No comments

Answer accepted by question author

kobulloc-MSFT 26,861 Reputation points Microsoft Employee Moderator
2022-01-07T23:08:07.277+00:00

Hello, @eg1995 !

There are a couple ways to do this. From the Azure Portal, go to your host pool > session host > select the user and Log off the user:

163286-image.png

PowerShell
Using PowerShell, you can use the following commands.

Logoff a user session
https://learn.microsoft.com/en-us/powershell/module/az.desktopvirtualization/remove-azwvdusersession?view=azps-7.1.0

Remove-AzWvdUserSession -ResourceGroupName MyResourceGroupName -HostPoolName MyHostPoolName -SessionHostName MySessionHostName -Id 2  

List all active user sessions in a host pool
https://learn.microsoft.com/en-us/powershell/module/windowsvirtualdesktop/get-rdsusersession

Get-RdsUserSession -TenantName "MyTenantName" -HostPoolName "MyHostPoolName"  

Was this answer helpful?


1 additional answer

Sort by: Most helpful
  1. S.Sengupta 30,906 Reputation points MVP Volunteer Moderator
    2022-01-07T12:43:37.78+00:00

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.