Created
November 10, 2014 14:54
-
-
Save y0ug/6f2aa2b3fa227dc4c2b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Clean temp folder | |
$tempfolders = @("C:\Windows\Temp\*", "C:\Windows\Prefetch\*", "C:\Documents and Settings\*\Local Settings\temp\*", "C:\Users\*\Appdata\Local\Temp\*") | |
Remove-Item $tempfolders -force -recurse | |
# Clean windows update folder | |
Stop-Service wuauserv | |
dir $env:windir\SoftwareDistribution\Download -Recurse | Remove-Item 'Recurse | |
#Start-Service wuauserv | |
# Remove hybernation file | |
Remove-Item c:\hiberfil.sys -force | |
# Remove evtx log | |
#$es=new-object System.Diagnostics.Eventing.Reader.EventlogSession | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment