Clean up Winsx and Shadow Copies.

DISM /Online /Cleanup-Image /AnalyzeComponentStore
DISM /Online /Cleanup-Image /StartComponentCleanup
DISM /Online /Cleanup-Image /StartComponentCleanup /ResetBase
schtasks /Run /TN \Microsoft\Windows\Servicing\StartComponentCleanup
DISM /Online /Disable-Feature /FeatureName:NameHere /Remove
DISM /Online /Cleanup-Image /AnalyzeComponentStore
DISM /Online /Cleanup-Image /StartComponentCleanup /ResetBase
DISM /Online /Get-Features /Format:Table

:: Windows Update cache
net stop wuauserv & net stop bits
rd /s /q C:\Windows\SoftwareDistribution\Download
net start bits & net start wuauserv

:: Temp folders
del /s /q C:\Windows\Temp\*  2>nul
del /s /q %TEMP%\*          2>nul

diskshadow
list shadows all

set context persistent
delete shadows all
set context approllback
delete shadows all
set context filesharebackup
delete shadows all
set context nasrollback
delete shadows all


net start swprv
net start vss

Did you find this article useful?