Tải bản đầy đủ (.pdf) (132 trang)

Microsoft windows xp professional exam 70 - 270 phần 5 docx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (991.39 KB, 132 trang )

10-41
F10us18
Figure 10-18 Use the Quota tab of the Properties dialog box for a disk to set disk quotas for users.
To enforce identical quota limits for all users, follow these steps:
1. In Windows Explorer, right-click the volume on which you want to set disk quo-
tas, and then click Properties.
Windows opens the Properties dialog box for the volume.
2. Click the Quota tab.
3. Select the Enable Quota Management check box.
4. Select the Deny Disk Space To Users Exceeding Quota Limit check box.
Windows XP Professional will monitor usage and will not allow users to create
files or folders on the volume when they exceed the limit.
Log Event When A User
Exceeds Their Quota Limit
Select this option if you want Windows XP Professional to log
an event in the Security log every time a user exceeds his or her
quota limit.
Log Event When A User
Exceeds Their Warning Level
Select this option if you want Windows XP Professional to log
an event in the Security log every time a user exceeds the warn-
ing level.
Quota Entries Click this button to open the Quota Entries For window, in
which you can add a new entry, delete an entry, and view the
per-user quota information.
Table 10-3 Quota Tab Options
Option Description
Lesson 3 Managing Disk Quotas
10-42 Chapter 10 Managing Data Storage
5. Click Limit Disk Space To. In the Limit Disk Space To text box and in the Set Warn-
ing Level To text box, enter the values for the limit and warning levels that you


want to set.
6. Click OK.
To enforce different quota limits for one or more specific users, use these steps:
1. In Windows Explorer, right-click the volume on which you want to set disk quo-
tas, and then click Properties.
Windows opens the Properties dialog box for the volume.
2. Click the Quota tab.
3. Select the Enable Quota Management check box.
4. Select the Deny Disk Space To Users Exceeding Quota Limit check box.
5. Click Quota Entries.
6. In the Quota Entries For window shown in Figure 10-19, click the Quota menu,
and then click New Quota Entry.
F10us19
Figure 10-19 Use the Quota Entries For dialog box to enter quotas for specific users.
7. In the Select Users dialog box, type the name of the user for which you want to
set a quota, and then click OK. (You can also click Advanced to search for a user.)
8. In the Add New Quota Entry dialog box shown in Figure 10-20, click Limit Disk
Space To, enter the limit and warning levels, and then click OK.
F10us20
Figure 10-20 Use the Add New Quota Entry dialog box to specify limits for a user.
10-43
How to Determine the Status of Disk Quotas
You can determine the status of disk quotas in the Properties dialog box for a disk by
checking status message to the right of the traffic light icon (refer to Figure 10-18). The
color shown on the traffic light icon indicates the status of disk quotas as follows:
■ A red traffic light indicates that disk quotas are disabled.
■ A yellow traffic light indicates that Windows XP Professional is rebuilding disk
quota information.
■ A green traffic light indicates that the disk quota system is active.
How to Monitor Disk Quotas

You use the Quota Entries For dialog box (refer to Figure 10-19) to monitor usage for
all users who have copied, saved, or taken ownership of files and folders on the vol-
ume. Windows XP Professional scans the volume and monitors the amount of disk
space in use by each user. Use the Quota Entries For dialog box to view the following:
■ The amount of hard disk space that each user uses
■ Users who are over their quota warning threshold, signified by a yellow triangle
■ Users who are over their quota limit, signified by a red circle
■ The warning threshold and the disk quota limit for each user
Guidelines for Using Disk Quotas
Use the following guidelines for using disk quotas:
■ If you enable disk quota settings on the volume where Windows XP Professional
is installed, and your user account has a disk quota limit, log on as Administrator
to install additional Windows XP Professional components and applications. In
this way, Windows XP Professional will not charge the disk space that you use to
install applications against the disk quota allowance for your user account.
■ You can monitor hard disk usage and generate hard disk usage information with-
out preventing users from saving data. To do so, clear the Deny Disk Space To
Users Exceeding Quota Limit check box when you enable disk quotas.
■ Set more-restrictive default limits for all user accounts, and then modify the limits
to allow more disk space to users who work with large files.
■ If multiple users share computers running Windows XP Professional, set disk
quota limits on computer volumes so that disk space is shared by all users who
share the computer.
Lesson 3 Managing Disk Quotas
10-44 Chapter 10 Managing Data Storage
■ Generally, you should set disk quotas on shared volumes to limit storage for users.
Set disk quotas on public folders and network servers to ensure that users share
hard disk space appropriately. When storage resources are scarce, you might want
to set disk quotas on all shared hard disk space.
■ Delete disk quota entries for users who no longer store files on a volume. You can

delete quota entries for a user account only after all files that the user owns have
been removed from the volume or after another user has taken ownership of the
files.
Practice: Managing Disk Quotas
In this practice, you configure default quota management settings to limit the amount
of data users can store on drive C (their hard disk drive). Next, you configure a custom
quota setting for a user account. You increase the amount of data the user can store on
drive C to 10 MB with a warning level set to 6 MB. Finally, you turn off quota manage-
ment for drive C.
Note If you did not install Windows XP Professional on drive C, substitute the NTFS parti-
tion on which you did install Windows XP Professional whenever drive C is referred to in the
practice.
Exercise 1: Configure Quota Management Settings
In this exercise, you configure the quota management settings for drive C to limit the
data that users can store on the volume. You then configure custom quota settings for
a user account.
 To configure default quota management settings
1. Log on with an account that is a member of the Administrators group.
2. Use the User Accounts tool in Control Panel to create a user account named User5
and assign it a Limited account type.
3. In Windows Explorer, right-click the drive C icon, and then click Properties.
Windows XP Professional displays the Local Disk (C:) Properties dialog box with
the General tab active.
4. Click the Quota tab.
Notice that disk quotas are disabled by default.
5. In the Quota tab, select the Enable Quota Management check box.
Notice that by default, the Do Not Limit Disk Usage option is selected.
!
10-45
6. Click Limit Disk Usage To.

7. What is the default disk space limit for new users?
8. Click Do Not Limit Disk Usage.
If you want to place the same quota limit on all users of this computer, you use the
Limit Disk Usage To option.
9. Select the Deny Disk Space To Users Exceeding Quota Limit check box.
10. Select the Log Event When A User Exceeds Their Quota Limit and Log Event When
A User Exceeds Their Warning Limit check boxes, and then click Apply.
Windows XP Professional displays the Disk Quota dialog box, telling you that you
should enable the quota system only if you will use quotas on this disk volume
and warning you that the volume will be rescanned to update disk usage statistics
if you enable quotas.
11. Click OK to enable disk quotas.
12. What happens to the quota status indicator?
 To configure quota management settings for a user
1. In the Quota tab of the Local Disk (C:) Properties dialog box, click Quota Entries.
Windows XP Professional displays the Quota Entries For Local Disk (C:) dialog
box.
2. Are any user accounts listed? Why or why not?
3. On the Quota menu, click New Quota Entry.
Windows XP Professional displays the Select Users dialog box.
4. In the Name text box, type User5, and then click OK.
Windows XP Professional displays the Add New Quota Entry dialog box.
5. Click Limit Disk Space To. What are the default settings for the user you just set a
quota limit for?
Lesson 3 Managing Disk Quotas
10-46 Chapter 10 Managing Data Storage
6. Increase the amount of data that the user can store on drive C by changing the
Limit Disk Space To setting to 10 MB and the Set Warning Level To setting to 6 MB.
7. Click OK to return to the Quota Entries For Local Disk (C:) window.
8. Close the Quota Entries For Local Disk (C:) window.

9. Click OK to close the Local Disk (C:) Properties dialog box.
10. Log off.
11. Log on as User5.
12. Start Windows Explorer and create a User5 folder on drive C.
13. Insert the CD-ROM you used to install Windows XP Professional into your CD-
ROM drive.
14. If a dialog box appears as a result of inserting the CD-ROM, close it.
15. Copy the i386 folder from your CD-ROM to the User5 folder.
Windows XP Professional begins copying files from the i386 folder on the CD-
ROM to a new i386 folder in the User5 folder on drive C. After copying some files,
Windows XP Professional displays the Error Copying File Or Folder dialog box,
indicating that there is not enough room on the disk.
16. Why did you get this error message?
17. Click OK to close the dialog box.
18. Right-click the User5 folder, and then click Properties.
Notice that the Size On Disk value is slightly less than your quota limit of 10 MB.
19. Delete the User5 folder.
20. Close all open windows and log off.
Exercise 2: Disable Quota Management
1. Log on with an account that is a member of the Administrators group.
2. Start Windows Explorer.
3. Right-click the drive C icon, and then click Properties.
Windows XP Professional displays the Local Disk (C:) Properties dialog box with
the General tab active.
4. Click the Quota tab.
10-47
5. In the Quota tab, clear the Enable Quota Management check box.
All quota settings for drive C are no longer available.
6. Click Apply.
Windows XP Professional displays the Disk Quota dialog box, warning you that if

