You probable want to remove or empty the file afterward to make sure it isn't 
trying to repeat the same actions on a user that just logged back in. :)

--
There are 10 kinds of people in the world...
         those who understand binary and those who don't.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On 
Behalf Of Michael Leone
Sent: Wednesday, February 15, 2017 10:43 AM
To: [email protected]
Subject: Re: [NTSysADM] Managing RDS 2012 sessions from Win 7

On Tue, Feb 14, 2017 at 1:25 PM, Melvin Backus <[email protected]> wrote:
> This sounds like a good use for a flag file.  If you create a scheduled task 
> that runs on a repeating / continuous basis, it can look for a file which 
> contains the login name(s) of any sessions that need to be killed. That file 
> can be stored on a share which is accessible to your unadmin user, who can 
> edit the file as required. The next time the task executes it parses the file 
> and kills any session with that login name. Have it run on all servers if 
> required or make the task to the search, whatever works best for you.


Ooooh! Now, THAT sounds like a plan ... I will bring it up at the next staff 
meeting, as to whether we do that, or continue to have the "unadmin" user 
request the Help Desk to terminate a session for him ... I can cobble together 
a PowerShell script to check for the file, kill the session and log it, maybe 
even send a confirmation email. And if it runs on the RDS Web Server, I can use 
the PS cmdlets to kill a session (since the server is Win 2012). Maybe have it 
run every 5 minutes or so, that way the end user doesn't have to wait too long 
before they can try re-connecting.

Thanks for the great idea!


Reply via email to