Can someone help me.... we keep getting users hung up in our RDS..... I don't know what causing it and i don't know how to clean it up....
I am attempting this Powershell code
$user = "first.last" Get-RDUserSession | Where-Object {$_.UserName -eq $user -and $_.CollectionName -eq "CollectionPooled"} | Invoke-RDUserLogoff -Force
But i am getting this back.
Get-Result : Failed to sign out from user session. The virtual desktop that is hosting the session is not running. At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\RemoteDesktop\RemoteSessionManagement.psm1:238 char:18+ $ResultStr = Get-Result -ErrorCode $ErrorCode -SuccessMessage (Get-ResourceS ...+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-Result
*EDIT*
A few other things to note. In the RDS GUI it shows his machine as "stopped" even after refreshes. However HyperV has it running.