Mark Minasi's Reader Forum
Mark Minasi's Reader Forum
Home | Profile | Register | Active Topics | Active Polls | Members | Search | FAQ | Minasi Forum RSS Feed
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 HALP! Questions on Windows and Windows Server
 Group Policies
 Logoff Automatically
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

paulkc
Seasoned But Casual Onlooker

60 Posts
Status: offline

Posted - 09/08/2004 :  9:23:07 PM  Show Profile  Reply with Quote
I am trying to get my XP Pro Workstations to log off automatically when their logon time expires but cannot seem to get it to work. I put it in the default domain policy as required but the wkstn remains logged on all night. Help?

dmarelia
Moderator

USA
2922 Posts
Status: offline

Posted - 09/08/2004 :  11:15:05 PM  Show Profile  Visit dmarelia's Homepage  Reply with Quote
Which policy exactly are you setting?

Darren Mar-Elia
MS MVP--Group Policy
Group Policy Resource Site: http://www.gpoguy.com
Group Policy Blog: http://www.sdmsoftware.com/blog
Group Policy on Twitter:
http://www.twitter.com/grouppolicyguy
Like us on Facebook: http://www.facebook.com/SDMSoftware
***********
GPO Inventory & Comparison Simplified. Get SDM Software's GPO Reporting Pak -- http://sdmsoftware.com/group-policy-management-products/group-policy-reporting-pak/
Go to Top of Page

mkline71
Here To Stay

USA
106 Posts
Status: offline

Posted - 09/09/2004 :  04:04:11 AM  Show Profile  Reply with Quote
He may be trying to set Computer Config\Windows Settings\Security Settings\Local Policies\Security Options >> Automatically log off users when logon time expires

This policy may not log the users off but instead disconnect them from remote shares (file shares/remote servers)

I'll try and test this out. If that doesn't work then you may want to try

http://support.microsoft.com/default.aspx?scid=kb;en-us;314999

Thanks
Mike

Mike Kline
Go to Top of Page

JSCLMEDAVE
Administrator

USA
6113 Posts
Status: online

Posted - 09/09/2004 :  08:33:05 AM  Show Profile  Visit JSCLMEDAVE's Homepage  Click to see JSCLMEDAVE's MSN Messenger address  Reply with Quote
What about a forced reboot? shutdown /r /f /m \\PC Name /T 02 /c "scheduled maintenance" Of course the time can be changed to what ever you want as well as the message.

Tim-

“This too shall pass"

Edited by - JSCLMEDAVE on 09/09/2004 08:33:33 AM
Go to Top of Page

paulkc
Seasoned But Casual Onlooker

60 Posts
Status: offline

Posted - 09/13/2004 :  10:04:35 AM  Show Profile  Reply with Quote
The policy I set is: Computer Config\Windows Settings\Security Settings\Local Policies\Security Options >> Automatically log off users when logon time expires
Go to Top of Page

paulkc
Seasoned But Casual Onlooker

60 Posts
Status: offline

Posted - 09/13/2004 :  10:08:17 AM  Show Profile  Reply with Quote
JSCLMEDAVE,
I am not understanding your post on the forced reboot. A forced reboot would be great. If you could further explain that for me, I would greatly appreciate it.
Go to Top of Page

JSCLMEDAVE
Administrator

USA
6113 Posts
Status: online

Posted - 09/13/2004 :  11:36:33 AM  Show Profile  Visit JSCLMEDAVE's Homepage  Click to see JSCLMEDAVE's MSN Messenger address  Reply with Quote
We force all of our PCs to reboot nightly at a set time. When they come back up they are scanned and defragged. We do this to ensure that no other programs are running that may cause a problem with the scan or defrag.

I am not sure if this is what you were looking for, but I thought it could be a temp solution.

Tim-

“This too shall pass"

Edited by - JSCLMEDAVE on 09/13/2004 12:34:12 PM
Go to Top of Page

paulkc
Seasoned But Casual Onlooker

60 Posts
Status: offline

Posted - 09/14/2004 :  10:34:02 AM  Show Profile  Reply with Quote
That is exactly what I need to do but how do you do that? Are you scripting it or what? Thanks
Go to Top of Page

JSCLMEDAVE
Administrator

USA
6113 Posts
Status: online

Posted - 09/14/2004 :  10:51:42 AM  Show Profile  Visit JSCLMEDAVE's Homepage  Click to see JSCLMEDAVE's MSN Messenger address  Reply with Quote
REM Prepares networked workstations for nightly processes
REM Makes sure that all workstations are logged off
REM
REM Last updated: 06/18/2004
REM Last Update BY: LTB
REM
shutdown /r /f /m \\PCNAME26 /T 02 /c "scheduled maintenance"

Just repeat this line for all of the pCs that you have. The 02 is the seconds that the MSG "scheduled maintenance" will appear before it logs off. There is no one here when this goes off so I am not worried about the 2 seconds...

I created this as a .bat file, then use scheduled task to run it every night at 7pm from the DC...

shutdown ? will give you this info...

Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "c
omment"] [-d up:xx:yy]

No args Display this message (same as -?)
-i Display GUI interface, must be the first option
-l Log off (cannot be used with -m option)
-s Shutdown the computer
-r Shutdown and restart the computer
-a Abort a system shutdown
-m \\computername Remote computer to shutdown/restart/abort
-t xx Set timeout for shutdown to xx seconds
-c "comment" Shutdown comment (maximum of 127 characters)
-f Forces running applications to close without warning
-d [u][p]:xx:yy The reason code for the shutdown
u is the user code
p is a planned shutdown code
xx is the major reason code (positive integer less than 256)
yy is the minor reason code (positive integer less than 65536)

Tim-

“This too shall pass"
Go to Top of Page

paulkc
Seasoned But Casual Onlooker

60 Posts
Status: offline

Posted - 02/03/2006 :  5:17:00 PM  Show Profile  Reply with Quote
I tried the above method but for some reason if any of the computers that are in the list are not running, it seems to cause a problem. It will cycle through several computers but then eventually it starts just scrolling constantly in the command window. Any idea what would cause this. I can close the command window but when I try to run the batch file again, the same thing is scrolling when the command window comes back up. Even if I try to run another batch file, the same thing happens. Any help would be appreciated.
Go to Top of Page

JSCLMEDAVE
Administrator

USA
6113 Posts
Status: online

Posted - 02/03/2006 :  5:25:46 PM  Show Profile  Visit JSCLMEDAVE's Homepage  Click to see JSCLMEDAVE's MSN Messenger address  Reply with Quote
Make sure NOT to name the bat file shutdown... We did that by mistake and it would just scroll until we killed it. Changed the bat file name to nightlyshutdown, works fine. If a PC is already off it will sit idle for about a min and then move on to the next one on the list.

Tim-

“This too shall pass"
Go to Top of Page

paulkc
Seasoned But Casual Onlooker

60 Posts
Status: offline

Posted - 02/03/2006 :  8:44:16 PM  Show Profile  Reply with Quote
Thanks. That is what I did. Although, I had one named restart also because on the weekends I want to shutdown completely. When I ran that one it would do the same thing. Of course, it may have been because I had run the shutdown.bat right before it. How can I kill the shutdown.bat from running. Even after a reboot on my laptop, every time I try to run my restart.bat the shutdown.bat is scrolling in the cmd window.
Go to Top of Page

jsphweid
Here To Stay

299 Posts
Status: offline

Posted - 02/04/2006 :  08:26:39 AM  Show Profile  Reply with Quote
Question: Why is it that when you name it "shutdown.bat" does it not run?
Joseph

"If A equals success, then the formula is: A = X + Y + Z, X is work. Y is play. Z is keep your mouth shut."
Albert Einstein
Go to Top of Page

arek73
Honorable But Hopeless Addict

Poland
4642 Posts
Status: offline

Posted - 02/04/2006 :  11:04:43 AM  Show Profile  Visit arek73's Homepage  Click to see arek73's MSN Messenger address  Reply with Quote
Because shutdown is a name of system system command, hence it will try to execute that command instead.

----
Arek
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Mark Minasi's Reader Forum © 2002-2011 Mark Minasi Go To Top Of Page
This page was generated in 0.22 seconds. Snitz Forums 2000