June 1, 200620 yr 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
June 1, 200620 yr Author I am aware of scheduled tasks =)...What I am not aware of is adding scheduled tasks to computers across a network (active directory)
June 2, 200620 yr 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.
August 23, 200620 yr 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...
August 23, 200620 yr If you install O&O Defrag(not sure where to get it right now) it has an automatic defrag of volumes.
August 23, 200620 yr 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.
August 23, 200620 yr 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.
August 23, 200620 yr 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
August 24, 200620 yr You do not need to create autodefragc.cmd it will be created by script.cmd on each computer. Other than that, it should work.
August 31, 200620 yr 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, 200620 yr by 1boredguy
September 7, 200619 yr 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
October 7, 200619 yr 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
Create an account or sign in to comment