Have all local data erased for domain users..

We have a number of workstations each being used by a large number of domain users.  The computers have limited disk capacity and we want all local data (user profile with temporary internet files etc) to be erased from the workstation disk when the user logs off.

There is a couple to GPO entries to ensure this, but we have not had any success to get these to work as described.

What do we need to do to ensure users' local data is erased when logging off?
geir056Asked:
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.

Zuhir ElgmatiApplications and Systems AdministratorCommented:
there's  a software called deep freeze do something like this, acually i'm not sure but i remmber that i use it from along time befor it's work as a cleaner, when the user log off it's automatically remove every thing , temporary + new files ..etc
http://www.faronics.com/html/deepfreeze.asp

good luck
0
Mark DamenERP System ManagerCommented:
In your GPO, have you set the following settings:

Computer Configuration \ Administrative Templates \ System \ User Profiles \ Delete Cached Copies or Roaming Profiles

User Configuration \ Administrative Templates \ System \ User Profiles \ Delete Cached Copies or Roaming Profiles

?

And do the GPO apply to the OU of the users/computers you are trying to target, check the permissions on the GPO and any filtering to ensure it is taking effect.
0
MeviCommented:
If you're not using roaming profiles or folder redirection, you could design a startup script that deletes files out of each profile (or delete the profiles themselves...to delete the whole profile you want to make sure it is a STARTUP script, because many times the user profile is locked even after a logout.)

Here is an exmaple that will clear temporary internet files only

Set this as a logon or logoff script.




Const TEMPORARY_INTERNET_FILES = &H20&

Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(TEMPORARY_INTERNET_FILES)
Set objFolderItem = objFolder.Self
strPath = objFolderItem.Path & "\*.*"

Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile(strPath)
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

geir056Author Commented:
Hi,
To markus*

There is no Delete Cached Copies or Roaming Profiles entry in User Config, only in Computer Config, which of course is set.

We are just allowing Local profiles (no roaming) and we just want to keep each  users' disk space as low as possible after they have logged off.  Can someone confirm that the Computer Config.'s "Delete Cached Copies or Roaming Profiles" is supposed to work in a Local profiles only environment?

As of deleting the profile completely I ask myself if that will cause a significant delay at each logon as there is certainly a number of files and folders to be created.  Can someone comment on that?

Basically the bulk of (big) files which causes problems are the temporary internet files and downloaded updates in the <user>\Program data folders.  Would it be preferable to just erase these two folders..?

Thank again for some comments here

Geir
0
Mark DamenERP System ManagerCommented:
Oh yeah, that changes the goalposts.  The delete cached copies will ONLY work for roaming profiles.  Your definately just need a script to delete those particular files.  I take it MY DOCS is redirected to a network share each time?  And Outlook setttings would also be wiped if u delete whole profile.
0
geir056Author Commented:
OK, so I should go for Mewi's suggestion:

Const TEMPORARY_INTERNET_FILES = &H20&
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(TEMPORARY_INTERNET_FILES)
Set objFolderItem = objFolder.Self
strPath = objFolderItem.Path & "\*.*"
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile(strPath)

How do I extend this to also go for all files in Local Settings\Temp while being forgiving about locked files and not stop but continue to erase the next unlocked file..?

regards Geir
0
MeviCommented:
I'm just a light scripter (infact I grabbed that example from the script center) but I'd wager to say adding "On Error Resume Next" would take care of that.

You can modify that script to have the Temp path (I couldn't find the temp constant documented, so you'll likely have to expand the environmental variables)


Try this below (I haven't tested this)
On Error Resume Next
Set WshShell = CreateObject("WScript.Shell")
Set objEnv = WshShell.Enviroment("Temp")
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile(objEnv)

Open in new window

0

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
Computer101Commented:
Forced accept.

Computer101
EE Admin
0
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
Microsoft Legacy OS

From novice to tech pro — start learning today.