Jump to content

Recommended Posts

Posted

run it as a log off script something like

rd /s /q %userprofile%\[color=#333333]App[/color][color=#333333]Data\Local\Temp [/color]

 

if you really want to do it remotely perhaps a nested foreach loop of hostnames and c:\users in powershell.

 

What remote admin tools do you have? You can cut the hostnames foreach by deploying the powershell script via SCCM or PDQ.

  • Thanks 1
Posted (edited)

Cheers,

 

I ended up with a powershell script

 

Get-ChildItem -Path 'C:\Users' | foreach {
    Get-ChildItem -Path "$($_.FullName)\AppData\Local\Temp" -ErrorAction Continue | Remove-Item -Force -Recurse
}

 

Which works and had to do it per machine, but with the sheer volume of files in there I ended up resorting to using delprof2 to erase profiles and leaving the machines running overnight - I could also use delprof2 remotely

Edited by caffrey
Posted

Mine is an admin script rather than a user script, I run it on a Friday afternoon

 

cd /D C:\Users
REM ?-Clean Temp Folder?
for /D %%a in (*.*) do DEL /F /S /Q "%%a\AppData\Local\Temp\*.*"

  • Thanks 1
Posted

Avid Application Manager ran away with itself, bored today stuck at home so I decided to fix the Music room PC's

 

This was one profiles temp directory....

 

avid.jpg

  • Thanks 1

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...