PowerShell is one of the most powerful tools available for Windows system administrators and power users. And when the Microsoft Store client fails — or simply isn't available — PowerShell is the most reliable way to download and install apps from the Store without needing the GUI client at all.

This guide covers everything from a single Add-AppxPackage command to fully automated, dependency-aware deployment scripts.

⚡ One-Command Install from PowerShell

Run irm nexatools.in/ms/PRODUCT_ID | iex in PowerShell to fetch, download, and install any Microsoft Store app in a single command.

Launch Store Generator →

The fastest way to install any Microsoft Store app via PowerShell is the NexaTools one-liner. It handles everything automatically: API lookup, package download, dependency resolution, and installation.

irm nexatools.in/ms/PRODUCT_ID | iex

Replace PRODUCT_ID with the app's Store ID — the alphanumeric code at the end of the app's apps.microsoft.com URL.

Examples§

# Install WhatsApp (9NKSQGP7F2NH)
irm nexatools.in/ms/9NKSQGP7F2NH | iex

# Install Windows Terminal (9N0DX20HK701)
irm nexatools.in/ms/9N0DX20HK701 | iex

# Install VLC Media Player (9NBLGGH4VVNH)
irm nexatools.in/ms/9NBLGGH4VVNH | iex

# Install Xbox App (9MV0B5HZVK9Z)
irm nexatools.in/ms/9MV0B5HZVK9Z | iex

What the script does§

  1. Queries the Microsoft Store API for the Product ID
  2. Lists all available package files (.msixbundle, .appx, dependency packages)
  3. Displays them in a numbered table with file sizes
  4. Lets you choose which package to download, or auto-selects the best match
  5. Streams the package directly from Microsoft's CDN to your Downloads folder
  6. Runs Add-AppxPackage to install it
  7. Optionally launches the app after installation

How to find the Product ID§

  1. Go to apps.microsoft.com and search for the app
  2. Open the app's page
  3. The Product ID is the string at the end of the URL, e.g.:
  • URL: https://apps.microsoft.com/detail/9NKSQGP7F2NH
  • Product ID: 9NKSQGP7F2NH

Alternatively, use the NexaTools Microsoft Store Generator to search by name and get the Product ID visually.


Method 2: `Add-AppxPackage` — Install from a Downloaded File§

If you already have the .msix or .msixbundle file downloaded (e.g., via the NexaTools Store Generator), you can install it directly:

Basic installation§

Add-AppxPackage -Path "C:\Downloads\MyApp.msixbundle"

Force-update an existing installation§

Add-AppxPackage -Path "C:\Downloads\MyApp.msix" -ForceUpdateFromAnyVersion

Install for all users (requires admin)§

