V4.0.5 - Get-ADTApplication not returning all info

Hello, I have been slowly moving over to V4 from V3. In V3 I would use Get-Installed Application in an array to get all versions of an app installed on a system to then for loop and uninstall each one. I am trying to recreate this process with V4 however with Get-ADTApplication I can query an installed app and I ONLY get “Installed Application: XXXXX (Version: 1.1.1.1, Publisher: XXXXXX)”. This appears to be working however it is not returning everything from Registry. For Example, for this app I need the ProductCode. I use to just pipe “Select-Property -ExpandProperty ProductCode” and that would get me the GUID. This doesnt appear to be working due to possibly not querying everything from the Registry. Any Ideas? I can always just use raw powershell however I would like to take advantage of the cmdlet. Thanks

Please mention which version of V4 you are using.

Get-ADTApplication is only going to return the ProductCode for MSI applications. Is the app in question an MSI?

I am using the latest 4.0.5

It is an EXE. I just used v3 to run essentially the same code on the same application that I’m working on and it got me the ProductCode as it should. So maybe V4 just wont grab that info anymore?

v3 - (Get-InstalledApplication -Name “$appName”) | Select-Object -ExpandProperty ProductCode
v4 - (Get-ADTApplication -Name $($adtSession.AppName) | Select-Object -ExpandProperty ProductCode

That’s right, v3 would return anything that looked like a ProductCode as the ProductCode value, but a ProductCode implies the installation type is an MSI. In v4, we filter that out properly so that ProductCode is only returned with MSI applications.

Regrettably there was a lot of loose behaviour in v3, and this is one area we’ve correctly tightened up.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.