Powershell - Clean up the Windows installer folder

To support me, you can subscribe to the channel, share and like the videos, disable your ad blocker or make a donation. Thank you!

Hello,

I had already posted an article about the c:\windows\installer folder in Windows:
https://www.altf4-formation.fr/fr/comment-nettoyer-le-dossier-installer-de-windows

It is also possible to do this in PowerShell using the MSIPatches module:
https://github.com/markkerry/MSIPatches

# Install module
Install-Module -Name MSIPatches
# Display patch information
Get-MsiPatch
# List orphaned packages
Get-OrphanedPatch
# It is advisable to save (move in this case) orphaned files
Get-OrphanedPatch | Move-OrphanedPatch -Destination D:\Backup_Installer
# Delete files directly
Get-OrphanedPatch | Remove-Item

Related links