PowerShell Script to delete all Temp Internet Files, All Users

CTCRM used Ask the Experts™
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
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
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

On-Site IT Technician
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.
CTCRMInfrastructure Engineer


Excellent Guys, I'm checking all of the above, redirects and want to test the script as well.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial