none
Log off Script RRS feed

  • Question

  • Hello:

    I need to incorporate a force logoff for the dealership. I want to log everyone off the server at 9pm every night. I know how to implement the  script and how assign it but don't know the wording or language to use in the script. I've done many searches but they only tell me how to implement the script but no the actual script. I am using windows server 2008 R2 with Win7 Pro on all pc's. Hope this makes sense! 

    KEvin 


    Kevin R. Miller

    Friday, August 11, 2017 7:27 PM

Answers

  • Bill:

    Thank you. I guess I was looking for something more complicated. I'm learning more and more about AD. I trying to take the dealership to a higher level of security and functionality. 

    Kevin 



    Kevin R. Miller

    • Marked as answer by ksstmiller7 Friday, August 11, 2017 10:51 PM
    Friday, August 11, 2017 10:37 PM

All replies

  • I want to log everyone off the server at 9pm every night.

    What does "log everyone off the server" mean, technically speaking, and why do you think you need to do that?


    -- Bill Stewart [Bill_Stewart]

    Friday, August 11, 2017 7:39 PM
    Moderator
  • There is really no easy way to force people to log off short of running "shutdown /f /l" on every workstation. A "logoff script" does not log a user off it just runs when the account logs off.


    \_(ツ)_/

    Friday, August 11, 2017 7:46 PM
  • Bill:

    I want to kick everyone off the server so I can do updates for pricing and update the server. Currently i have to go to each pc and log people off the dealership software to do price updates. I don't want to reboot anything just log people off the server. 

    Is there a way to kill all the .exe for the dealership software on the server at a certain time? Is there a script to put on each pc to kick them out. 

    Ideally I'd like to kick everyone off the server and lock it down so no after hours data breach could happen. 

    Kevin


    Kevin R. Miller

    Friday, August 11, 2017 9:26 PM
  • Just tell users the server will be shutdown at a certain time and they must log of or lose their session.

    If users are running from a PC then the software will likely not have an issue.  Just do you upgrade.

    I recommend contacting a consultant who is trained and certified in Windows to help you figure out how to do this.  This is not a good palce to get free consulting.


    \_(ツ)_/

    Friday, August 11, 2017 9:32 PM
  • In theory telling them to log out should work but rarely does.  There is always one screen that remains open which doesn't allow me to do the price update. I see in GPO there is a logoff script option but I need to create a .cmd file and paste it in the script box. That is why I ask about a script to log all users off the server... or at least kill all .exe's used by the dealership software. 

    Kevin


    Kevin R. Miller

    Friday, August 11, 2017 9:42 PM
  • Is that because the file is shared?  Just close all sessions on the share from the GUI. That will release all files.


    \_(ツ)_/

    Friday, August 11, 2017 9:47 PM
  • I am asking for your specific technical definition of what "kick people off the server" means.


    -- Bill Stewart [Bill_Stewart]

    Friday, August 11, 2017 9:49 PM
    Moderator
  • I "kick" people of my servers with my size 10 boots.  It is very effective.


    \_(ツ)_/

    Friday, August 11, 2017 9:55 PM
  • Bill:

    Thank you for responding. I would like to force/log all users off the server at 9pm each night. The dealership software will not allow me to do any updates with any price related screen open. G2client.exe is the executable used to open the software. 

    if there is a script to use to kill all G2client.exe in the network ... I'd be open for that as well. 

    Kevin


    Kevin R. Miller

    Friday, August 11, 2017 10:05 PM
  • You fail to say how th users  are logged onto the server.  Are the using RDS or a database or just shared fields.

    Please understand that this is not a free consulting forum.  The assumption is that you are a trained Windows tech in the technologies you are asking about.  It is not a forum for free consulting or free scripts.

    You need to ask clear technical questions.  We cannot guess at what you are trying to ask and your lack of technical training makes your questions, even though they are clear to you, very ambiguous to us.


    \_(ツ)_/

    Friday, August 11, 2017 10:17 PM
  • Create a scheduled task on each computer that runs this command at a certain time:


    shutdown /l /f

    This command forces a log off. Note that this may cause problems in your application if it doesn't like to be terminated abruptly. (That is a question for your software's vendor.)

    This is not really a scripting question.


    -- Bill Stewart [Bill_Stewart]


    Friday, August 11, 2017 10:20 PM
    Moderator
  • "shutdown" won't work if these are RDS sessions. 

    \_(ツ)_/

    Friday, August 11, 2017 10:30 PM
  • Bill:

    Thank you. I guess I was looking for something more complicated. I'm learning more and more about AD. I trying to take the dealership to a higher level of security and functionality. 

    Kevin 



    Kevin R. Miller

    • Marked as answer by ksstmiller7 Friday, August 11, 2017 10:51 PM
    Friday, August 11, 2017 10:37 PM