you disable quotas, the volume will be rescanned if you enable them later.
7. Click OK to close the Disk Quota dialog box.
8. Click OK to close the Local Disk (C:) Properties dialog box.
9. Close all windows and log off Windows XP Professional.
Lesson Review
Use the following questions to help determine whether you have learned enough to
move on to the next lesson. If you have difficulty answering these questions, review
the material in this lesson before beginning the next lesson. You can find answers to
these questions in the “Questions and Answers” section at the end of this chapter.
1. What is the purpose of disk quotas?
2. Which of the following statements about disk quotas in Windows XP Professional
is correct? (Choose the correct answer.)
a. Disk quotas track and control disk usage on a per-user, per-disk basis.
b. Disk quotas track and control disk usage on a per-group, per-volume basis.
c. Disk quotas track and control disk usage on a per-user, per-volume basis.
d. Disk quotas track and control disk usage on a per-group, per-disk basis.
3. Which of the following statements about disk quotas in Windows XP Professional
is correct? (Choose all that apply.)
a. Disk quotas can be applied only to Windows XP Professional NTFS volumes.
b. Disk quotas can be applied to any Windows XP Professional volume.
c. You must be logged on with the Administrator user account to configure
default quota management settings.
d. Members of the Administrators and Power Users groups can configure quota
management settings.
Lesson 3 Managing Disk Quotas
10-48 Chapter 10 Managing Data Storage
4. You get a call from an administrator who cannot delete a quota entry for a user
account. What would you tell the administrator to check?
Lesson Summary
■ Use Windows XP Professional disk quotas to allocate disk space usage to users.

Windows XP Professional disk quotas track and control disk usage on a per-user,
per-volume basis. You can set disk quotas, quota thresholds, and quota limits for
all users and for individual users. You can apply disk quotas only to Windows XP
Professional NTFS volumes.
■ You can set identical quotas for all users or you can configure different quotas for
individual users.
■ You can determine the basic status of the quota management system by looking at
the traffic light indicator and the status text display on the Quota tab of a volume’s
Properties dialog box.
■ You can monitor disk quotas by using the Quota Entries For dialog box, which
you access by clicking Quota Entries on the Quota tab of a volume’s Properties
dialog box.
■ There are a number of guidelines you should follow when using disk quotas. The
most important guideline is that installing applications can use up disk quotas rap-
idly, so you should log on as an administrator without quota limits to install appli-
cations.
10-49
Lesson 4: Increasing Security by Using EFS
Encryption is the process of making information indecipherable to protect it from unau-
thorized viewing or use. A key is required to decode the information. The Encrypting
File System (EFS) provides encryption for data in NTFS files stored on disk. This encryp-
tion is public key–based and runs as an integrated system service, making it easy to man-
age, difficult to attack, and transparent to the file owner. If a user who attempts to access
an encrypted NTFS file has the private key to that file (which is assigned when the user
logs on), the file can be decrypted so that the user can open the file and work with it
transparently as a normal document. A user without the private key is denied access.
Windows XP Professional also includes the Cipher command, which provides the
capability to encrypt and decrypt files and folders from a command prompt. Windows
XP Professional also provides a recovery agent, a specially designated user account
that can still recover encrypted files if the owner loses the private key.

After this lesson, you will be able to
■ Describe EFS.
■ Encrypt folders and files.
■ Decrypt folders and files.
■ Control encryption from the command line by using the Cipher command.
■ Create an EFS recovery agent.
Estimated lesson time: 40 minutes
Overview of EFS
EFS allows users to encrypt NTFS files by using a strong public key–based crypto-
graphic scheme that encrypts all files in a folder. Users with roaming profiles can use
the same key with trusted remote systems. No administrative effort is needed to begin,
and most operations are transparent. Backups and copies of encrypted files are also
encrypted if they are in NTFS volumes. Files remain encrypted if you move or rename
them, and temporary files created during editing and left unencrypted in the paging file
or in a temporary file do not defeat encryption.
You can set policies to recover EFS-encrypted data when necessary. The recovery pol-
icy is integrated with overall Windows XP Professional security policy (see Chapter 16,
“Configuring Security Settings and Internet Options,” for more on security policy). Con-
trol of this policy can be delegated to individuals with recovery authority, and different
recovery policies can be configured for different parts of the enterprise. Data recovery
discloses only the recovered data, not the key that was used to encrypt the file. Several
protections ensure that data recovery is possible and that no data is lost in the case of
total system failure.
Lesson 4 Increasing Security by Using EFS
10-50 Chapter 10 Managing Data Storage
EFS is configured either from Windows Explorer or from the command line. It can be
enabled or disabled for a computer, domain, or organizational unit (OU) by resetting
recovery policy in the Group Policy console in Microsoft Management Console (MMC).
You can use EFS to encrypt and decrypt files on remote file servers but not to encrypt
data that is transferred over the network. Windows XP Professional provides network

protocols, such as Secure Sockets Layer (SSL) authentication, to encrypt data over the
network.
Table 10-4 lists the key features provided by Windows XP Professional EFS.
Security Alert Even when you encrypt files, an intruder who accesses your computer can
access those files if your user account is still logged on to the computer. Be sure to lock your
console when you are not using the computer, or configure a screensaver to require a pass-
word when the computer is activated. If the computer is configured to go to standby mode
when it is idle, you should require a password to bring the computer out of standby. These
precautions are particularly important on portable computers, which people are more likely to
leave unattended while the user is logged on.
Table 10-4
EFS Features
Feature Description
Transparent encryption In EFS, file encryption does not require the file owner to decrypt and
re-encrypt the file on each use. Decryption and encryption happen
transparently on file reads and writes to disk.
Strong protection of
encryption keys
Public key encryption resists all but the most sophisticated methods of
attack. Therefore, in EFS, the file encryption keys are encrypted by
using a public key from the user’s certificate. (Note that Windows XP
Professional and Windows 2000 use X.509 v3 certificates.) The list of
encrypted file encryption keys is stored with the encrypted file and is
unique to it. To decrypt the file encryption keys, the file owner sup-
plies a private key, which only he or she has.
Integral data-recovery
system
If the owner’s private key is unavailable, the recovery agent can open
the file using his or her own private key. There can be more than one
recovery agent, each with a different public key, but at least one pub-

lic recovery key must be present on the system to encrypt a file.
Secure temporary and
paging files
Many applications create temporary files while you edit a document,
and these temporary files can be left unencrypted on the disk. On
computers running Windows XP Professional, EFS can be imple-
mented at the folder level, so any temporary copies of an encrypted
file are also encrypted, provided that all files are on NTFS volumes.
EFS resides in the Windows operating system kernel and uses the
nonpaged pool to store file encryption keys, ensuring that they are
never copied to the paging file.
10-51
How to Encrypt a Folder
The recommended method to encrypt files is to create an encrypted folder and place
files in that folder. To encrypt a folder, use these steps:
1. In Windows Explorer, right-click the folder and click Properties.
2. In the Properties dialog box for the folder, on the General tab, click Advanced.
3. In the Advanced Attributes dialog box (refer to Figure 10-14), select the Encrypt
Contents To Secure Data check box, and then click OK.
4. Click OK to close the Properties dialog box for the folder.
The folder is now marked for encryption, and all files placed in the folder are
encrypted. Folders that are marked for encryption are not actually encrypted; only the
files within the folder are encrypted.
Exam Tip Compressed files cannot be encrypted, and encrypted files cannot be com-
pressed with NTFS compression.
After you encrypt the folder, when you save a file in that folder, the file is encrypted
using file encryption keys, which are fast symmetric keys designed for bulk encryption.
The file is encrypted in blocks, with a different file encryption key for each block. All
the file encryption keys are stored and encrypted in the Data Decryption field (DDF)
and the Data Recovery field (DRF) in the file header.

Caution If an administrator removes the password on a user account, the user account will
lose all EFS-encrypted files, personal certificates, and stored passwords for Web sites or net-
work resources. Each user should make a password reset disk to avoid this situation. To cre-
ate a password floppy disk, open User Accounts and, under Related Tasks, click Prevent A
Forgotten Password. The Forgotten Password Wizard steps you through creating the password
reset disk.
How to Decrypt a Folder
Decrypting a folder or file refers to clearing the Encrypt Contents To Secure Data check
box in a folder’s or file’s Advanced Attributes dialog box, which you access from the
folder’s or file’s Properties dialog box. Once decrypted, the file remains decrypted until
you select the Encrypt Contents To Secure Data check box. The only reason you might
want to decrypt a file is if other people need access to the folder or file—for example,
if you want to share the folder or make the file available across the network.
!
Lesson 4 Increasing Security by Using EFS
10-52 Chapter 10 Managing Data Storage
How to Control Encryption From the Command Line by Using the Cipher
Command
The Cipher command provides the capability to encrypt and decrypt files and folders
from a command prompt. The following example shows the available switches for the
Cipher command, which are described in Table 10-5:
cipher [/e | /d] [/s:folder_name] [/a] [/i] [/f] [/q] [/h] [/k] [file_name [ ]]
If you run the Cipher command without parameters, it displays the encryption state of
the current folder and any files that it contains. You can specify multiple file names and
use wildcards. You must put spaces between multiple parameters.
How to Create an EFS Recovery Agent
If you lose your file encryption certificate and associated private key through disk fail-
ure or for any other reason, a user account designated as the recovery agent can open
the file using his or her own certificate and associated private key. If the recovery agent
is on another computer in the network, send the file to the recovery agent.

Table 10-5 Cipher Command Switches
Switch Description
/e Encrypts the specified folders. Folders are marked so any files that are added later
are encrypted.
/d Decrypts the specified folders. Folders are marked so any files that are added later
are not encrypted.
/s Performs the specified operation on files in the given folder and all subfolders.
/a Performs the specified operation on files as well as folders. Encrypted files could
be decrypted when modified if the parent folder is not encrypted. Encrypt the file
and the parent folder to avoid problems.
/i Continues performing the specified operation even after errors have occurred. By
default, Cipher stops when an error is encountered.
/f Forces the encryption operation on all specified files, even those that are already
encrypted. Files that are already encrypted are skipped by default.
/q Reports only the most essential information.
/h Displays files with the hidden or system attributes, which are not shown by
default.
/k Creates a new file encryption key for the user running the Cipher command. Using
this option causes the Cipher command to ignore all other options.
file_name Specifies a pattern, file, or folder.
10-53
Security Alert The recovery agent can bring his or her private key to the owner’s computer,
but it is never a good security practice to copy a private key onto another computer.
It is a good security practice to rotate recovery agents. However, if the agent designa-
tion changes, access to the file is denied. For this reason, you should keep recovery
certificates and private keys until all files that are encrypted with them have been
updated.
The person designated as the recovery agent has a special certificate and associated
private key that allow data recovery. To recover an encrypted file, the recovery agent
does the following:

■ Uses Backup or another backup tool to restore a user’s backup version of the
encrypted file or folder to the computer where his or her file recovery certificate
is located.
■ In Windows Explorer, opens the Properties dialog box for the file or folder, and in
the General tab, clicks Advanced.
■ Clears the Encrypt Contents To Secure Data check box.
■ Makes a backup version of the decrypted file or folder and returns the backup ver-
sion to the user.
Practice: Increasing Security by Using EFS
In this practice, you log on as an administrator and encrypt a folder and its files. You
then log on using a different user account, and attempt to open an encrypted file and
disable encryption on the encrypted file.
1. In Windows Explorer, create a folder named Secret on the C drive.
2. In the Secret folder, create a text file named SecretFile.txt.
3. Right-click the Secret folder, and then click Properties.
Windows XP Professional displays the Secret Properties dialog box with the Gen-
eral tab active.
4. Click Advanced.
The Advanced Attributes dialog box appears.
5. Select the Encrypt Contents To Secure Data check box, and then click OK.
6. Click OK to close the Secret Properties dialog box.
The Confirm Attribute Change dialog box informs you that you are about to
encrypt a folder. You have two choices: You can encrypt only this folder, or you
can encrypt the folder and all subfolders and files in the folder.
Lesson 4 Increasing Security by Using EFS
10-54 Chapter 10 Managing Data Storage
7. Select the Apply Changes To This Folder, Subfolders And Files option, and then
click OK.
8. Open the Secret folder.
9. What color is the SecretFile.txt text file? Why?

10. In the Secret folder, right-click the SecretFile.txt text file, and then click Properties.
The SecretFile.txt Properties dialog box appears.
11. Click Advanced.
The Advanced Attributes dialog box appears. Notice that the Encrypt Contents To
Secure Data check box is selected.
12. Close the Advanced Attributes dialog box.
13. Close the Properties dialog box.
14. Close all windows and log off.
15. Log on as User5.
16. In Windows Explorer, locate and open the SecretFile.txt text file.
17. What happens?
18. Close Notepad.
19. Right-click the SecretFile.txt text file, and then click Properties.
20. Click Advanced.
21. Clear the Encrypt Contents To Secure Data check box, and then click OK.
22. Click OK to close the SecretFile.txt Properties dialog box.
The Error Applying Attributes dialog box appears and informs you that access to
the file is denied.
23. Click Cancel.
24. Close all open windows and dialog boxes.
25. Log off.
Lesson Review
Use the following questions to help determine whether you have learned enough to
move on to the next lesson. If you have difficulty answering these questions, review
10-55
the material in this lesson before beginning the next lesson. You can find answers to
these questions in the “Questions and Answers” section at the end of this chapter.
1. What is encryption and what is the EFS?
2. Which of the following files and folders does Windows XP Professional allow you
to encrypt? (Choose all that apply.)

a. A file on an NTFS volume
b. A folder on a FAT volume
c. A file stored on a floppy
d. A folder on an NTFS volume
3. How do you encrypt a folder? Is the folder actually encrypted?
4. If the private key belonging to the owner of an encrypted file is not available, how
can you decrypt the file?
5. By default, the recovery agent for a computer running Windows XP Professional
in a workgroup is ____________, and the recovery agent for a computer running
Windows XP Professional in a domain environment is _____________________.
Lesson Summary
■ EFS allows users to encrypt files and folder on an NTFS volume by using a strong
public key–based cryptographic scheme that encrypts all files in a folder. Backups
and copies of encrypted files are also encrypted if they are in NTFS volumes. Files
remain encrypted if you move or rename them, and encryption is not defeated by
leakage to paging files.
Lesson 4 Increasing Security by Using EFS
10-56 Chapter 10 Managing Data Storage
■ To encrypt a folder, select the Encrypt Contents To Secure Data check box in the
Advanced Attributes dialog box, which you can access by clicking Advanced on
the General tab of the folder’s Properties dialog box.
■ To decrypt a folder, clear the Encrypt Contents To Secure Data check box in the
Advanced Attributes dialog box.
■ You can control file and folder encryption from the command line using the
Cipher command.
■ Windows XP Professional also provides a recovery agent. If an owner loses the
private key, the recovery agent can still recover the encrypted file.
10-57
Lesson 5: Maintaining Disks with Disk Defragmenter,
Check Disk, and Disk Cleanup

Windows XP Professional saves files and folders in the first available space on a hard
disk and not necessarily in an area of contiguous space. The parts of the files and fold-
ers are scattered over the hard disk rather than being in a contiguous area. This scat-
tering of files and folders across a hard disk is known as fragmentation. When your
hard disk contains numerous fragmented files and folders, your computer takes longer
to access them because it requires several additional disk reads to collect the various
pieces. Creating new files and folders also takes longer because the available free
space on the hard disk is scattered. Your computer must save a new file or folder in
various locations on the hard disk.
Temporary files, Internet cache files, and unnecessary programs also take up space on
your computer’s hard drive. Sometimes there are file system errors, and sometimes sec-
tors on your hard disk go bad, which can cause you to lose data that you have stored
on your hard disk. This lesson introduces three Windows XP Professional tools—Disk
Defragmenter, Check Disk, and Disk Cleanup—that help you organize your hard
disks, recover readable information from damaged areas on your hard disk, and clean
up any temporary files and unnecessary programs taking up space on your hard drive.
After this lesson, you will be able to
■ Use Disk Defragmenter to organize your hard disks
■ Use Check Disk to search for and repair file system errors and to recover readable infor-
mation from bad sectors
■ Use Disk Cleanup to remove unnecessary files from your hard disks
Estimated lesson time: 60 minutes
How to Analyze and Defragment Disks with Disk Defragmenter
The process of finding and consolidating fragmented files and folders is called defrag-
menting. Disk Defragmenter locates fragmented files and folders, and then defrag-
ments them by moving the pieces of each file or folder to one location so that each
occupies a single contiguous space on the hard disk. Consequently, your system can
access and save files and folders more efficiently. By consolidating files and folders,
Disk Defragmenter also consolidates free space, making it less likely that new files will
be fragmented. Disk Defragmenter can defragment FAT, FAT32, and NTFS volumes.

You access Disk Defragmenter by selecting Start, pointing to All Programs, pointing to
Accessories, pointing to System Tools, and then clicking Disk Defragmenter. The Disk
Defragmenter dialog box is split into three areas, as shown in Figure 10-21.
Lesson 5 Maintaining Disks with Disk Defragmenter, Check Disk, and Disk Cleanup
10-58 Chapter 10 Managing Data Storage
F10us21
Figure 10-21 Use Disk Defragmenter to defragment a volume.
The upper portion of the dialog box lists the volumes that you can analyze and defrag-
ment. The middle portion provides a graphic representation of how fragmented the
selected volume is. The lower portion provides a dynamic representation of the vol-
ume that continuously updates during defragmentation. The display colors indicate the
condition of the volume as follows:
■ Red indicates fragmented files.
■ Blue indicates contiguous (nonfragmented) files.
■ Green indicates system files, which Disk Defragmenter cannot move.
■ White indicates free space on the volume.
By comparing the Analysis Display band to the Defragmentation Display band during
and after defragmentation, you can easily see the improvement in the volume.
You can also open Disk Defragmenter by selecting a drive you want to defragment in
Windows Explorer or My Computer. On the File menu, click Properties, click the Tools
tab, and click Defragment Now. Then select one of the options described in Table 10-6.
Table 10-6 Disk Defragmenter Options
Option Description
Analyze Click this button to analyze the disk for fragmentation. After the analysis, the
Analysis Display band provides a graphic representation of how fragmented the
volume is.
Defragment Click this button to defragment the disk. Defragmenting automatically performs
an analysis. After defragmentation, the Defragmentation Display band provides a
graphic representation of the defragmented volume. Additionally, you can view
a report showing files that could not be defragmented.

10-59
Figure 10-22 shows the Disk Defragmenter dialog box after you have analyzed the C
drive. Windows XP Professional displays another Disk Defragmenter dialog box, indi-
cating that you need to defragment the volume. You can view a report that shows more
details about the fragmentation on your volume, close the dialog box and run the
defragmenter at a later time, or defragment the volume now.
F10us22
Figure 10-22 Use the Disk Defragmenter window to analyze the fragmentation on a volume.
If there is not enough fragmentation to require you to defragment the volume, Win-
dows XP Professional displays a Disk Defragmenter dialog box, indicating that there is
no need to defragment the volume at this time.
The following list provides some recommended guidelines for using Disk Defrag-
menter:
■ Run Disk Defragmenter when the computer will receive the least usage. During
defragmentation, data is moved around on the hard disk, and that process is
microprocessor-intensive. The defragmentation process will adversely affect
access time to other disk-based resources.
■ Educate users to defragment their local hard disks at least once a month to prevent
accumulation of fragmented files.
■ Analyze the target volume before you install large applications and defragment the
volume if necessary. Installations complete more quickly when the target media
has adequate contiguous free space. Additionally, accessing the application after
installation is faster.
■ When you delete a large number of files or folders, your hard disk might become
excessively fragmented, so be sure that you analyze it afterward. Generally, you
should defragment hard disks on busy file servers more often than those on sin-
gle-user client computers.
Lesson 5 Maintaining Disks with Disk Defragmenter, Check Disk, and Disk Cleanup
10-60 Chapter 10 Managing Data Storage
Real World When to Defragment

