Sometimes you have the need to do an offline installation of a Windows Store application or have it installed during OS Deployment.
One tool that has been widely used by the community for this is WinGet and WinGet has sure become better and better throughout the years.
It now even has a download option which is a very welcomed addition.
But what if you can't use WinGet or if the app that you need doesn’t support downloading using it?
This is where "Get-StoreURLs" comes into play. "Get-StoreURLs" was created back in Nov 2023, it has worked ever since and is now publicly available to everyone!
Get-StoreURLs uses Microsoft's own web API to get direct download links for any Microsoft Store application.
These links are only valid for a limited amount of time and need to be generated on the go.
That's also why there are two built-in functions to start downloading the files.
You can either use "-DoDownload" as a param to the function or $_.Download() on the output objects that you want to download. "-DoDownload" is used to automatically download the files in the found URLs. The URLs are only valid for a short amount of time, as I previously wrote, so this is probably something you'd like to do.
You can also use "-Architecture" to filter the URLs that you want the function to return. "-Architecture" also works with "-DoDownload". Use this filter to only include URLs of the chosen architecture (and neutral ones). No need to get the URLs for arm64, nor download the files, if you know the target for the application will be Windows x64.
You can get the script here:
Scripts/OSD/GetStoreURL.ps1 at master · MattiasC85/Scripts