![]() # This function provides feedback in the console on errors or progress, and aborts if error has occured. # Create counter to optionally record how many files could not be deleted. $SystemDrive = Get-PSDrive -Name $strSystemDriveLetter $strSystemDriveLetter = ::ExpandEnvironmentVariables("%systemdrive%") -replace (':', '') # Keys to set CLEANMGR to clean, remove unwanted entries '%allusersprofile%\Microsoft\Windows\WER' '%allusersprofile%\Microsoft\Windows Defender\Scans', '%allusersprofile%\Microsoft\Windows Defender\Definition Updates', $arrFilesToBeDeleted = Array of folders to be cleaned If either of these has been run, IT IS NOT POSSIBLE TO UNINSTALL UPDATES OR REVERT TO AN OLDER WINDOWS BUILD!Ĭopy Script Copied to clipboard #requires -version 3 Note: The CLEANMGR option and DISM fallback remove installers of updates and old Windows versions. Option: Run DISM if CLEANMGR was supposed to run but is not available It was already deleted, does anyone know how I can restore it 3 comments. Well my computer was running out of storage so I decided to do a disk cleanup, and I had tick it for being deleted, but I didnt know it was an important file, but by the time I found out and cancelled it. Option: Run CLEANMGR with all options set, and delete Volume Shadow Copies I accidentally deleted my Windows ESD installation files, does anyone know how I can restore it Solved. %allusersprofile%MicrosoftWindows DefenderScansĮxtra folders to be cleaned and specific files to be removed can be added when running the script. %allusersprofile%MicrosoftWindows DefenderDefinition Updates By default, the following folders are emptied of files (if they exist): ![]() This script is used to clean up a disk by deleting the content of directories which are known to accumulate large amounts of useless data.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |