If you prefer command prompt or batch scripts, you can use the DISM tool directly:
dism /Online /Add-ProvisionedAppxPackage /PackagePath:"C:\MyApp.msix" /SkipLicense
This is functionally identical to Add-AppxProvisionedPackage. Choose whichever fits your scripting environment.
Solution: The signing certificate isn't trusted system-wide. Install the .cer file to Local Machine > Trusted People: install msix powershell all users
Import-Certificate -FilePath "C:\Path\To\Certificate.cer" -CertStoreLocation Cert:\LocalMachine\TrustedPeople
Example:
Add-AppxProvisionedPackage -Online -FolderPath "D:\Deployments\MyApp.msix" -SkipLicense
After running this, the system will:
Get-AppxProvisionedPackage -Online | Where-Object $_.PackageName -like "AppName" | Remove-AppxProvisionedPackage -Online
To install an MSIX package for all users, you need to use the -AllUsers parameter with Add-AppxPackage. Here's how: If you prefer command prompt or batch scripts,
Add-AppxPackage -AllUsers -Path "C:\Path\To\YourApp.msix"
This command requires administrative privileges to execute.