cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
GMFDE
Engaged Sweeper III
I wanted to post another small Asset Page action that might be helpful for some. We occasionally get notifications from our IT Sec organization regarding active logons for users that have been released from employment. First, create a small batch file (you can use PS too if you want) that does the following:

%SYSTEMROOT%\SYSTEM32\MSG.EXE * /TIME:60 /V /W "Per request from IT Security, the computer, %COMPUTERNAME%, is going to log off all users in 60 seconds. Please save your work and then close this message."
LOGOFF 1
LOGOFF 2
LOGOFF 3

We have found that occasionally, the session we want to kill is not the only session on the machine, so we through up a little warning first. the next three lines are obvious. The "Logoff" command is built into Windows 7.

Put this file in your {actionpath}. Next, create the following action:

{actionpath}psexec.exe \\{smartname} {actionpath}logoffwin7.bat

This connects to the target machine and runs the command using psexec. Obviously, you need to have psexec in your {actionpath} as well. It is rather slow to respond, so be patient. I also recommend you test it first so you can be prepared to explain to your users in case they call (they always call )

Cheers.

0 REPLIES 0

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now