Link to home
Start Free TrialLog in
Avatar of wyhelpofficer
wyhelpofficer

asked on

Disable Laptop After Set Date or Time Period

Hi

I'm trying to manage a pool of Windows 7 loan laptops that are intended for our users to borrow short term. We are having a hard time persuading people to bring them back, which means we never have any available when people need them.

So, I would like to try and find a way to loan out a machine for say 30 days, and somehow disable the computer after that amount of time.

Users do log in using their AD credentials so I don't want to disable their accounts because they will still need to log in to their desktop PCs at the office.

I can't see any built-in way of doing this, is anybody aware of any third party software that could do this for us? One thing I did think of is to write a script that runs on startup, checks the date and runs a shutdown command if a certain date is exceeded - would this potentially work and if so could anyone help with the script???

Of course any other ideas would be appreciated.

Thanks
Avatar of Muhammad Mulla
Muhammad Mulla
Flag of United Kingdom of Great Britain and Northern Ireland image

set a scheduled task to run shutdown.exe -f -t 00 with the trigger set to the date that is after 30 days and repeat the task every 5 minutes. Set it to run as a particular user, whether or not the user is logged in.

This will, however, require some admin to change the start date of the trigger.
Avatar of Scott C
What version of Windows Server are you running?  

If it's 2012 you can use the Disable-ADAccount -identity <machine name> command.

Unfortunately this command is not available in Server 2008.
Avatar of wyhelpofficer
wyhelpofficer

ASKER

Scheduled task is an idea. But how would I set the trigger to the date.. the only options I see are to either trigger on a schedule, choose "one time" and then set the date. Or, trigger at startup and set the activation date accordingly.

The settings for both of these options suggest that the task would only run on the specified date, unless I have misunderstood that. Would either of these options cause the task to run even after the user restarted and logged in again the day after?
ScottCha - I believe the DCs are 2012. Would this method work if the users are logging into the laptops off site using cached credentials?
SOLUTION
Avatar of Scott C
Scott C
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks, well this gives me a couple of options. I'll test out the task and see how well that works, and if that doesn't work I'll have to think about disabling accounts.

Thanks again.