I'm trying to create a PowerShell script to kill some active sessions when there are too many users logged in - some of them log in multiple times (yes, we are trying to train them not to) and I cannot log in myself to kill sessions from within NAV. We have 3 service tier machines, so using the GetSession powershell cmdlet doesn't help much. So I'm going down the path of running a sql query against the [Active Session] table to identify users who are logged in more than once.
My questions are:
1. Is there a way to tell from the [Active Session] table which SQL session is being used, so I could use a SQL KILL command?
2. Does anyone know if I run a DELETE FROM [Active Session] where [Session ID] = 'xxxx' will kill a user's session? Or any other SQL command to kill a user session?