Microsoft KB Archive/254564

From BetaArchive Wiki

Running Windows 2000 Disk Defragmenter Requires Administrator Privileges

Q254564



The information in this article applies to:


  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Datacenter Server
  • Microsoft Windows 2000 Professional
  • Microsoft Windows 2000 Server





SUMMARY

Windows 2000 includes a Disk Defragmenter tool. Although any user can gain access to the Disk Defragmenter console, the ability to analyze or defragment a volume requires administrator privileges.



MORE INFORMATION

Disk Defragmenter was designed primarily for stand-alone workstations or servers whose users have the ability to log on locally with administrator privileges. Disk Defragmenter is not intended to be a tool for administrators to maintain networked workstations. This version is not designed to be run remotely and cannot be scheduled to automatically defragment a volume without interaction from a logged-on user. The only way a non-administrator can defragment a local volume is to run the Dfrg.msc console in the context of a user who has administrator privileges. You can accomplish this by running the following command:

runas /user:administrator@domain.company.com "mmc dfrg.msc"

The user is prompted for the administrator password. This command may be useful for an administrator who wants to run a defragmentation on a user's computer without forcing the user to log off.

You can also use the following procedure to schedule the Dfrg.msc console to run on a user's desktop in the context of the administrators account. This allows a normal user to manually defragment drives without performing any other unauthorized administrative tasks.


  1. From another networked computer in the domain, log on as a user who has administrator privileges.
  2. At a command prompt, type the following command

    at \\machine_name 5:00pm /interactive /every:f c:\winnt\system32\dfrg.msc

    where machine_name is the name of a normal user's computer.

You can adjust the command to fit your needs. The above example starts the defragmenter console on the user's computer with administrative rights every Friday at 5:00 P.M. so the user can manually select and start a defragmentation process.

Or, an administrator could build a batch file with separate lines for each workstation without using the /every switch, and then run the batch file manually whenever users should run a defragment operation.

Additional query words: defrag

Keywords : kbtool KBW2KHOME
Issue type : kbinfo
Technology : kbwin2000AdvServ kbwin2000AdvServSearch kbwin2000DataServ kbwin2000DataServSearch kbwin2000Serv kbwin2000ServSearch kbwin2000Search kbwin2000ProSearch kbwin2000Pro kbWinAdvServSearch kbWinDataServSearch


Last Reviewed: October 24, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.