How do I use the Microsoft Resource Kit utility Delprof.exe to delete old profiles (older than 30 days) without deleting the local Administrator account?

delprof.exe /Q /C:\\remotecomputer /D:30

This gets almost there but I want to skip the local Administrator account. Also, do it silently without prompting for each account.

2 Answers 2


The letter "I" might do what your looking for, for the silent part:

Microsoft(R) Windows (R) 2000 Operating System User Profile Deletion Utility v5.
Copyright (C) Microsoft Corp. 1981-1999

This utility deletes Windows NT and Windows 2000 user profiles.

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

        /Q      Quiet, no confirmation.
        /I      Ignore errors and continue deleting.
        /P      Prompts for confirmation before deleting each profile.
        /C      Remote computer name.
        /D      Number of days of inactivity.

But also look at http://www.wisesoft.co.uk/scripts/vbscript_delete_local_profiles.aspx which does the same kind of thing but dosn't use delprof and you can skip certain user profiles.

And if you are using roaming profiles and don't want them kept at all, look into using "Delete Cached copies of roaming profiles" in your GPO's which can be found at:

Computer Config > Admin Template > User Profiles > Delete Cached copies of roaming profiles

although it has been known to fail on wireless networks and such so it might still be good to run either delprof or another script every so often to catch those.


Have not tried it, but you probably have to update the profile that you want to keep. Its not very robust but it can be done with REG LOAD and then add, delete and unmount.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .