Search code examples
powershellwindows-8windows-8.1sideloading

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.


Solution

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