[THIN] Re: Roaming Profiles

  • From: Euan Cooper <Euan.Cooper@xxxxxxxxxxxx>
  • To: "'thin@xxxxxxxxxxxxx'" <thin@xxxxxxxxxxxxx>
  • Date: Thu, 19 Aug 2004 09:15:29 +1200

Petitti,
 
You can simply write a script that with something like this in it 
 
X: [1]
cd\Path_to_Profiles[2]
del *.dmp /s 
del *.tmp /s
 
You might want to look at using cprofile.exe to compress the user registry
hive[3] stored in the profile - the following line added to the above script
will do the trick
 
for /d %%i in (*) do cprofile %%i\ntuser.dat
 
Also you could look at using something like BLAT to send a log of the
process to an e-mail account of your choice.
 
Put it all together and you might end up with something like ....
 
@echo off
:: TS_PF.CMD - Housekeeping for Terminal Server Roaming Profiles 
::                Last Alterd by EJC - 19th Aug 2004
 
:: This script uses NOW.EXE (from the NT Resource kit)
:: CPROFILE.EXE (std windows server utility)
:: And BLAT.EXE (freeware command line SMTP mailer)
:: These files need to be somewhere in the path and BLAT will need to be
installed as per
:: the documentation for this script to work correctly.
 
SetLocal
:: First confirm script is being run the right server.
If not %COMPUTERNAME%==SERVER-1 echo You are trying to run this script on
the wrong server - this is %COMPUTERNAME% not SEVER-1 >HK.TXT & Goto
Send_Log
 
NOW Starting housekeeping on TS Profiles               > HK.txt
Echo.
>>HK.txt
D:
cd\wtsprofiles
del *.dmp /s
>>HK.txt                                    
del *.tmp /s
>>HK.txt
:: Only redirect to the log file (HK.TXT) if you are interested in what
files are getting dumped
 
for /d %%i in (*) do cprofile %%i\ntuser.dat               >>hk.txt
:: While logging all your profiles will make the log quite long - it will
show any errors in the process
 
Goto Send_Log
 

:Send_Log
Blat HK.txt -t  bpetitti@xxxxxx <mailto:bpetitti@xxxxxx>  -s "TS Roaming
Profile Housekeeping log"
del HK.TXT
 
ENDLOCAL
 
 
Finally have a look at not including LOCAL SETTINGS in your roaming
profile[4] -n this has significantly reduced the size of my roaming
profiles.
 
 
-Ec
 
1 where X= the drive letter on your server that contains your roaming
profile share
2 I.E.  the path to the roaming profiles DIR on your server
3 NTuser.DAT
4 I do this via a system policy
 
 
 

-----Original Message-----
From: Petitti, Bruno [mailto:bpetitti@xxxxxx]
Sent: Thursday, 19 August 2004 5:41 a.m.
To: 'thin@xxxxxxxxxxxxx'
Subject: [THIN] Re: Roaming Profiles


Is there any utility you use to clean out old *.dmp, *tmp etc files from the
server that is hosting the profiles to keep there profiles clean and small?



Other related posts: