DEV Community

Kai Walter
Kai Walter

Posted on • Updated on

download Windows Store apps with PowerShell over

Especially in enterprise environments installing apps from Windows Store is turned off. One workaround is web site - courtesy of @rgadguard & mkuba50 - which can be used to download files related to a particular store app.

How to find a product URL

  • go into store (probably on a machine where store is not locked)
  • search for app
  • click Share
  • Copy Link
  • paste into input field right of URL Link

Alt Text


I created this script where I can use the product URL obtained above and download a set of related files for a local install:

$apiUrl = ""

$productUrl = "" # To Do
#$productUrl = "" # Whiteboard
#$productUrl = "" # Wireless Display Adapter

$downloadFolder = Join-Path $env:TEMP "StoreDownloads"
if(!(Test-Path $downloadFolder -PathType Container)) {
    New-Item $downloadFolder -ItemType Directory -Force

$body = @{
    type = 'url'
    url  = $productUrl
    ring = 'RP'
    lang = 'en-US'

$raw = Invoke-RestMethod -Method Post -Uri $apiUrl -ContentType 'application/x-www-form-urlencoded' -Body $body

$raw | Select-String '<tr style.*<a href=\"(?<url>.*)"\s.*>(?<text>.*)<\/a>' -AllMatches|
 % { $_.Matches } |
 % { 
    $url = $_.Groups[1].Value
    $text = $_.Groups[2].Value
    Write-Host $text

    if($text -match "_(x86|x64|neutral).*appx(|bundle)$") {
        $downloadFile = Join-Path $downloadFolder $text
        if(!(Test-Path $downloadFile)) {
            Invoke-WebRequest -Uri $url -OutFile $downloadFile

Enter fullscreen mode Exit fullscreen mode

Top comments (7)

jarrodmast profile image
Jarrod Mast

Just tested and this worked well much thanks!
Lines 22 and 23 are starting with a pipe to continue the previous line, this is supported in PowerShell 7 but not older versions. Quick fix is to move the pipe to end of previous line.

kaiwalter profile image
Kai Walter

Thanks Jarrod!

fruex profile image

It doesn't work for me (2021-03-24)

kaiwalter profile image
Kai Walter

I just tested with PowerShell Windows (thanks @jarrodmast) + 7.2.2 and script is working on my machine. Do you receive any error or have any other indication what is not working?

farag2 profile image
farag2 • Edited has blocked the ability to download anything using their parser since March. Also they enabled Cloudflare firewall. So download packages manually is the only thing we can now.
We found it out when realized that our SophiApp stopped downloading the HEVC codec. had to upload the packaged to the GitHub repo.

kaiwalter profile image
Kai Walter

Thanks for the information. I didn't notice as in the past months I was using winget to download MS store apps on my corporate machine.

Thread Thread
farag2 profile image

It started working again...