Page 1 of 2

One for the techies.... about Roaming Profiles

Posted: April 7th, 2007, 16:14
by Wiggy
Right, I've been thinking about this recently, let's see what the more technically minded of you think about this.

We have a hotdesking system in the company we support (Transport for London). This essentially means that when someone logs on to a PC, their profile is pulled down from the server, printers and drives are mapped and the user can access their emails and archives cause it maps to shared drives and the exchange server etc. Anyway, that's not really important, this bit below is.

When a user has been on a PC, their roaming profile is kept on the PC in C:\Documents and Settings. This causes all sorts of problems, cause they tend to clog up the hard drive with needless rubbish (unused profiles). This causes our first line guys to spend ages remoting to PC's to clear out all this stuff cause a user complains that "their PC is running slow lol".

So to my point: is there - either through scripting or another method - to make a PC clear out the profiles in this folder when a user logs off? I'd love to know if this is possible because it's cauing us fuckloads of hassle and our SLA's (service level agreements - a measure of our efficiency) are going down the shitter. Please help :)

Posted: April 7th, 2007, 16:29
by eion
Use a script that runs on logoff. You can set the script to be run on logoff using the group policy editor (gpedit.msc) - either locally or from the domain controller (as I recall - it's been many moons since I was a proper Windows admin). Within group policy editor, go to User Configuration --> Windows Settings -> Scripts (Logon/Logoff).

To write the script, you can use anything Windows Scripting Host supports. Assuming VBScript...

Code: Select all

Const ProfilesFolder = "c:\teabagging" 'Change this to the profile folder

'Create a file-system object
Dim FSObject
Set FSObject = WScript.CreateObject("Scripting.FileSystemObject")

'horse-delete the profile folder
FSObject.DeleteFolder oSrc, True

'Get rid of the file system object
Set FSObject = Nothing

WScript.Quit()

That should do the trick, or be enough to give you a start.

Posted: April 7th, 2007, 18:03
by MIkkyo
you can do it on start up too. I find its a better idea to have it running when they first log on, deleting the old crap then moving their crap on, that way your not relying on it having been deleted befrore, just incase.

Posted: April 7th, 2007, 18:08
by eion
MIkkyo wrote:you can do it on start up too. I find its a better idea to have it running when they first log on, deleting the old crap then moving their crap on, that way your not relying on it having been deleted befrore, just incase.
Problem with this is that there's no guarantee (as far as I'm aware) that the roaming profile will get copied after the script has been executed. It should, sure, but if not then you'll end up deleting the roaming profile and potentially causing a problem.

Posted: April 7th, 2007, 18:15
by MIkkyo
if its on a shared drive, then deleting the local entries first on the script followed by copying the new profile. Not had any problems with it. but I'm just a code monkey, I only handled small networks of a few hundred. So its not My thing really.

Posted: April 7th, 2007, 19:03
by deject
yes.

Posted: April 7th, 2007, 19:07
by Fear
Or, use group policy.

Computer Configuration \ Administrative Templates \ System \ User Profiles.

Double-click Delete cached copies of roaming profiles (the Group Policy setting).

Click Enabled.

Profit.

Posted: April 7th, 2007, 19:11
by eion
Fear wrote:Or, use group policy.

Computer Configuration \ Administrative Templates \ System \ User Profiles.

Double-click Delete cached copies of roaming profiles (the Group Policy setting).

Click Enabled.

Profit.
:above: This.

*kicks himself*

Posted: April 7th, 2007, 19:52
by MIkkyo
meh that makes less work for yourself, wheres the fun in that?

Posted: April 7th, 2007, 20:36
by Wiggy
Fear wrote:Or, use group policy.

Computer Configuration \ Administrative Templates \ System \ User Profiles.

Double-click Delete cached copies of roaming profiles (the Group Policy setting).

Click Enabled.

Profit.
Where would one do this? Is it in AD or would we have to go through each of our 15000 machines doing this? Just so I know, like :)

Posted: April 7th, 2007, 20:41
by Woo Elephant Yeah
Group Policy Editor under administrative tools (usually loaded on the domain controllers)

You might want to ask someone who knows group policy though, it's one of those tools you can create utter chaos with if you don't know what you are doing.

I recently decided to make a simplistic change to map all usb drives as a certain drive letter, which then stopped every single person in the company using any citrix applications. :roll:

(Yeah it's hard to believe, I changed simple things and stopped stuff from working, it's not like I have ever done that with 5punk :lol:)

I'd love to learn group policy but other than poking around and fiddling with stuff, that's as far as my knowledge goes, so if anyone here has any good online guides, then that would be great.

Re: One for the techies.... about Roaming Profiles

