Latest posts by Guest Author (see all)
- FREE: File Permissions Check - Compare folder and file permissions - Fri, Feb 20 2015
- FREE: ABC-Deploy - Software deployment and inventory - Wed, Apr 16 2014
- FREE: AD Permissions Reporter - View Active Directory permissions - Fri, Feb 7 2014
Submitted by Helge Klein - Website: helgeklein.com
While user profiles are great for personalization, sometimes a cleanup is required and some or all profiles need to be deleted. As it turns out, Windows has no tool for automating this task from the command line. There used to be a tool called Delprof, but it does not work correctly on Windows 7 and Server 2008 (R2). Delprof2 does. It is a kind of unofficial successor to Delprof. Although it is more powerful than the original it is still syntax-compatible, so existing scripts can be reused without any change.
Delprof2 - Delete user profile
Delete local and remote user profiles ^
Delprof2 works both locally and remotely. Given administrative privileges it deletes any user profile, regardless of the current permissions. Delete user profiles remotely on a different computer? Use /c:computername.
Run Delprof2 in unattended mode? Use /u and it stops asking for confirmation.It also is not stopped by very long paths which most tools and even Windows Explorer cannot handle. In short: if you tell it to delete a user profile, it will.
Delprof2 has additional filtering options: you might want to delete locally cached copies of roaming user profiles only or delete only profiles that have not been used in a specified number of days. Delprof2 does it all. Of course it will never touch the currently active user profile. Neither does it delete user profiles needed by the operating system (like “Default”).
Delete multiple user profiles ^
If you want to reclaim disk space just run it without parameters and it will delete all user profiles except your own and some special profiles needed by the operating system. There is no risk involved - it only starts deleting after politely asking for confirmation.
If that still sounds too dangerous, add the parameter /l to invoke what-if mode and have Delprof2 list what it would do. Often, only cached copies of roaming profiles need to be deleted, leaving all local user profiles intact. Just add /r to the command line and you are good to go.
As you can see, Delprof2 is a versatile tool for dealing with user profiles. Support is provided via a forum.