Powershell to update microsoft store applications

hi, if you read my previous post, you know that there is no update-appxpackage powershell command. So my next question is…is there a way (or script) to update Microsoft store applications? it is quite a mess given that each user on a computer can have their own (sometimes old) version of an app.
We regularly run Nessus scans, and it is constantly complaining about outdated apps (3D Viewer etc).

thanks in advance

I thought that MSFT Store apps update themselves when the profile in which they are installed is actively used. :thinking:

Does this happen even for actively used profiles?

Edit:

I googled a little bit … found this:

right, so that is the key phrase “active users” in my environment, it is not uncommon to have a user login to another computer once or twice and then not again…so the app is there and even if another “active” user gets the updated app…that first user never will and both old and new versions of the app are now on the computer…this is what i am trying to work through…

i will take a look at your link, thanks!

So you’re looking for a solution for the wrong issue. I’d recommend to remove unused profiles. :man_shrugging:

1 Like

If what you say is true then there is no “updating” the app, you just need to install the new and remove the old. Either way it seems you might want to reconsider what actual real world problem you are trying to solve. What issues have occurred that even led to this endeavor?

1 Like

the real-world problem i have; is that in this situation (which i have many of) Nessus is complaining about outdated apps installed on the computer…the apps will not update unless the user logs in…which in some cases they are not.

i suppose one way to handle this is to delete old profiles…but that seems messy…what constitutes an old profile? i would need a committee to decide that (LOL)

i really feel the right way to do this is to make sure all the apps are updated even if the user does not log in…i think this was short-sightedness on Microsoft’s part but what i am coming to understand, is that there is no way to do it the way i want.

update-appxpackage…if only!

If it’s not used for a certain amount of time … :man_shrugging: … that’s everything else than hard to decide … :man_shrugging: :man_shrugging:

Having gone through user profile removal coding before, there are only a couple of commands to do it:

Get-CimInstance -ClassName Win32_UserProfile
Remove-CimInstance

You could filter by the localpath for the user profiles that are showing up on your report and clean up those profiles.

1 Like

Oh and heaven forbid I mention this, but I do believe Roaming Profiles would also solve this problem :grimacing:

Please don’t!!! :rightwards_pushing_hand:

Roaming profiles have been a bad idea from the beginning and actually only work with terminal servers or VDI.
If you really need to have parts of the Windows profiles moving from one machine to another use folder redirection instead. But I’d recommend not to include the appdata folder!!!

Olaf, I posted as a joke :slight_smile: I totally agree with you, although, in theory, they should solve the problem.

I haven’t been sure about that. Humor or especially irony sometimes does not work well when it’s written. And some of us are not native english speakers. :man_shrugging:

Understood. Wont happen again. Thanks. :grimacing:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.