Posted: April 7th, 2007, 20:54
by cheeseandham
Wiggy wrote:When a user has been on a PC, their roaming profile is kept on the PC in C:\Documents and Settings. This causes all sorts of problems, cause they tend to clog up the hard drive with needless rubbish (unused profiles). This causes our first line guys to spend ages remoting to PC's to clear out all this stuff cause a user complains that "their PC is running slow lol".
I'd be very surprised if an unused cached roaming profile would cause the PC to run slower and clearing it would alleviate the issue.
Or am I somehow missing something obvious?

Posted: April 7th, 2007, 20:57
by Dr. kitteny berk
maybe an issue with the sheer number of profiles and hdd fragmentation?

Posted: April 7th, 2007, 21:00
by Dog Pants
We've got a couple of machines that are used by a lot of people. Due to the way we're forced to set up our partitions there's not much room on the C drive, and so sometimes they fill it up (50 profiles with 25mb worth of temporary internet files). They slow down because there's no room for the page file. Of course I'd expect a decent commercial setup not to do stupid things like the military do.

Posted: April 7th, 2007, 21:08
by cheeseandham
Dr. kitteny berk wrote:maybe an issue with the sheer number of profiles and hdd fragmentation?
Yeah this occurred, but with 40Gb hard drives being small for even 3 year old machines I'd (wrongly) assume that it would take either a shit load of profiles (possible) or some very large profiles (in which case you don't want to be deleting them as your going to get people complaining their PC's are slow in logging on)
Dog Pants wrote:and so sometimes they fill it up (50 profiles with 25mb worth of temporary internet files).
Bloody IE. although <bloodyminded> Temporary Internet files are stored by default in Local Settings, so it's not really a roaming profile issue as such. </bloodyminded>

Posted: April 7th, 2007, 21:12
by Woo Elephant Yeah
Are the drives partitioned or anything?

Offline files being enabled can take up unecessary disk space if ticked and not needed.

I use this at work all the time, and it usually gets 40-50mb free minimum on first run, and can get a pc up and running in under a minute www.ccleaner.com

Once the machine is up and running, I then look at fixing the problem properly by doing some housekeeping.

We have machines with 80GB drives, yet some bright spark only partitioned the C drives with 9GB when they were all rebuilt 2 years ago :roll:

Posted: April 7th, 2007, 21:12
by Dog Pants
cheeseandham wrote: Bloody IE. although <bloodyminded> Temporary Internet files are stored by default in Local Settings, so it's not really a roaming profile issue as such. </bloodyminded>
Ah yeah, well our network is so badly set up that we can't use roaming profiles. I spent a week in Visio recently constructing a diagram of our connectivity (nobody's ever thought to do this before) and it looks like they've got a big bag of routers, switches and hubs and just stuck them in random buildings and then connected them together. Unfortunately we don't administrate the network equipment.

Posted: April 7th, 2007, 21:19
by Wiggy
Dog Pants wrote:We've got a couple of machines that are used by a lot of people. Due to the way we're forced to set up our partitions there's not much room on the C drive, and so sometimes they fill it up (50 profiles with 25mb worth of temporary internet files). They slow down because there's no room for the page file. Of course I'd expect a decent commercial setup not to do stupid things like the military do.
Dude, you're talking about the company that runs London Underground. IT-wise, they really havent thought it through. I've dealt with several PC's in the past week with 100 roaming profiles on them, at 10-15MB each. Bear in mind the standard hard drive size is about 25-30GB, so with profiles, the OS (and installed apps) and the pagefile there's fuck all room for everything else. Also, TfL don't like RAM, so they put 256MB in every machine, unless you're a Director of Something, in which case you might get 512MB. I think I might have to speak with the chap at work who deals with Group Policy, see if he can sort this out for us :roll:

Posted: April 7th, 2007, 21:28
by Dog Pants
Wiggy wrote: Dude, you're talking about the company that runs London Underground. IT-wise, they really havent thought it through. I've dealt with several PC's in the past week with 100 roaming profiles on them, at 10-15MB each. Bear in mind the standard hard drive size is about 25-30GB, so with profiles, the OS (and installed apps) and the pagefile there's fuck all room for everything else. Also, TfL don't like RAM, so they put 256MB in every machine, unless you're a Director of Something, in which case you might get 512MB. I think I might have to speak with the chap at work who deals with Group Policy, see if he can sort this out for us :roll:
Christ, that's worse than us. We've just upgraded most of the workstations to 512 :lol: (Although half the people who got the upgrade wanted flatscreen monitors instead)

Posted: April 7th, 2007, 21:59
by cheeseandham
Jeez, we got 256Mb authorised to be upgraded into NT4 machines about 6 years ago across the lowly 200 machine site I used to run.... As I recall it cost about £38 per PC (for 128Mb) and one low grade tech to walk around installing it for a little while.
Do the bean counters not realise how much it hurts productivity to run XP plus apps on a 256Mb machine??? /rant