Remote-Friendly Microsoft Store App Installs

Remote-Friendly Microsoft Store App Installs

Published by mkadmin on 9 October 2023

๐Ÿ› ๏ธ Remote-Friendly Microsoft Store App Installs — My PowerShell Script for RMM Environments

As an automation engineer and creative technologist, I’ve spent a lot of time streamlining infrastructure and building tools that actually respect the user. One persistent headache in the RMM world? Installing Microsoft Store apps remotely, reliably, and in the correct user context.

So I built a solution.

Introducing my PowerShell script:
๐Ÿ‘‰ MS-Store-App-Install-Powershell-RMM-Friendly

This script is designed to make Store app deployment seamless across platforms like Datto RMM, Tactical RMM, or any environment where remote execution and user context matter.

๐Ÿ’ก Why I Built It

Microsoft Store apps are notoriously tricky to install via automation — especially when you’re working outside the local user session. I needed a way to:

  • Install apps silently and reliably
  • Run in the correct user context (not SYSTEM)
  • Feed back install results to my RMM platform
  • Support both Store IDs and WinGet packages
  • Avoid clunky workarounds or brittle scripts

So I wrote a PowerShell script that does exactly that — and I’ve battle-tested it across multiple environments.

๐Ÿ” What It Does

  • โœ… Uses Kelvin Tegelaar’s RunAsUser module to execute in the logged-in user’s context
  • ๐Ÿ“ฆ Supports both Microsoft Store IDs and WinGet installs
  • ๐Ÿ”„ Accepts App IDs via environment variables for flexible deployment
  • ๐Ÿ“Š Outputs install results for easy logging and monitoring
  • ๐Ÿง  Includes robust error handling and fallback logic

Here’s a quick example of supported apps:

App Name

Store ID

Microsoft Photos

9WZDNCRFJBH4

Company Portal

9WZDNCRFJ3PZ

Microsoft 365 (Office)

9WZDNCRD29V9

Adobe Acrobat Reader

XPDP273C0XHQH2

WhatsApp

9NKSQGP7F2NH

Zoom

XP99J3KP4XZ4VV

You can pass the App ID as an environment variable, and the script handles the rest — including context switching and result reporting.

๐Ÿงช Tested and Trusted

I’ve tested this script across:

  • โœ… Datto RMM
  • โœ… Tactical RMM
  • โœ… Standard PowerShell environments with active user sessions

It’s been updated regularly to reflect real-world feedback and evolving best practices. The latest version includes expanded WinGet support and improved diagnostics.

๐ŸŒ Why It Matters

If you’re managing Windows endpoints and want a clean, scalable way to deploy Store apps remotely — without sacrificing control or visibility — this script is for you. It’s built with transparency, reliability, and user empowerment in mind.

Feel free to fork it, contribute, or just use it as-is. I built it to solve a real problem, and I’m sharing it in the hope it helps others do the same.

๐Ÿ‘‰ Check it out here: GitHub Repo
And if it saves you time or headaches, a โญ goes a long way.