5
1
Is there any way to force another user to logoff via command line in Windows 7 Home Premium?
My work VPN policy requires that there be only 1 user logged in, to log the other users off I have to run the command prompt as administrator, run the task manager and then right click and log them off. This is a little annoying. Ideally, I'd like an executable or batch script to run that did it all in one quick step. I've ran across a couple threads talking about logging users off after a set timeout, and that might work ok too (assuming there are any that work...my findings are that there aren't) - but I'd still like to know how to do it in one step if possible.
Is there any way to do what I am asking?
I'm not opposed to writing a .net app if I have to as well.
I don't think that will work for me.
logoff /?
yields nothing, further the MS page says this: "This article applies to a different version of Windows than the one you are using. Content in this article may not be relevant to you. Visit the Windows 7 Solution Center" – javamonkey79 – 2011-10-27T02:53:14.350that's strange; possibly your edition of Windows doesn't include the command? You could try the TSLOGOFF replacement utility on this page, it should (might??) do what you want.
– Geoff – 2011-10-27T19:53:58.023A bit of reading turns up the fact that
– Geoff – 2014-04-16T13:51:27.883logoff.exe
isn't available in Home Premium. You can copy the it fromC:\Windows\System32
on a different Windows box, if you have one with a different license type, per this answer.