Re: Group Policies?

Giganews Newsgroups
Subject: Re: Group Policies?
Posted by:  Manny Borges (manny_borg…
Date: Tue, 14 Mar 2006

There are several ways to do it.
One way:

For XP and 2003 systems:
The two key commands would be Defrag and AT .

I would make a batch file to run the dfrag and use a starup script in a to
add a secondary batch script with the AT string to add into your systems

Or you could simply set the schedule remotely for all your machines with a
single script..

Microsoft Windows XP [Version 5.1.2600]
Windows Disk Defragmenter
Copyright (c) 2001 Microsoft Corp. and Executive Software International,
defrag <volume> [-a] [-f] [-v] [-?]
  volume  drive letter or mount point (d: or d:\vol\mountpoint)
  -a      Analyze only
  -f      Force defragmentation even if free space is low
  -v      Verbose output
  -?      Display this help text

The AT command schedules commands and programs to run on a computer at
a specified time and date. The Schedule service must be running to use
the AT command.

AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]]
AT [\\computername] time [/INTERACTIVE]
    [ /EVERY:date[,...] | /NEXT:date[,...]] "command"

\\computername    Specifies a remote computer. Commands are scheduled on
local computer if this parameter is omitted.

id                Is an identification number assigned to a scheduled

/delete            Cancels a scheduled command. If id is omitted, all the
                  scheduled commands on the computer are canceled.

/yes              Used with cancel all jobs command when no further
                  confirmation is desired.

time              Specifies the time when command is to run.

/interactive      Allows the job to interact with the desktop of the user
                  who is logged on at the time the job runs.

/every:date[,...]  Runs the command on each specified day(s) of the week o
                  month. If date is omitted, the current day of the month
                  is assumed.

/next:date[,...]  Runs the specified command on the next occurrence of th
                  day (for example, next Thursday).  If date is omitted,
                  current day of the month is assumed.

"command"          Is the Windows NT command, or batch program to be run.

Manny Borges
MCSE NT4-2003 (+ Security)
MCT, Certified Cheese Master

There are 10 kinds of people in the world. Those who do understand binary
and those who don't.
"Lar" <L…> wrote in message
> How can I use GPOs to get all client PC defragged at night?
> Lar



In response to

Group Policies? posted by Lar on Tue, 14 Mar 2006