Hi @Rafael Aguilar ,
maybe this helps.
$exeFiles = "7z.exe", "putty.exe"
$exeFiles | ForEach-Object {
Get-ChildItem -Path "C:\Program Files" -Recurse -Include $_ -ErrorAction SilentlyContinue -Force | Remove-Item -Force -WhatIf
}
If the result looks good for you just remove the -WhatIf
in line 3.
Depending on the -Path
it might take a while to "find" all files in all folders.
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten