How to Install an MSIX Package for All Users Using PowerShell
要想在计算机系统上对所有用户进行 MSIX 应用包的预配,统一且官方的方案就是使用 这一 PowerShell 命令。这一过程必须在一个 以管理员身份运行 的 PowerShell 窗口中进行。
Provisioning guarantees that new users get the app upon login. To force the app to register immediately for all currently logged-in profiles without waiting for a re-login, execute this command: powershell Get-AppxPackage -AllUsers -Name "*YourAppName*" Use code with caution. How to Remove a Provisioned MSIX Package install msix powershell all users
foreach ($u in $users) $profilePath = $u.ProfileImagePath $appData = Join-Path $profilePath "AppData\Local\Packages" if (Test-Path $profilePath) Write-Output "Installing for $profilePath" $command = "Add-AppxPackage -Path `"$msixPath`" -ForceApplicationShutdown" Start-Process -FilePath "powershell.exe" -ArgumentList "-NoProfile -WindowStyle Hidden -Command $command" -Credential (New-Object System.Management.Automation.PSCredential($u.PSChildName,(ConvertTo-SecureString 'TempPass' -AsPlainText -Force))) -Wait
However, system administrators frequently need to install applications for on a shared workstation, VDI environment, or laboratory machine. How to Install an MSIX Package for All
The package is registered only in the specific user's profile. Other users logging into the same computer cannot see or run the application.
Run the following command to see if your application appears in the system-wide staging list: powershell The package is registered only in the specific
In the modern Windows ecosystem, is the future of application packaging. Designed as a successor to traditional MSI, App-V, and even ClickOnce, MSIX offers a clean, secure, and reliable installation experience. However, one of the most common pain points for IT administrators and power users is deployment scope.
: To uninstall the package so it no longer appears for new users:
Add-AppxProvisionedPackage -Online ` -PackagePath "C:\Deploy\MainApp.msix" ` -DependencyPackagePath "C:\Deploy\VCLibs.msix", "C:\Deploy\NETRuntime.msix" ` -SkipLicense Use code with caution.
Open PowerShell as Administrator.