Remove-MSIApplications – How to use this combine with version?

//Remove-MSIApplications – How to use this combine with version?
Remove-MSIApplications – How to use this combine with version? 2017-06-26T11:28:33+00:00

The Toolkit Forums General Remove-MSIApplications – How to use this combine with version?

  • Author
    Posts
  • Long
    Participant
    Post count: 14
    #2186 |

    ————————– EXAMPLE 4 ————————–
    PS C:\>Remove-MSIApplications -Name ‘Java 8 Update’ -FilterApplication @(,,@(‘Publisher’, ‘Oracle Corporation’, ‘Exact’)) -ExcludeFromUninstall @(,,@(‘DisplayName’, ‘Java 8 Update 45’, ‘RegEx’))
    Removes all versions of software that match the name “Java 8 Update” and also have “Oracle Corporation” as the Publisher; however, it does not uninstall “Java 8 Update 45” of the software. NOTE: if only specifying a single array in an array of arrays, the array must be preceded by two commas as in this example.

    Im trying to cleanup old Silverlight installation but cant use the above example.
    How do i include a check on the version nummer?

  • Long
    Participant
    Post count: 14

    Found solution

    Remove-MSIApplications -Name 'Microsoft Silverlight' -ExcludeFromUninstall (,('DisplayVersion', '5.1.50907.0', 'Exact')) -Exact

You must be logged in to reply to this topic.