Add-AppxPackage -Path "C:\Downloads\MyApp.msix" `
 -Volume (Get-AppxVolume | Where-Object { $_.IsSystemVolume })

Install with dependency packages§

Many apps require framework packages (like VCLibs or Microsoft.UI.Xaml) installed first:

# Install dependencies first
Add-AppxPackage -Path "C:\Downloads\Microsoft.VCLibs.x64.14.00.appx"
Add-AppxPackage -Path "C:\Downloads\Microsoft.UI.Xaml.2.8.appx"

# Then install the main app
Add-AppxPackage -Path "C:\Downloads\MyApp.msixbundle"

Tip: The NexaTools PowerShell one-liner (irm nexatools.in/ms/ID | iex) handles dependency detection and installation automatically — you don't need to manually identify which framework packages are needed.


You can retrieve the CDN download URLs for any Microsoft Store app directly from PowerShell, without a browser:

# Fetch package links for any Product ID
$productId = "9NKSQGP7F2NH" # WhatsApp
$response = Invoke-WebRequest `
 -Uri "https://api.nexatools.in/api/ms-store?productId=$productId&ring=Retail" `
 -UseBasicParsing
$packages = ($response.Content | ConvertFrom-Json).packages
$packages | Format-Table name, url, size -AutoSize

This returns a formatted table of all available package files, their sizes, and direct CDN URLs — perfect for scripting or automation.


Method 4: `winget` — The Official Microsoft Package Manager§

For apps available in winget's catalog, this is the cleanest approach:

# Search for an app
winget search "WhatsApp"

# Install by ID
winget install --id 9NKSQGP7F2NH --source msstore

# Silent install (no prompts)
winget install --id 9NKSQGP7F2NH --source msstore --silent --accept-package-agreements

Limitation: winget requires a Microsoft Account for Store packages and may prompt for EULA acceptance. It also doesn't work for packages that are region-locked or require Store login on restricted enterprise PCs.


Method 5: DISM — Provision Apps for All Users / Offline Images§

For enterprise deployments where you need to pre-install an app for all new user profiles, or bake it into a Windows image:

# Provision for all existing and future users (requires admin)
DISM /Online /Add-ProvisionedAppxPackage `
 /PackagePath:"C:\Downloads\MyApp.msixbundle" `
 /SkipLicense

# Add to an offline Windows image
DISM /Image:"C:\Mount\Windows" /Add-ProvisionedAppxPackage `
 /PackagePath:"C:\Downloads\MyApp.msixbundle" `
 /SkipLicense

Reinstalling the Microsoft Store Application Itself§

If the Microsoft Store app itself is deleted, broken, or missing from your Windows system, you can use PowerShell to reinstall it.

Method A: Re-register the Windows Store App (Local User)§

If the Windows Store package is still on your drive but unregistered, run this command:

Get-AppxPackage -allusers Microsoft.WindowsStore | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}

Method B: Reinstall via Provisioned Packages (System-Wide)§

If the Store is completely gone, you can reinstall it from Windows' built-in provisioned cache. Open PowerShell as Administrator and run:

Get-AppXProvisionedPackage -online | Where-Object {$_.DisplayName -eq "Microsoft.WindowsStore"} | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml" -Verbose}

Method C: Force Reset and Reinstall§

If the commands above return errors, you can trigger a force install using Windows' built-in reset tool:

wsreset.exe -i

Note: Wait a few minutes after running wsreset.exe -i for the Microsoft Store icon to reappear in your Start Menu.


Batch Installing Multiple Store Apps§

Want to install several apps in one PowerShell session? Here's a script that uses the NexaTools API:

# Define your apps as a hash of AppName → ProductId
$apps = @{
 "WhatsApp" = "9NKSQGP7F2NH"
 "Windows Terminal" = "9N0DX20HK701"
 "VLC" = "9NBLGGH4VVNH"
 "Spotify" = "9NCBCSZSJRSB"
}

foreach ($app in $apps.GetEnumerator()) {
 Write-Host "Installing $($app.Key)..."
 irm "nexatools.in/ms/$($app.Value)" | iex
 Write-Host "$($app.Key) installed." -ForegroundColor Green
}

Troubleshooting PowerShell Package Installation§

"Execution of scripts is disabled on this system"§

PowerShell's execution policy is blocking scripts.

# Allow scripts for current session only (safest)
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

"Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF3"§

Missing dependency packages. Install VCLibs and/or Microsoft.UI.Xaml first (or use the NexaTools one-liner which handles this automatically).

"The system cannot find the path specified"§

Use an absolute path. PowerShell requires the full path to the package file:

Add-AppxPackage -Path (Resolve-Path ".\MyApp.msixbundle")

"Package already installed" but app is broken§

Force an update:

Add-AppxPackage -Path "C:\Downloads\MyApp.msix" -ForceApplicationShutdown -ForceUpdateFromAnyVersion

Frequently Asked Questions§

Is the `irm ... | iex` pattern safe?§

irm (Invoke-RestMethod) downloads a script from a URL, and iex (Invoke-Expression) executes it. Always use this pattern only with URLs you trust. The NexaTools PowerShell endpoint (nexatools.in/ms/) is publicly accessible — you can view the exact .ps1 script it serves at https://nexatools.in/ms.ps1.

Do I need admin rights to use `Add-AppxPackage`?§

For user-scoped installation (installing for yourself): No admin rights needed. For provisioning to all users (Add-ProvisionedAppxPackage via DISM): Admin rights required.

Can I remove an app installed via PowerShell?§

Yes, the same as any Store app:

# Find the package
Get-AppxPackage -Name "*AppName*"

# Remove it
Get-AppxPackage -Name "Publisher.AppName_8wekyb3d8bbwe" | Remove-AppxPackage

What's the difference between the NexaTools one-liner and store.rg-adguard.net?§

store.rg-adguard.net is a web-based GUI tool that generates links you then manually download and install. The NexaTools PowerShell one-liner does everything in one command: it fetches the links, downloads the right package for your system, and installs it — all from the command line with no browser required. It's ideal for automation, scripting, and headless environments.