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