Torgeir Bakken (MVP)
Guest
|
Posted:
Mon May 16, 2005 4:26 pm Post subject:
Re: Defrag |
|
|
Scott Micale wrote:
| Quote: | I have 2 questions about defraging a computer. Is there a way
to schedule a defrag of a computer using group policy and
Windows 2003 AD?
|
For the WinXP client computers, you could run Schtasks.exe in a
computer startup script (with a GPO) that runs as part of the boot
up process (before the user logs in). It runs under the system
context and has admin rights.
Use Schtasks.exe to put defrag.exe in a scheduled task running under
an account that have local administrator rights.
Schtasks.exe is a command line tool can create a scheduled task.
To avoid the job being recreated every time the computers reboot,
e.g. check for the .job file in the folder %windir%\Tasks\
| Quote: | Is it best practice to run a defrag in Safe Mode or does it matter
if I setup a schedule and have it run at night in normal made?
|
Running it under normal mode is fine...
--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx |
|