Skip to content

Instantly share code, notes, and snippets.

@wise-io
Created October 5, 2022 19:40
Show Gist options
  • Save wise-io/70687623206a4175ca591bccc8971e7f to your computer and use it in GitHub Desktop.
Save wise-io/70687623206a4175ca591bccc8971e7f to your computer and use it in GitHub Desktop.
PowerShell script to initiate Microsoft Store application updates.
# Runs an update check for Microsoft Store apps
###Requires -RunSilent
$namespaceName = "root\cimv2\mdm\dmmap"
$className = "MDM_EnterpriseModernAppManagement_AppManagement01"
$wmiObj = Get-WmiObject -Namespace $namespaceName -Class $className
$result = $wmiObj.UpdateScanMethod()
if ($result.ReturnValue -ne 0) { $result }
else { Write-Output 'Microsoft Store update scan started.' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment