mehball Posted March 12, 2009 Posted March 12, 2009 Hi Guys Does anyone know of a way we can set our client PC;s to defrag on shutdown or at specifics times/dates? We would like to be able to do this via group policy or server end as we have about 2000 clients. Thanks
FN-GM Posted March 12, 2009 Posted March 12, 2009 I dont think there is, we use diskkeeper to do this. Z
Polski Posted March 12, 2009 Posted March 12, 2009 defrag c: -f -v We use these settings in a batch file to keep servers in check. No problems in a good few years of use. On he servers, we schedule it to be done at the weekend.
mehball Posted March 12, 2009 Author Posted March 12, 2009 (edited) defrag c: -f -v We use these settings in a batch file to keep servers in check. No problems in a good few years of use. On he servers, we schedule it to be done at the weekend. Could you explain a tiny bit on how this would be set up... as in creating the batch file. Edited March 12, 2009 by shane_saintsfc
FN-GM Posted March 12, 2009 Posted March 12, 2009 You would just copy the code into wordpad then save the file as defrag.bat In Windows 2003 Domain i cant think off the top of my head to get it on the clients as a scheduled task. In server 2008 you can set it in group policy.
deanc Posted March 12, 2009 Posted March 12, 2009 or add it as a shutdown script which was what the OP asked. shouldnt be a problem as long as the kids dont shutdown eavery lesson
FN-GM Posted March 12, 2009 Posted March 12, 2009 or add it as a shutdown script which was what the OP asked. shouldnt be a problem as long as the kids dont shutdown eavery lesson The only problem would be if you need to reboot during a lesson or something, scheduled ask would be best
RabbieBurns Posted March 12, 2009 Posted March 12, 2009 Ive been evaluating o&o defrag on my machine. Purports to do on the fly defragmenting, and also a scheduled startup defrag etc. Not sure if its something worth getting for every workstation right enough.
AyatollahPies Posted March 13, 2009 Posted March 13, 2009 Big fan of JKDefrag myself. (Can be found on filehippo if you search) Can be set to run via batch. Seems to do a far better defrag than the windows system defrag. Has plenty of flags to play with too. Can also be set to run as the screensaver, though whether you would want such heavy disc activity so frequently is questionable. 1
Polski Posted March 13, 2009 Posted March 13, 2009 Sorry for the delay, on the road this morning. Create a batch file with the following in: - c:\windows\system32\defrag.exe c: -f -v shutdown -s The batch file can be local, but restrict access to it so little people do not play. Schedule the batch file to run, using an administrator's credentials, on the evening in question. The script will defragment the c: the -f forces it to do so even if it is short of space and -v means verbos (no user input required). Once defrag has completed, the PC will shut down. If you decide to test the script, you can cancel the defrag process by pressing +C to cancel the batch task. 1
mehball Posted March 16, 2009 Author Posted March 16, 2009 (edited) Sorry for the delay, on the road this morning. Create a batch file with the following in: - c:\windows\system32\defrag.exe c: -f -v shutdown -s The batch file can be local, but restrict access to it so little people do not play. Schedule the batch file to run, using an administrator's credentials, on the evening in question. The script will defragment the c: the -f forces it to do so even if it is short of space and -v means verbos (no user input required). Once defrag has completed, the PC will shut down. If you decide to test the script, you can cancel the defrag process by pressing +C to cancel the batch task. Thanks Can this still run if the PC in logged off ie (On CTRL AlT DEL) Screen. Also is there a script to run that will run the defrag when a user click shutdown. We are looking at doing this monthly so when a user shutdown it will run the defrag before. Thanks Edited March 16, 2009 by shane_saintsfc
AyatollahPies Posted March 16, 2009 Posted March 16, 2009 Thanks Can this still run if the PC in logged off ie (On CTRL AlT DEL) Screen. Also is there a script to run that will run the defrag when a user click shutdown. We are looking at doing this monthly so when a user shutdown it will run the defrag before. Thanks Not so sure about getting it to run when you click on shutdown, but it's easy enough to create a shortcut to the batch file and save it in your start menu. I give it the same icon as shutdown. Might be worth telling it to run a disc cleanup before it runs a defrag too. Just add 'cleanmgr' to the batch file.
SYNACK Posted March 17, 2009 Posted March 17, 2009 If you set it as the shutdown script in AD then it will run on shutdown no matter where you shut it down from. You could use some conditionals in the file to check to see if it is the 28th of the month and only run if it is that day which would give you the once a month thing. 1
AyatollahPies Posted March 17, 2009 Posted March 17, 2009 If you set it as the shutdown script in AD then it will run on shutdown no matter where you shut it down from. You could use some conditionals in the file to check to see if it is the 28th of the month and only run if it is that day which would give you the once a month thing. Now that's an idea.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now