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.
$currentVersion = (Get-AppxPackage -Name com.domain.app).Version