Windows XP actually uses volumes formatted with NTFS pretty efficiently, so the
need to routinely defragment a disk is not as great as it used to be. In fact, several
recent tests have shown that there is not really a significant improvement in com-
puter performance after defragmenting even a very fragmented drive. Nonethe-
less, defragmentation is a quick safe process that, simply put, just makes users
feel better. Consider defragmenting drives two or three times per year. Better yet,
show users how to do it themselves. You can also use Scheduled Tasks to sched-
ule Disk Defragmenter to run automatically. Just configure a task to run at the
desired times and launch the defrag.exe program located in the %system-
root%\system32 folder. After scheduling the task, open the advanced properties
for the task and add the drive you want to defragment to the command line. An
example command line would look something like %System-
Root%\System32\Defrag.exe d. For more information on using Scheduled Tasks,
see Chapter 18, “Using Windows XP Tools.”
How to Scan a Hard Disk for Errors with Check Disk
Check Disk attempts to repair file system errors, locate bad sectors, and recover read-
able information from those bad sectors. All files must be closed for this program to
run. To access Check Disk, select the drive you want to check in Windows Explorer or
My Computer. Click the File menu, click Properties, click the Tools tab, and click Check
Now. Select one of the options on the Check Disk dialog box shown in Figure 10-23.
The options are explained in Table 10-7.
F10us23
Figure 10-23 Use Check Disk to analyze and fix the file structure on a volume.
10-61
Note Check Disk runs in five phases: file verification, index verification, security descriptor
verification, file data verification, and free space verification.
You can also use the command-line version of Check Disk. The command-line syntax
for Chkdsk is as follows:
Chkdsk [volume[[path]filename]]] [/f] [/v] [/r] [/x] [/i] [/c] [/l[:size]]
The switches used by Chkdsk are explained in Table 10-8.

Table 10-7 Check Disk Options
Check box Description
Automatically Fix File
System Errors
Select this check box to have Windows XP Professional attempt to
repair file system errors found during disk checking. All files must
be closed for this program to run. If the drive is currently in use, a
message asks if you want to reschedule the disk-checking for the
next time you restart your computer. Your drive is not available to
run other tasks while the disk is being checked.
Scan For And Attempt
Recovery Of Bad Sectors
Select this check box to have Windows XP Professional attempt to
repair file system errors found during disk checking, locate bad sec-
tors, and recover any readable information located in those bad
sectors. All files must be closed for this program to run. If the drive
is currently in use, a message asks if you want to reschedule the
disk-checking for the next time you restart your computer. Your
drive is not available to run other tasks while the disk is being
checked. If you select this check box, you do not need to select
Automatically Fix File System Errors because Windows XP Profes-
sional attempts to fix any errors on the disk.
Lesson 5 Maintaining Disks with Disk Defragmenter, Check Disk, and Disk Cleanup
10-62 Chapter 10 Managing Data Storage
Used without parameters, Chkdsk displays the status of the disk in the current volume.
How to Free Up Disk Space with Disk Cleanup
You can use Disk Cleanup to free up disk space by deleting temporary files and unin-
stalling programs. Disk Cleanup lists the temporary files, Internet cache files, and
unnecessary programs that you can safely delete. To access Disk Cleanup, select the
drive you want to check in Windows Explorer or My Computer. On the File menu,

click Properties, and in the General tab, click Disk Cleanup. The Disk Cleanup dialog
box is shown in Figure 10-24, and its options are explained in Table 10-9.
Table 10-8 Chkdsk Switches
Switch Description
filename Specifies the file or set of files to check for fragmentation. You can use the wild-
cards * and ?. This switch is valid only on volumes formatted with FAT12, FAT16,
and FAT32 file systems.
path Specifies the location of a file or set of files within the folder structure of the vol-
ume. This switch is valid only on volumes formatted with FAT12, FAT16, and FAT32
file systems.
size Changes the log file size. You must use the /l switch with this switch. This switch is
valid only on volumes formatted with NTFS.
volume Specifies the drive letter (followed by a colon), mount point, or volume name. This
switch is valid only on volumes formatted with FAT12, FAT16, and FAT32 file sys-
tems.
/c Skips the checking of cycles within the folder structure. This switch is valid only on
volumes formatted with NTFS.
/f Fixes errors on the volume. If Chkdsk cannot lock the volume, you are prompted
to have Chkdsk check it the next time the computer starts.
/i Performs a less-vigorous check of index entries. This switch is valid only on vol-
umes formatted with NTFS.
/l Displays the current size of the log file. This switch is valid only on volumes for-
matted with NTFS.
/r Locates bad sectors and recovers readable information. If Chkdsk cannot lock the
volume, you are prompted to have Chkdsk check it the next time the computer
starts.
/v On volumes formatted with FAT12, FAT16, or FAT32, displays the full path and
name of every file on the volume. On volumes formatted with NTFS, displays any
cleanup messages.
/s Forces the volume to dismount first, if necessary.

