Created
October 5, 2022 19:40
-
-
Save wise-io/70687623206a4175ca591bccc8971e7f to your computer and use it in GitHub Desktop.
PowerShell script to initiate Microsoft Store application updates.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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