Log off scripts

Discussion in 'Scripting & Programming' started by Nelix, Jan 30, 2004.

  1. Nelix
    Honorary Member

    Nelix Gigabyte Poster

    1,416
    3
    82
    I need a Script that I can run as a scheduled task that will log off a named user, Anyone got any Ideas????

    Cheers
     
    Certifications: A+, 70-210, 70-290, 70-291, 74-409, 70-410, 70-411, 70-337, 70-347
    WIP: 70-346
  2. Nelix
    Honorary Member

    Nelix Gigabyte Poster

    1,416
    3
    82
    Phil has been helping me with this one but let me give you the reasons why.

    My Son, Leg in cast, has taken to staying up until 3:00 in the morning playing on the computer (mainly the laptop) with out us knowing, So I want to stop him from using the internet after 12:00 midnight which I feel is more than fair.

    I have setup logon hours in active directory but this will only stop him from logging on after 12:00, if he is currently logged on at midnight then nothing happens. I am looking for a script that I can run as a scheduled task from the server that will logg him off which ever machine he is using, anyone got any clues???
     
    Certifications: A+, 70-210, 70-290, 70-291, 74-409, 70-410, 70-411, 70-337, 70-347
    WIP: 70-346
  3. Luton Bee

    Luton Bee Kilobyte Poster

    365
    0
    36
    Can't say I have ever tried this but Google dug up this little gem here

    HTH
     
    Certifications: MCSE, MCSA, MCP, A+, Network+ C&G ICT
    WIP: CCNA
  4. Phoenix
    Honorary Member

    Phoenix 53656e696f7220 4d6f64

    5,749
    200
    246
    why not just use psshutdown and have it scheduled to run at 12
    will force the machine to shutdown and restart, at which point he cant log back on anyway
    www.sysinternals.com

    or that trick above might work ;) (just read the link lol)

    Moderator note: fixed URL
     
    Certifications: MCSE, MCITP, VCP
    WIP: > 0
  5. Nelix
    Honorary Member

    Nelix Gigabyte Poster

    1,416
    3
    82
    Both are good ideas, will play with them both when I get a little more time

    Thanks guys
     
    Certifications: A+, 70-210, 70-290, 70-291, 74-409, 70-410, 70-411, 70-337, 70-347
    WIP: 70-346
  6. Nelix
    Honorary Member

    Nelix Gigabyte Poster

    1,416
    3
    82
    I just had a look at the Net Accounts idea above and it is a good little command to remember but it only forces a logof for people who have had time restrictions that have been set by a group policy, I need a program or script that will identify a user and log them off.

    thanks anyway guys, keep the ideas coming.

    I will have a look at the pssutdown idea later.

    Thanks again
     
    Certifications: A+, 70-210, 70-290, 70-291, 74-409, 70-410, 70-411, 70-337, 70-347
    WIP: 70-346
  7. Nelix
    Honorary Member

    Nelix Gigabyte Poster

    1,416
    3
    82
    Still need something to do this job guys!!
     
    Certifications: A+, 70-210, 70-290, 70-291, 74-409, 70-410, 70-411, 70-337, 70-347
    WIP: 70-346
  8. Phoenix
    Honorary Member

    Phoenix 53656e696f7220 4d6f64

    5,749
    200
    246
    did you try PSSHutdown yet? it can force a machine to shutdown (restart with the right switches), not sure if it has to be a domain computer or not, especially if executed locally
     
    Certifications: MCSE, MCITP, VCP
    WIP: > 0
  9. SimonV
    Honorary Member

    SimonV Petabyte Poster Gold Member

    6,651
    180
    258
    Certifications: MOS Master 2003, CompTIA A+, MCSA:M, MCSE
    WIP: Keeping CF Alive...

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.