Jump to content

Script to delete appdata sub folder content for multiple users


Recommended Posts

Posted

Hi

 

we are having major issues with adobe CS6 producing a serious amount of appdata for each student on the system. I am looking to delete the adobe appdata folder on a weekly basis to avoid serious buildup with the use of a script and scheduled task but am not sure which way to go about this or if this is the correct approach.The appdata folder is currently redirected to a hidden share on the network. Any help with this at all would be greatly recieved.

 

Thanks

 

Craig

Posted

I would use a powershell script running as a scheduled task on the server hosting the users appdata.

 

$rootFolder = "E:\users"
$adobeLocation = "\AppData\Roaming\Adobe"

Get-childitem $rootfolder | where {Test-Path ($_.fullname + $adobeLocation) -pathType container} | % {
   Remove-Item -Recurse -Force ($_.fullname + $adobeLocation)
}

 

Obviously will need testing in your environment but should do the job.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...