How to force users to logoff a networked PC

How to force users to logoff a networked PC

Even on the smallest network, one of the issues every system administrator faces is that of getting a “clean” backup – a backup which doesn’t show errors due to open files being locked and therefore unable to backup properly.

True, backup applications such as Backup Exec have Advanced Open File options that allow you to overcome these issues – but if you’re not using such an application, you’re left in the position of politely reminding your users to logoff each night… again… and again… and again… and again…

The simple fact is, when the clock hits 1730 for “knocking off” – the last thing on a users mind is the fact that if they don’t logoff then the server backup may be affected. More likely they are already in the pub ordering a cold one.

So how do you force users to log-off? There are 3rd Party applications to do this, but they cost money – money that the MD is unlikely to sanction spending (“Remind them again to logoff” is a more likely response).

There are also Group Policy settings that are supposed to force logoff’s for you – but in my experience these simply don’t work reliably.

Step in SysInternals PSShutdown. PSShutdown is a free tool, part of the PS Toolkit, that can be run from a command line to force logoff’s and reboot’s of remote machines.

Download the tool, extract the file psshutdown.exe to a folder on your server, then create a text file containing the names of all the computers you’d like to automatically logoff each night. i.e.

COMPUTER001

COMPUTER002

Save this file as COMPUTERS.TXT in the same folder as PsShutdown.exe

Then, create another text file and fill it with a command line something similar to this:-

PsShutdown.exe -e p:0:0 -r @computers.txt

The above command line simply says, run PsShutdown.exe and set the Shutdown Reason (-e) to Scheduled Maintenance (p:0:0) then reboot (-r) the computers in the file @computers.txt

The full command line switch list for PsShutdown.exe can be found here.

Save this new file as a Batch file called PsShutdown.bat and then use the servers Scheduled Tasks (Start > Programs > Accessories > System Tools > Scheduled Tasks) to run this batch file at a convenient time, say 20:30, when all the users have left for the day.

Each night at 20:30, any users left logged onto the systems will now be “kicked” off and their machines given a clean-boot.

Your Backups should now be squeaky clean and free of any open-file issues!

RICHARD TUBB

Richard Tubb is one of the best-known experts within the global IT Managed Service Provider (MSP) community. He launched and sold his own MSP business before creating a leading MSP media and consultancy practice. Richard helps IT business owner’s take back control by freeing up their time and building a business that can run without them. He’s the author of the book “The IT Business Owner’s Survival Guide” and writer of the award-winning blog www.tubblog.co.uk

All Posts

You might like:

Super Top Tech For Your Pampered Pet Guinea Pigs image

Super Top Tech For Your Pampered Pet Guinea Pigs

Tech Guides | By Richard Tubb
How to monitor online mentions of your business with Google Alerts image

How to monitor online mentions of your business with Google Alerts

Building Relationships | By Richard Tubb
Here is a Google Script for using SaneBox alongside Unroll.me image

Here is a Google Script for using SaneBox alongside Unroll.me

Tech Guides | By Richard Tubb
How do I remove a LinkedIn contact? image

How do I remove a LinkedIn contact?

Tech Guides | By Richard Tubb

How to remove the Windows 10 Upgrade icon

Tech Guides | By Richard Tubb
What to do if you lose your Amazon Kindle image

What to do if you lose your Amazon Kindle

Tech Guides | By Richard Tubb
British Gas Hive Active Heating Review image

British Gas Hive Active Heating Review

Tech Guides | By Richard Tubb
How to build a high traffic blog on WordPress image

How to build a high traffic blog on WordPress

Tech Guides | By Richard Tubb
How to block Yesware from tracking you image

How to block Yesware from tracking you

Tech Guides | By Richard Tubb
Using a Three Home Signal Femtocell to improve a Mobile Phone Signal image

Using a Three Home Signal Femtocell to improve a Mobile Phone Signal

Tech Guides | By Richard Tubb
Taking a look at GFI EventsManager 2013 image

Taking a look at GFI EventsManager 2013

Tech Guides | By Guest Author
Recommended Podcasts for IT Professionals image

Recommended Podcasts for IT Professionals

Tech Guides | By Richard Tubb

Comments

2 thoughts on How to force users to logoff a networked PC

DAVID

8TH AUGUST 2008 12:57:24

Have you considered the -t 600 and -c switch for folk who work back they can cancel the shutdown and they ten minutes should be enough time to come back from making coffee or the loo

RICHARD

8TH AUGUST 2008 17:27:22

Great tip David - thanks for your comment.

Leave a Reply

Your email address will not be published. Required fields are marked *

Share via
Send this to a friend