Deleting profiles with Delprof.exe and the Vista workaround

I went through the Resource Tools directory yesterday and found a nifty utility: delprof.exe. This is what it does:

C:\WINDOWS\system32>delprof /?
Microsoft« Windows« Operating System User Profile Deletion Utility v5.2

Microsoft Corporation. All rights reserved.

This utility deletes Windows NT, Windows 2000, Windows XP and Windows Server 2003 family user profiles.

usage:  DELPROF [/Q] [/I] [/P] [/R] [/C:\\<computername>] [/D:<days>]

/Q      Quiet, no confirmation.

/I      Ignore errors and continue deleting.

/P      Prompts for confirmation before deleting each profile.

/R      Delete roaming profile cache only

/C      Remote computer name.

/D      Number of days of inactivity.

C:\WINDOWS\system32>delprof /?
Microsoft« Windows« Operating System User Profile Deletion Utility v5.2
⌐ Microsoft Corporation. All rights reserved.
This utility deletes Windows NT, Windows 2000, Windows XP and Windows Server 2003 family user profiles.
usage:  DELPROF [/Q] [/I] [/P] [/R] [/C:\\<computername>] [/D:<days>]
/Q      Quiet, no confirmation.
/I      Ignore errors and continue deleting.
/P      Prompts for confirmation before deleting each profile.
/R      Delete roaming profile cache only
/C      Remote computer name.
/D      Number of days of inactivity.

Really nice! I log onto alot of PC’s because of my job and I never like the idea that my profile sits there for ever and ever. Also when cleaning up PC’s one of the first things I do is deleting old user profiles, this saves alot of diskspace, sometimes gigabytes. I always had to login, open properties of this computer->advanced tab->Profiles button->lookup the last login date of every profile and decide if I would delete it. Very time consuming. With this utility I can do it all from my admin PC =)

‘delprof /C:\\<computer name> /D:31’ deletes all user profiles older then 31 days on computer <computer name>. What a breeze =) Please note, it will also delete the local administrator profile so make sure you leave nothing of value there. It will not touch the All Users, Default User, NetworkService and LocalService profiles.

Sweet! But what about Vista?

As of now, the utility is not compatible with Vista nor is there news of Microsoft developing a new util for Vista or enhancing the util to work on Vista.

There is, however, a Group Policy setting you can use to set a max age for user profiles. You can find it in Computer Configuration->(Policies (WS2K8 only)->)Administrator Templates->System->User Profiles->Delete user profiles older than a specified number of days on system restart. This only works on Vista though.

1

If you don’t like roaming profiles at all on your workstations, you can use the ‘Delete cached copies of roaming profiles’ option.

2

Advertisements

About Yuri de Jager
Technology Addict

4 Responses to Deleting profiles with Delprof.exe and the Vista workaround

  1. Pingback: 2010 in review | Yuri's Technology Blog

  2. Helge Klein says:

    I have written an inofficial successor to Delprof creatively called Delprof2. It works on all versions of Windows (XP/Vista/7/2003/2008/2008 R2), is syntax-compatible to the original and even more powerful.

    Delprof2 is free to use commercially or otherwise.

    More information and download: http://helgeklein.com/free-tools/delprof2-user-profile-deletion-tool/

  3. Hello, what is the syntax /switches to delete one user profile only. leaving all others untouched.
    I want to use this on 50 computers to del one profile across all Terminal
    servers.

    Deprof2 \\servername\C$\Documents and Settings\username ?

    OS is server2003

    • Yuri de Jager says:

      Hi John,

      I’ve never used Delprof2 before, but looking at Helge’s website I guess the syntax would be something like this:

      delprof2 /c:\\[computername] /d:0 /id:[username]

      Good luck!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: