• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Scripts and Group Policy

timbrigham

Junior Member
I?m trying to set up some method where I don?t have to go to every individual machine to defrag the hard drive, preferably using the windows defrag c: command. Is there an easy way to do this in group policy or the like, where I could have a script of my creation run over the network every Friday night?
 
I don't know about setting a specific time, but you can assign scripts in Group Policy for when Windows starts or shuts down, and for when users log on or log off.
 
Group policy is initiated by a logon/off action. So having a script in place in a GPO will do nothing for you in this case without some user intervention

You could use Windows Task scheduler to do this. Scheduled Tasks in XP. Now all you need to make sure is your users leave the PC on.
 
You might be able to create one scheduled task on a computer to do the defrag and then copy the task from the Scheduled Tasks folder to a file share. Then you could create a script that copies that from the file share in to the scheduled tasks and assign the script through Group Policy to run at logon, logoff, startup, or shutdown - whichever you prefer - for every computer in the domain.

I haven't tried copying scheduled tasks before, but it might work.
 
Originally posted by: dphantom
Group policy is initiated by a logon/off action. So having a script in place in a GPO will do nothing for you in this case without some user intervention

You could use Windows Task scheduler to do this. Scheduled Tasks in XP. Now all you need to make sure is your users leave the PC on.

You can also assign machine startup/shutdown scripts via group policy. These are not tied to logons or logoffs.

A scheduled task is probably your best bet tho. I don't know if there's an easy way to add that via GPO.
 
Originally posted by: NogginBoink
Originally posted by: dphantom
Group policy is initiated by a logon/off action. So having a script in place in a GPO will do nothing for you in this case without some user intervention

You could use Windows Task scheduler to do this. Scheduled Tasks in XP. Now all you need to make sure is your users leave the PC on.

You can also assign machine startup/shutdown scripts via group policy. These are not tied to logons or logoffs.

A scheduled task is probably your best bet tho. I don't know if there's an easy way to add that via GPO.

Correct, forgot to mention that. But I agree a scheduled task is probably best in this case.

Good catch.
 
How about writing a script that uses AT to schedule the disk defragmenter with task scheduler and than pushing that as a startup script with a GPO?

Anyway it seems a bit unneccisary to push out a script causing machine defrags; but you could do it if you really wanted.
 
Back
Top