PowerShell Script to delete all Temp Internet Files, All Users

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

Issue
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

Requirement
I would like to delete all users Temp Internet Files from there 'Profiles' directory on a File Server using Powershell Script
LVL 2
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.

Jambon316Commented:
is this any good dude:

https://community.spiceworks.com/scripts/show/3359-cccleaner


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


Jamie
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
or
%localappdata%\Microsoft\Windows\Temporary Internet Files

See this page:
http://stealthpuppy.com/reduce-logon-times-by-excluding-the-bloat/

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:
C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Cookies

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
Powershell

From novice to tech pro — start learning today.