We have a user that cannot seem to close his/her QuickBooks session at the end of the day.
So I created the following PowerShell script to logout the specified user:
$sessions= query user username
$sessionid=$sessions.Substring(39,6).Trim() |select-object -index 1
Invoke-RDUserLogoff -HostServer "localhost" -UnifiedSessionID $sessionid -Force
Change username to be the username of the target user you want logged off then set a schedule task when it should happen.