d0001
d0001

Reputation: 2190

Check if app version is installed before running Add-AppxPackage

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.

Upvotes: 0

Views: 4337

Answers (1)

d0001
d0001

Reputation: 2190

$currentVersion = (Get-AppxPackage -Name com.domain.app).Version 

Upvotes: 2

Related Questions