Home Internet Mail Server Proxy Server Virus Windows Windows Server

Thursday, May 10, 2012

Delete Unused Profiles on Windows

Delete unused profiles locally or on remote computer with Windows Resource Kits, you can download the toolkits here.

Here's the usage command from this toolkits:

DELPROF [/Q] [/I] [/P] [/R] [/C:\\<computername>] [/D:<days>]
The function of:
  • /Q > Quiet, no confirmation.
  • /I > Ignore errors and continue deleting.
  • /P > Prompts for confirmation before deleting each profile.
  • /R > Delete roaming profile cache only.
  • /C > Remote computer name.
  • /D > Number of days since profile(s) last used.

Run from Start Menu > All Programs > Windows Support Tools > Command Prompt.

For example type delprof.exe /Q /I /C:\\computerA /D:90
(It means, delete all profiles on computerA that haven't been used in 90 days ago).

Note: If you want to be confirm to delete each profile, don't include the /Q on the command.

To delete more computer profiles, you can use a simple text file that contains all the computer names in your network. You must put each name on a separate line. Example you create compnetwork.txt. Run this
command on the command shell windows:
For /f %a in (compnetwork.txt) Do
   Delprof.exe /I /Q /C:\\%a /D:90
(Delete all the profiles that haven't been used in 90 days ago from computers that specified in the text file).

You can use batch file, schedule and run the command periodically.

Remember to replace %a with %%a inside the batch file command


Post a Comment

Home Photography
Copyright © 2017 Xiu's Blog | All Rights Reserved.