Created
May 13, 2019 20:09
-
-
Save joswr1ght/ec03f5f76cdb8b0c772d65b88ea8a6b1 to your computer and use it in GitHub Desktop.
Prep Windows VM Before Export
This file contains hidden or 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
vssadmin delete shadows /All /Quiet | |
del c:\Windows\SoftwareDistribution\Download\*.* /f /s /q | |
del %windir%\$NT* /f /s /q /a:h | |
del c:\Windows\Prefetch\*.* /f /s /q | |
c:\windows\system32\cleanmgr /sagerun:1 | |
wevtutil el 1>cleaneventlog.txt | |
for /f %%x in (cleaneventlog.txt) do wevtutil cl %%x | |
del cleaneventlog.txt | |
ipconfig /flushdns | |
reg delete HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU /f | |
sdelete64 /z c: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment