How to: delete “roaming” profiles through a batch file


Download delprof.exe hier: http://www.microsoft.com/

Quote uit de help file:

Overview of the Delprof.exe Tool

Delprof.exe uses the delprof /q /i /p /r /c:\\computer name /d:days syntax. You can use the following parameters with Delprof.exe:

/q: This parameter runs Delprof.exe in quiet mode. When you use this parameter, you are not prompted to confirm the deletion of each profile.

/i: This parameter ignores any errors that may occur.

/p: This parameter specifies that a message is displayed that prompts you to confirm the deletion of each profile.

/r: This parameter specifies that delete the roaming profile cache only. Local profiles on the machine will not be deleted.

/c:\\computer name: This parameter specifies the computer name on which to run Delprof.exe.

/d:days: This parameter specifies the number of days after which Delprof.exe considers the profiles as inactive. Profiles that have not been used for a period of time that is longer than the specified value are deleted.

WARNING: Delprof.exe deletes all data that is stored in a user profile. This includes desktop settings, favorites, program-specific data that is contained in the Application Data folder, and the contents of the My Documents folder. Please be aware of any user documents that may be deleted before you use this tool.

vervolgens maak je batchfile aan

@echo off
@echo de roaming profiles die ouder zijn dan drie dagen worden verwijderd.

C:\tools\delprof.exe /q /r /d:3

deze batch file schedule je om de drie dagen en de omgeving moet zo weer in topform blijven.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s