Free up drive space in Windows10/11 With PowerShell Script-The commands are below,in the description

Опубликовано: 24 Июль 2023
на канале: I.T PLUS SOLUTIONS
136
4

Free up drive space in Windows10 / 11 With PowerShell Script
The commands: (Copy & Paste in a Text File )


function Clean-JunkFiles {
Clean temporary files
Write-Host "Cleaning temporary files..."
Remove-Item -Path "$env:TEMP\*" -Force -Recurse
Clean Windows Temp folder
Write-Host "Cleaning Windows Temp folder..."
Remove-Item -Path "$env:windir\Temp\*" -Force -Recurse
Clean Internet Explorer cache
Write-Host "Cleaning Internet Explorer cache..."
$internetExplorer = New-Object -ComObject Shell.Application
$internetExplorer.ClearInternetFiles()
Clean user's Recycle Bin
Write-Host "Emptying Recycle Bin..."
Clear-RecycleBin -Force
Write-Host "Junk files cleaned successfully."
}
Clean-JunkFiles






_________________________________________________________________________
Best regards ,
Ahmed Azba from I.T PLUS SOLUTIONS