I found a PowerShell script command that works as long as the radio button is ticked to "Update apps automatically" in the Windows store:
Code:
$namespaceName = "root\cimv2\mdm\dmmap"
$className = "MDM_EnterpriseModernAppManagement_AppManagement01"
$wmiObj = Get-WmiObject -Namespace $namespaceName -Class $className
$result = $wmiObj.UpdateScanMethod()
Funny thing is, it is for the Enterprise editions of Windows and yet it works on Windows 10 Home. I verified it is working because when I ran the script, I opened the store and the pending updates were downloading automatically.
First, I verified that there were pending updates by opening the Microsoft Store; and of course they were just sitting there waiting to be forced manually by the "update all" button. I then closed the store and ran the script in an Administrative PowerShell environment.
I then immediately opened the store while the script was running and found that the updates were downloading like they are suppose to be doing in the first place when you have the "Update apps automatically" button clicked on.
It is the same amount of button clicks to open PowerShell and paste the command script as it is to open the store and download the updates manually; but at least now I know that only the apps I have installed are being updated without having to open the store at all; which is the point of having the "Update apps automatically" button clicked on in the first place that doesn't work by itself for some reason.
To further automate this, I will play around with the task scheduler and try making a batch script from the PowerShell script that runs the task once a day at login to fully automate the "check for" and "update all" store updates procedure.
I don't think a batch script will do it though because the PowerShell script contains arguments that can't be excluded when creating the task. The PowerShell script does two things from what I can tell. First it scans and then it contains the code that is equivalent to clicking the "Update all" button in the Windows Store.
So at this point, I don't think a batch script will do it when inserted as a task in the task scheduler.