Windows Server

Remove profiles on Windows Server 2008 with the Delprof2 utility

If you're looking for a profile management tool for Windows Server 2008, check out the community utility called Delprf2, which allows you to delete user profiles.
Profile management is one of the finer points of Windows Server system administration. For Windows Server 2003, Delprof was the tool of choice for cleaning up profiles. Unfortunately, this tool isn't available for Windows Server 2008. The good news is I've found a community tool that removes profiles on Windows Server 2008.

Helge Klein from Germany has written a number of tools that can aid Windows administrators, and one of those tools is Delprof2; it functions a lot like the Delprof utility, and it adds features to the interface. I downloaded Delprof2 and proceeded to clean up some profiles explicitly on a server (VBAR1). I explain below how to use the utility.

After you download Delprof2, the first step is to see what profiles are inactive on the server by running this Delprof2 command:

Delprof2 /c:vbar1 /l /d:30
This will return user accounts that are stale by 30 days or more on the local system's profile inventory. In this server's case, only the built-in administrator account hasn't been used in this timeframe. The results are shown in Figure A. Figure A

Click the image to enlarge.

The Delprof2 command can be run from a remote server without logging into it explicitly (that is how the example above was run). Other parameters include specifying the number of days with the /d: parameter; for instance, 30 days may be too short for some environments. When running Delprof2 against a server, the candidates of expired accounts are enumerated to then be fed into a script to remove the profiles.

To actively delete one or more user profiles, the syntax of Delprof2 changes slightly. The /l parameter is removed, and there is a prompting for the task. Here is an example of actively deleting idle profiles older than 15 days:

Delprof2 /c:vbar1 /d:15
Every iteration of the command will prompt for a yes/no before deleting (or listing) the user accounts, and in this case, it proceeds swiftly and correctly in deleting the single account that was identified as an idle account. This is shown in Figure B. Image B

Click the image to enlarge.

The beauty of this command is that each account does not need to be piped in explicitly; this is perfect for terminal servers, as well as kiosk PCs.

Helge offers a number of additional tips on using Delprof2, as well as considerations for local caches of roaming profiles.

How do you manage idle profiles? Does Delprof2 seem like it would help you? Share your comments in the discussion.

About

Rick Vanover is a software strategy specialist for Veeam Software, based in Columbus, Ohio. Rick has years of IT experience and focuses on virtualization, Windows-based server administration, and system hardware.

1 comments
sk_5910
sk_5910

The program commences with "Delete inactive profiles..." even when the "/l" is used (list mode). This was mentioned in passing; but doesn't inspire confidence - actually causes me some bowel loosening (maybe I'm just a coward). The "/l" should invoke a startup message that clearly indicates that the execution is non-destructive. There is too much danger for error & massive deletions (Yes, it will be due to incompetence...but Sh! it happens).