Advertisement
Guest User

Untitled

a guest
May 11th, 2024
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. $path = "c:\windows\SoftwareDistribution";
  2. Stop-Service wuauserv;
  3. Remove-Item -path $path -force -recurse;
  4.  
  5. Remove-Item "C:\Users\*\AppData\Local\Temp\*" -Recurse -Force;
  6. Remove-Item "C:\Windows\Temp\*" -Recurse -Force;
  7. Remove-Item "C:\Users\*\AppData\Local\Google\Chrome\User Data\Default\Cache\Cache_Data\*" -Recurse -Force;
  8. Remove-Item "C:\Users\*\AppData\Local\Microsoft\Edge\User Data\Default\Cache\Cache_Data\*" -Recurse -Force;
  9. Remove-Item "C:\`$Recycle.Bin\*" -Recurse -Force;
  10. Start-Process -FilePath DISM.exe -ArgumentList '/online /Cleanup-Image /StartComponentCleanup' -Wait;
  11. Start-Process -FilePath DISM.exe -ArgumentList '/online /Cleanup-Image /SPSuperseded' -Wait;
  12. Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\*' | ForEach-Object { New-ItemProperty -Path $_.PSPath -Name StateFlags0001 -Value 2 -PropertyType DWord -Force};
  13. Start-Process -FilePath CleanMgr.exe -ArgumentList '/sagerun:1' -Wait;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement