Check if app version is installed before running Add-AppxPackage

4.1k Views Asked by At

I have a script that run everytime the user logs on. The script installs a sideloade app. I am running into a problem when the app has already been installed. If the app is already installed the app state is deleted. How can I check if the app version has already been installed before installing using Add-AppxPackage.

1

There are 1 best solutions below

0
On BEST ANSWER
$currentVersion = (Get-AppxPackage -Name com.domain.app).Version