PowerShell Script to delete all Temp Internet Files, All Users

Thin Client users connect via Citrix
Users Profiles are NOT capped with a quota

User logon times via Citrix has increased when rolling out IE11 onto the Citrix Farm and believe this has something to do with Temp Internet Files in Users Profiles

I would like to delete all users Temp Internet Files from there 'Profiles' directory on a File Server using Powershell Script
CTCRMInfrastructure EngineerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

is this any good dude:


not written by me but I've used it and it's not too tough to mod it for your needs

Spike99On-Site IT TechnicianCommented:
Temp. internet files are excluded from roaming profiles by default, are you sure that's what's slowing things down?  By default, temp internet files are saved to this path in the "appdata\local" folder, which is not part of the roaming profile normally:
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files
%localappdata%\Microsoft\Windows\Temporary Internet Files

See this page:

I would look at cookies. Even though each cookie file is a tiny text file, if you have 10,000 of them, it's going to slow down things during log on and log off.
The cookies folder IS part of the roaming profile by default:

We used to redirect Cookies to the user's network drive so this wouldn't be an issue.  At my old job on Server 2003 servers, the users' H: drives held all of the redirected folders: Favorites, Cookies, AppData, My Documents, My Pictures, etc.

You can have the user's clear cookies using Internet Options and then have them log off & back on to see if that helps. If it does, I think you found the culprit.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CTCRMInfrastructure EngineerAuthor Commented:
Excellent Guys, I'm checking all of the above, redirects and want to test the script as well.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.