realized Posted June 1, 2006 Share Posted June 1, 2006 I would like to run a DEFRAG once a month on computers in an OU, is there an easy way to get this done? It would be at a time where nobody is around; I think it would then need to run as an elevated user.Any ideas would help Link to comment Share on other sites More sharing options...
EchoNoise Posted June 1, 2006 Share Posted June 1, 2006 there is a friend called scheduled tasks Link to comment Share on other sites More sharing options...
realized Posted June 1, 2006 Author Share Posted June 1, 2006 I am aware of scheduled tasks =)...What I am not aware of is adding scheduled tasks to computers across a network (active directory) Link to comment Share on other sites More sharing options...
allen2 Posted June 2, 2006 Share Posted June 2, 2006 Add the task via a gpo which will run a batch. This batch will use the at command to add the task on each computer. Link to comment Share on other sites More sharing options...
1boredguy Posted August 23, 2006 Share Posted August 23, 2006 Add the task via a gpo which will run a batch. This batch will use the at command to add the task on each computer.I was wondering if someone could please explain further... Link to comment Share on other sites More sharing options...
Code-E Posted August 23, 2006 Share Posted August 23, 2006 If you install O&O Defrag(not sure where to get it right now) it has an automatic defrag of volumes. Link to comment Share on other sites More sharing options...
chilifrei64 Posted August 23, 2006 Share Posted August 23, 2006 Here is what I do on all my computers, work and home..http://lazynetworkadmin.com/content/view/6/6/as far as putting it out to a whole OU. I dont h ave a way of doing it yet.. Ill see what I can come up with. Link to comment Share on other sites More sharing options...
allen2 Posted August 23, 2006 Share Posted August 23, 2006 Basically create a new gpo, in machine configuration, windows parameters, scripts, startup, and it's there that you'll put the batch script.This batch script must create the scripts needed to run the defrag and then add the task with the at command for example.Example for batchs that will create a batch file and then add the scheduled task:echo defrag c: /f >%systemroot%\autodefragc.cmdat 01:00 /every:01 %systemroot%\autodefragc.cmd This should work. Anyway i've never tried this, but this is the way i'll do things. Link to comment Share on other sites More sharing options...
1boredguy Posted August 23, 2006 Share Posted August 23, 2006 Basically create a new gpo, in machine configuration, windows parameters, scripts, startup, and it's there that you'll put the batch script.This batch script must create the scripts needed to run the defrag and then add the task with the at command for example.Example for batchs that will create a batch file and then add the scheduled task:echo defrag c: /f >%systemroot%\autodefragc.cmdat 01:00 /every:01 %systemroot%\autodefragc.cmd This should work. Anyway i've never tried this, but this is the way i'll do things.OK. I kinda get the idea. I've attached a screen shot from an XP virtual machine (I will really be using it for Win2k server). Am I going in the right direction?Thanks Link to comment Share on other sites More sharing options...
allen2 Posted August 24, 2006 Share Posted August 24, 2006 You do not need to create autodefragc.cmd it will be created by script.cmd on each computer. Other than that, it should work. Link to comment Share on other sites More sharing options...
1boredguy Posted August 31, 2006 Share Posted August 31, 2006 (edited) You do not need to create autodefragc.cmd it will be created by script.cmd on each computer. Other than that, it should work.OK. I've done what you've said, and I've attached a picture of what I've got. I set it on my Win2000 Active Directory Server. I set the script in "gpedit.msc > Local Computer Policy > Computer Configuration > Windows Settings > Scripts (Startup/Shutdown)" But it doesn't go out to the whole network. There is a command to define a single remote computer...\\computername Specifies a remote computer. Commands are scheduled on the local computer if this parameter is omitted.So... The AT command is only setting the script to run on the local computer. I would like to schedule this for every computer in our network:at 1:30 /every:Su %systemroot%\autodefragc.cmd Edited August 31, 2006 by 1boredguy Link to comment Share on other sites More sharing options...
1boredguy Posted September 7, 2006 Share Posted September 7, 2006 Since this is a log-on/log-off type of script, dozens of scheduled tasks will be created each week on each workstation. Will multiple+identical scheduled tasks cause any problems??Thanks Link to comment Share on other sites More sharing options...
Bad boy Warrior Posted October 7, 2006 Share Posted October 7, 2006 Im a bit lost here but where did autodefragc.cmd come from or what is it doing?thxP.S in answer to your question i dont think you will have a huge problem adding many task to log on/off. Only thing im aware it may slow down there log on/off depending on the tasks at hand Link to comment Share on other sites More sharing options...
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