Tuesday, 29 May 2012

Delete Local User Profile for Windows 7 Domain Users

For those system administrator who want to easily remove the local user profile for the computer labs pc, you may consider downloading this tools from Ctrl-alt-del.com. This tools is the modified version from delprof.exe that is only useable for windows XP. http://www.ctrl-alt-del.com.au/files/RemProf08.zip

As this remprof.exe only can run with the users with administrator right, I have created a logon script and put it in our AD server and assign the logon script to the lab technician account with administrator right.  You may create a batch file call remprof.bat and copy it to your AD server netlogon folder. For eg.


download the remprof08.zip file, extract it and paste it to the \\ADServer\netlogon folder. The Netlogon folder should have

the content of the remprof.bat is
copy \\ADServer\netlogon\remprof.exe D:\
D:\remprof.exe /D:10

(/D:10 mean the user profile older than 10days will be removed from the local drive)

Now you may login to your AD users console (Active directory users and Computers), right click on your technician AD Account with administrator right, then go to properties, go to the "profile" tab, in the "logon script" filed, key in "remprof.bat".  Then press "OK"

Now you can go to your computer lab and test it. just login using the technician ID. the script will copy remprof.exe to the local d:\ and then execute the cleaning process. For those pc with no D drive, you may modify the batch files to copy the remprof.exe to c:\

Hope this may help.

No comments:

Post a Comment