The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Microsoft Store: update all apps from the command-line

Posted by jpluimers on 2023/09/12

TL;DR

I have converted the below PowerShell one-liner into this batch file (the ^| syntax is to ensure the pipe runs within PowerShell, not within the batch file):

PowerShell 'Get-CimInstance -Namespace "Root\cimv2\mdm\dmmap" -ClassName "MDM_EnterpriseModernAppManagement_AppManagement01" ^| Invoke-CimMethod
 -MethodName UpdateScanMethod'

The why and how

Since I am a CLI person, and some Windows applications are only available on the Microsoft Store, I wanted to be able to initiate an update cycle from the command-line interface.

So I searched for [Wayback/Archive] microsoft store update all apps from the command-line – Google Search and found these to be valuable:

Methods used in the above code snippets:

Searching with [Wayback/Archive] MDM_EnterpriseModernAppManagement_AppManagement01 UpdateScanMethod – Google Search, I found the method is in the documentation but lacks details:

Related

These previous blog posts are related:

–jeroen

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.