SUMMARY

This
step-by-step article describes how to delete user profiles on Windows
2000/XP/Server 2003 based computers by using the User Profile Deletion Utility
(Delprof.exe).

Delprof.exe is available in the Microsoft Windows Server 2003 Resource Kit. It
is a command-line utility that you can use to delete user profiles on a local
or remote Windows 2000/XP/Server 2003 based computers. User profiles can grow
large and may take up considerable disk space, especially if there are several
users using one computer. Because of this, you may want to use Delprof.exe to
free disk space by deleting profiles that are no longer required. However,
because each profile on the computer is presented in order when you run the
utility, you may want to use the Graphical User Interface (GUI) instead of the
command-line tool whenever this is possible.

You must be logged on as administrator or as a member of the Administrators
group to delete user profiles.

Overview of the Delprof.exe Tool

Delprof.exe uses the delprof
/q /i /p /r /c:\\computer name
/d:days
syntax. You can use the following parameters with Delprof.exe:

/q:
This parameter runs Delprof.exe in quiet mode. When you use this parameter, you
are not prompted to confirm the deletion of each profile.

/i:
This parameter ignores any errors that may occur.

/p:
This parameter specifies that a message is displayed that prompts you to
confirm the deletion of each profile.

/r:
This parameter specifies that delete the roaming profile cache only. Local
profiles on the machine will not be deleted.

/c:\\computer
name: This parameter
specifies the computer name on which to run Delprof.exe.

/d:days: This parameter specifies the number of days after which
Delprof.exe considers the profiles as inactive. Profiles that have not been used
for a period of time that is longer than the specified value are deleted.

WARNING:
Delprof.exe deletes all data that is stored in a user profile. This includes
desktop settings, favorites, program-specific data that is contained in the
Application Data folder, and the contents of the My Documents folder. Please be
aware of any user documents that may be deleted before you use this tool.

Examples

How to Use Delprof.exe to Delete
User Profiles on a Remote Computer

The following example describes how to use
Delprof.exe to delete user profiles on a remote computer that is named Server1.
Note that if you do not specify a computer in the command, Delprof.exe defaults
to the local computer.

1.
Click Start,
point to Programs,
point to Accessories,
and then click Command Prompt.

2.
At the command prompt, type delprof /p /c:\\server1, and then press ENTER. For each cached user profile on
Server1, a message is displayed in the command prompt window that prompts you
to confirm its deletion. For example, you receive a message that is similar to
the following message:

Delete \\SERVER1\D$\Documents and Settings\User1?
(Yes/No/All)

3.
Complete one of the following actions for each user
profile that you are prompted to delete:

·
Type y, and then press ENTER if you want to delete the profile.

·
Type n, and then press ENTER if you do not want to delete the
profile.

4.
Type exit, and then press ENTER to quit the command prompt.

How to Use Delprof.exe to Delete
User Profiles After a Specified Period of Inactivity

The following example describes how to use
Delprof.exe to delete user profiles on the local computer that have been
inactive for 30 days:

1.
Click Start,
point to Programs,
point to Accessories,
and then click Command Prompt.

2.
At the command prompt, type delprof /p /d:30, and then press ENTER. For each user profile that has not
been used on the computer for 30 days, a message is displayed that prompts you
to confirm its deletion. For example, you receive a message that is similar to
the following message:

Delete \\MYCOMPUTER\D$\Documents and Settings\User2?
(Yes/No/All)

3.
Complete one of the following actions for each user
profile that you are prompted to delete:

·
Type y, and then press ENTER if you want to delete the profile.

·
Type n, and then press ENTER if you do not want to delete the
profile.

4.
Type exit, and then press ENTER to quit the command prompt.

Troubleshooting

You may receive the following message when you
attempt to use Delprof.exe to delete user profiles:

Failed to open list of profiles.

Access is denied.

This behavior can occur if you are not logged on to
the computer as an administrator or as a member of the Administrators group.

To resolve this behavior, log on to the computer as an administrator or as a
member of the administrators group, and then use Delprof.exe to delete the
appropriate user profiles.