If you need to remove an application completely from the environment, you must remove both the active user registrations and the system-wide provisioning. Failing to remove the provisioned package will cause the app to reinstall itself whenever a new user logs in.
If you need help tailoring this deployment for a specific platform, let me know:
# Find the exact PackageName $App = Get-AppxProvisionedPackage -Online | Where-Object $_.DisplayName -like "*YourAppName*" # Remove it from the system provisioning layer Remove-AppxProvisionedPackage -Online -PackageName $App.PackageName Use code with caution. install msix powershell all users
$packageInfo = Get-AppxProvisionedPackage -Online | Where-Object $_.DisplayName -like " YourAppName " if ($packageInfo) Write-Host "Provisioned package verified: $($packageInfo.DisplayName)"
.\Install-MsixAllUsers.ps1 -MsixPath "C:\MyApp.msix" If you need to remove an application completely
.\Install-MsixAllUsers.ps1 -MsixPath "C:\Apps\MyBusinessApp.msix"
# Install certificate to Trusted Root store (machine-wide) Import-Certificate -FilePath ".\yourApp.cer" -CertStoreLocation "Cert:\LocalMachine\Root" install msix powershell all users
How to Install an MSIX Package for All Users Using PowerShell
-Online : Installs the package on the current running operating system. -PackagePath : Specifies the path to the MSIX file.