A script for managing roaming profiles in a Terminal Server environment. There are a lot of places this can go wrong*, so no guarantees!
*One thing to consider is the matching between user profile directories and the user's name. In my case, the profile directory is the username, and thus is a requirement of this script. Also, my profile directories are named using lower case. I don't know, but I suspect, that if that convention is not followed it will break this script. This could be avoided by modifying CLNLGPROF.MDB.
clnlg.cmd - calls another (not included!) script to rebuild excessively large profiles from a template profile. All this does is create a script that calls another, passing username. The second script, in my scenario, deletes the roaming profile (and copies of it on all terminal servers) and rebuilds it while applying correct permissions.
extinct.cmd - removes profiles found in the profile share but not found in the domain.
MS Access 97 or newer
Win NT, 2000, or 2003, or any variation that can deal with .CMD files.
Configuring for your environment
1. Download CLNLGPROF.ZIP and unzip into its own directory (default is c:\clnlgprof, but it can be wherever you like. Just keep in mind if you have a space in the path to this directory, you will need to "quote" your paths in the command scripts.)
2. Convert CLNLGPROF.MDB if not using Access 97.
3. Open CLNLGPROF.MDB. Edit query "12-Export Extinct Directories" and replace "T:\" to point to your profile store. UNCs should be fine if you want. Edit macro "Autoexec1." For each line in the macro that references a file name, change it to point to your path.
4. Delete tables "Dirsize" and "Users." Make sure you have already completed step 3!
5. Rename macro "Autoexec1" to "Autoexec"
6. Close CLNLGPROF.MDB
7. Edit "CLNLGPROF.CMD" to reflect correct paths. You'll need to follow this line by line, be careful!
8. Edit EXPORT.INI. Change the ExportDomain setting to reflect your domain name, and ExportUserFile to point to your clnlgprof directory.
At this point, you can run CLNLGPROF.CMD. If all is well (its a miracle) two files will be generated, listed above. After you get it working, you just need to run this script when you want the CLNLG and EXTINCT scripts to be generated.
If you actually get this working, please let this guy know!