Sunday, April 24, 2011

Windows 7 + RemProf = Windows XP + Delprof

It has been a while since I have been looking for a remote profile deletion utility for Windows 7. Microsoft provided Delprof for Windows 2000, XP and Server 2003 but it doesn’t work on any OS beginning with Vista. We are in the process of transitioning to Windows 7, out user support guys make heavy use of Delprof as we use Roaming Profiles which get corrupted or have other issues at time or we simply need to clean a workstation. So in the absence of Delprof our user support needs to login to the workstation to clear profiles on a workstation or login to a XP virtual machine and use the command prompt for remote profile deletion.

While  looking for a solution I found the following freeware utility

RemProf download and look at the help file for more info.

Using it with PsExec one can achieve what Delprof does and more. It makes a better Delprof alternative.

for example if you need to delete only one users profile from a workstation, you can user the following command

psexec \\computername \\uncpath\remprof /L username

there are many more options, following is from the help file that comes with it.

Usage:
REMPROF [/LIST|username|/A|/D:days|/AD:days] [/EXCLUDE:usernames] [/?]

/LIST - List all user profiles currently not in use (Default).
username - Delete user profile based on username.
/A - Delete all user profiles that have no username association
including abandoned profile folders.
i.e. The username has been deleted in Active Directory but
a profile still exists in form of a SID or the profile did
not unload correctly and a residue profile folder exists.
/D:days - Delete all user profiles equal to or older than the number of
days specified. NB: /D: without a number is equal to /D:0.
/D:0 will remove CURRENT user profiles not in use.
/AD:days - Delete all user profiles that have no username association
and are equal to or older than the number of days specified.
NB: /AD: without a number is equal to /AD:0.
/EXCLUDE:username/s - Exclude particular users from being deleted.
Can accept multiple entries, seperated by comma.
Must be last command line argument.
Unassociated profiles cannot be excluded.
Do not include the Domain Name.
/? - show this help file

REMPROF without parameters will execute the /LIST switch by default.

I find it a very useful tool, hope it helps you too.

5 comments:

  1. 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/

    ReplyDelete
  2. Dude, I can't get RemProf to work on Win7. I don't know what you are doing to get it to work, but the documentation says it doesn't even work on Vista!

    DelProf2, however, does work. It's the bomb. Thanks Helge! You should sell this for at least a little something. I know the University I work for would pay for this.

    ReplyDelete
  3. CAG thank you for pointing that out, if you notice this post is about removing xp profiles from windows 7 machine and remprof does that well. I like delprof2 as well and its supported by more versions of windows.

    When I was looking for a solution remprof is the first one I found so I added it to my KB.

    ReplyDelete
  4. Delprof2 doesn't yet include functionality to create an exclusion rule for Profiles but Remprof does. However, like @CAG, I can't get Remprof to work on Windows 7 (64 Bit) either, anybody else have better luck?

    ReplyDelete
  5. When I'm typing the commands in a CMD, it works like a charm. I run remprof /A:0 once and for deleting the profiles and once again remprof /A for the orphan profiles.

    64 bit seven in english

    ReplyDelete

Leave a comment if you find this post useful or if you have any questions