Using a wildcard with Remove-MSIApplications

Topics: Archive - General
May 27, 2015 at 4:40 PM
I am installing Java 7 Update 80 x86 and need to specifically remove all previous versions of Java 7 that are x64. Is there any way to do something like Remove-MSIApplications "Java 7 Update * (64-bit)" as opposed to:

Remove-MSIApplications "Java 7 Update 21 (64-bit)"
Remove-MSIApplications "Java 7 Update 25 (64-bit)"
Remove-MSIApplications "Java 7 Update 40 (64-bit)"
Remove-MSIApplications "Java 7 Update 45 (64-bit)"
Remove-MSIApplications "Java 7 Update 51 (64-bit)"
Remove-MSIApplications "Java 7 Update 55 (64-bit)"
Remove-MSIApplications "Java 7 Update 60 (64-bit)"
Remove-MSIApplications "Java 7 Update 67 (64-bit)"
Remove-MSIApplications "Java 7 Update 71 (64-bit)"
Remove-MSIApplications "Java 7 Update 75 (64-bit)"

Thanks,

Mike
May 28, 2015 at 9:17 AM
Hi

The site has moved to http://psappdeploytoolkit.com/, so you should post your questions there. Anyway the answer is to use -WildCard switch:

Remove-MSIApplications "Java 7 Update * (64-bit)" -WildCard.

It's available from version 3.6.1 onwards.
  • Jyri