Profile Removal.

Just a quick update, its mental busy in the new Job.

Ever want to clear down the user profiles on a citrix server without actually doing the work? Well i asked for a reason, the citrix profiles seem to be a bit all over the place in here. No roaming profiles and no lockdown profiles… resulting in hundreds of unadministered accounts lying around the place and filling space.

download delprof over here: Its a little life saver.

q = quiet
i = ignore errors
c=computer (works local too)
d= days in numbers that the profile has been inactive.

delprof /q /i /c \\computername /d:30


I have one better than this, its called RemProf and its from the good guys at Ctrl-Alt-Del IT! It does involve psexec unfortunately, but with a simple script it allows you to differenciate between those silly “account unknown” users and regular users. it adds more functionality but alas it needs to be executed remotely.

Use psexec to run the script on the server, call it script-kicker.bat and populate it with this:

psexec \\computername -u domain\username -p password “cmd /c \\share\script.bat”
*note you could also user the @filename.txt to run a batch job on a number of servers.

now in the script.bat file:

\\servername\share\remprof.exe /A >> c:\%computername%-tif.txt
\\servername\share\remprof.exe /D:40 >> c:\%computername%-tif.txt

This will deleted unknown accounts (the /A switch) and Delete accounts inactive for 40 days (the /D switch)

Now optionally for full reporting, simply stick this at the end of your script for central logs =)

copy c:\%computername%-tif.txt \\servername\share\%computername%-tif.txt


  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

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

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

Google photo

You are commenting using your Google 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 )

Connecting to %s

<span>%d</span> bloggers like this: