Checking for only one or many installed software using GUID

Thank you Olaf… sorry a bit new to this PS logic…

Think I may have nailed it for #1 so in the function the last line now looks as follows:

Get-ChildItem @gciParams | Where $WhereBlock | Select-Object -Property $selectProperties | Sort-Object -Unique

What this does is limit the function’s dump from many to the last one found so $GUID contains only one so my command goes through THEN, when I re-check the variables again down the command line with as follows:

        $GUIDObjectRecheck = Get-InstalledSoftware "*Adobe Photoshop Elements*"
        $GUIDRecheck = $GUIDObjectRecheck.GUID
        Execute-MSI -Action 'Uninstall' -Path $GUIDRecheck

It runs a re-scan of the function and I can simply grab each one individually as the others get removed with each re-check.