/? Displays this list of switches.
10-63
F10us24
Figure 10-24 Use Disk Cleanup to remove unnecessary files from a volume.
Table 10-9 Disk Cleanup Deletion Options
Check box Description
Downloaded
Program Files
Select this check box to have Windows XP Professional delete the
ActiveX controls and Java applets that have been downloaded automati-
cally from the Internet when users viewed certain pages.
These files are temporarily stored in the Downloaded Program Files
folder on the computer’s hard disk.
Temporary
Internet Files
Select this check box to have Windows XP Professional delete the files in
the Temporary Internet Files folder on the computer’s hard drive.
These files are Web pages stored on the hard disk for quick viewing.
Users’ personalized settings for Web pages are not deleted.
Recycle Bin Select this check box to have Windows XP Professional delete the files in
the Recycle bin.
When you delete a file from your computer, it is not permanently
removed from the computer until the Recycle Bin is emptied (by delet-
ing the files contained in the Recycle Bin).
Temporary
Files
Select this check box to have Windows XP Professional delete any Tem-
porary files on this volume.
Programs sometimes store temporary information in a Temp folder.
Before a program closes, it usually deletes this information. You can

safely delete temporary files that have not been modified in more than a
week.
Lesson 5 Maintaining Disks with Disk Defragmenter, Check Disk, and Disk Cleanup
10-64 Chapter 10 Managing Data Storage
There are additional ways to free up space on your hard disk using Disk Cleanup. Click
the More Options tab in the Disk Cleanup For dialog box (see Figure 10-25). The avail-
able options are explained in Table 10-10.
F10us25
Figure 10-25 Use the More Options tab of the Disk Cleanup For dialog box to access additional fea-
tures.
WebClient/Publisher
Temporary Files
Select this check box to have Windows XP Professional delete any tem-
porary WebClient/Publisher files.
The WebClient/Publisher service maintains a cache of accessed files on
this disk. These files are kept locally for performance reasons only and
can be deleted safely.
Compress Old Files Select this check box to compress files that have not been accessed in a
while.
No files are deleted and all files are still accessible.
Because files compress at different rates, the value displayed for the
amount of space you will recover is an approximation.
Catalog Files For
The Content Indexer
Select this check box to have Windows XP Professional delete any old
catalog files left over from previous indexing operations.
The Indexing Service speeds up and enriches file searches by maintain-
ing an index of the files on this disk.
Table 10-9 Disk Cleanup Deletion Options
Check box Description

10-65
Practice: Maintaining Disks
In this practice, you use the Disk Defragmenter to determine whether your hard disk
is fragmented. If it is, you will defragment your hard disk. You then use Check Disk to
examine your hard disk for file system errors, fix them, locate any bad sectors, and
recover any readable information from those bad sectors. Finally, you use Disk
Cleanup to free up disk space by deleting temporary files and uninstalling programs.
Note If you started with a clean hard disk and installed Windows XP Professional in Chap-
ter 2, these disk maintenance tools will probably not find much to clean up or repair.
Exercise 1: Defragment a Hard Drive
1. Click Start, point to All Programs, point to Accessories, point to System Tools, and
then click Disk Defragmenter.
Windows XP Professional displays the Disk Defragmenter dialog box.
2. If there are multiple volumes on your computer, select C, and then click Analyze.
3. If Windows XP Professional displays a dialog box, indicating that there is no need
to defragment your volume at this time, click Close, and then read through Steps
6 through 12.
Table 10-10 Additional Features on the Disk Cleanup More Options Tab
Option Description
Windows
Components
Click Clean Up under Windows Components to launch the Windows Com-
ponents Wizard, which allows you to add and remove Windows compo-
nents from your installation.
The Windows Components include Accessories and Utilities, Fax Services,
Indexing Services, Microsoft Internet Explorer, Internet Information Services
(IIS), Management and Monitoring Tools, Message Queuing, MSN Explorer,
Networking Services, Other Network File and Print Services, and Update
Root Certificates.
Installed Programs Click Clean Up under Installed Programs to launch Add Or Remove Pro-

grams, which allows you to install programs and to uninstall programs that
are no longer in use.
The list of programs available to be uninstalled depends on which pro-
grams are installed on your computer.
System Restore Click Clean Up under System Restore to delete all but the most recent
restore points.
For more information about restore points and System Restore, see Chapter
4, “Modifying and Troubleshooting the Startup Process.”
Lesson 5 Maintaining Disks with Disk Defragmenter, Check Disk, and Disk Cleanup

×