Open christophFeiker opened 3 years ago
I think it would be nice to add a cleanup action to Storage Tab. following code lines can be used to delete all temporary cached files with Disk Clenaup:
Get-ChildItem -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches' | New-ItemProperty -Name StateFlags0001 -Value 2 -PropertyType DWORD Start-Process -FilePath CleanMgr.exe -ArgumentList '/sagerun:1' -WindowStyle Hidden -Wait Get-ChildItem -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches' | remove-ItemProperty -Name StateFlags0001
I think it would be nice to add a cleanup action to Storage Tab. following code lines can be used to delete all temporary cached files with Disk Clenaup:
Get-ChildItem -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches' | New-ItemProperty -Name StateFlags0001 -Value 2 -PropertyType DWORD Start-Process -FilePath CleanMgr.exe -ArgumentList '/sagerun:1' -WindowStyle Hidden -Wait Get-ChildItem -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches' | remove-ItemProperty -Name StateFlags0001