Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

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.
00
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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.