question

Jaganljpmail-3347 avatar image
0 Votes"
Jaganljpmail-3347 asked AndreasBaumgarten commented

how to see list of disconnected users for all hosts?

We have 25 hosts, rather than going to each and every host and check users session status is there a powershell command or an easy way to check list of disconnected/logged off users that get stuck and need to clear manually for them to use their wvd session.

azure-virtual-desktop
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I am currently investigating and will get back to you shortly. Thanks.

0 Votes 0 ·

Hi @Jaganljpmail-3347 ,

did my answer work for you? Are there any additional questions to this topic?

If you found the answer helpful, it would be great if you please mark it "Accept as answer". This will help others to find answers in Q&A

----------
Regards
Andreas Baumgarten

0 Votes 0 ·

1 Answer

AndreasBaumgarten avatar image
1 Vote"
AndreasBaumgarten answered

Hi @Jaganljpmail-3347 ,

maybe this PowerShell script helps to get started:

 $resourceGroupName = "<your-resourcegroup name>"
 $hostPoolName = "<your hostpool name>"
 Get-AzWvdUserSession -ResourceGroupName $resourceGroupName -HostPoolName $hostPoolName | ForEach-Object {
   Write-Output "UserName: $($_.UserPrincipalName)"
   Write-Output "Session Status: $($_.SessionState)"
   Write-Output "Session Host: $($_.Name)"
 }

The result will look like this:

194428-image.png



(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

Regards
Andreas Baumgarten


image.png (22.7 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.