$tempfolders = @("c:\windows\temp\*","C:\windows\prefetch\*","c:\users\*\local settings\temp\*","c:\users\*\AppData\local\temp\*","c:\users\*\AppData\local\microsoft\windows\temporary internet files\*","c:\users\*\AppData\local\Microsoft\Internet Explorer\Recover\Active\*","c:\users\*\AppData\Local\Google\Chrome\User Data\Default\Cache\*","c:\users\*\AppData\Local\Google\Chrome\User Data\Default\Media Cache\*","c:\users\*\AppData\Local\Microsoft\Windows\WebCache\WebCacheV01.dat","c:\users\*\*.regtrans-ms","c:\users\*\appdata\local\mozilla\firefox\profiles\*\Cache\*","c:\users\*\AppData\Roaming\Microsoft\Teams\Service Worker\CacheStorage","c:\windows\logs\cbs\*","C:\ProgramData\Microsoft\Windows\WER\ReportQueue\*","C:\Users\*\AppData\Local\Citrix\GoToMeeting\*","c:\windows\system32\wbem\logs\*","c:\windows\system32\logfiles\*","c:\windows\debug\*","c:\windows\pchealth\errorrep\userdumps\*","c:\windows\ltsvc\ADLogFiles\*") Remove-Item $tempfolders -force -recurse -ErrorAction SilentlyContinue Clear-RecycleBin -DriveLetter C -Force -ErrorAction SilentlyContinue Dism.exe /online /Cleanup-Image /StartComponentCleanup Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase vssadmin resize shadowstorage /for=c: /on=c: /maxsize=5GB get-psdrive