Problem solve Get help with specific problems with your technologies, process and projects.

Enforcing logon time restrictions

If group policy logon restrictions aren't forcing off users as they should be, then you'll want to try this.

This tip was submitted to the Tip Exchange by member Michael Adams. Let other users know how...

useful it is by rating the tip below.

If you've set up a group policy to set logon restrictions for certain users to particular hours of the day, you may find at some point that users who should be logged off are not being forced off by the system as they should be. When this happens, try the following:

  1. Open a <CMD> prompt.
  2. Type the following: net accounts //forcelogoff:<minutes> //domain

<Minutes> is the number of minutes after the log on time expires at which a user will be forced off.

The user should receive a warning message <minutes> before the 'forced log off.'

The default setting for the <//forcelogoff> switch is no. When no is set, forced logoff is prevented.

To view the current setting, open a <CMD> prompt and type <net accounts>.

If this returns:

Force user logoff how long after time expires?: Never

Then forced logoff is prevented. It is not recommend to set the <minutes> to 0.

This was last published in February 2003

Dig Deeper on Microsoft Group Policy Management

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.