Update Micorosoft Store and Store Apps with command line?

~OSD~ 2,201 Reputation points
2022-09-05T09:31:41.387+00:00

237757-image.png

Hi

To update Microsoft Store and Store Apps, I navigate to the Store and select "Get Updates", like above screenshot.

Question: Is there any possibility to achieve the same with Command Line /Power Shell or DISM?

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
12,074 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
11,480 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,628 questions
0 comments No comments
{count} votes

5 answers

Sort by: Most helpful
  1. S.Sengupta 23,091 Reputation points MVP
    2022-09-06T00:07:43.437+00:00

    Open Command Prompt or, PowerShell as Admin and type this command to list all the apps with updates on Windows 11 and press Enter:

    winget upgrade

    Ref: upgrade command (winget)

    3 people found this answer helpful.

  2. S.Sengupta 23,091 Reputation points MVP
    2022-11-27T02:00:07.937+00:00

    There is no way to skip 2 letter geolocation thing using Winget command. If you use Y [Yes] it will move to the next step.

    2 people found this answer helpful.
    0 comments No comments

  3. JohnJJakus-7815 5 Reputation points
    2025-03-18T18:24:48.9166667+00:00

    I have been using winget from within Crowdstike and Intune Remediation. Few tips I have learned.

    1. In an automation environment with install/upgrade always add:
      1. --id - use this instead of name, it has a higher chance of success
      2. --silent - so you don't disburb users with the update
      3. --accept-package-agreements - this bypasses the questions about 2 letter geolocation
      4. --accept-source-agreements - this bypasses the questions about 2 letter geolocation
      5. --exact - this mitigates situation where there may be 2 products with similar names or IDs
      6. --source - not always needed but it sometimes will error if the product is in both msstore and winget.
      7. --uninstall-previous - This is not always necessary but sometime the old version is left behind or a product won't upgrade. I found using this with the Install resolves the issues.
    2. In an automation environment with install/upgrade product may need to stay at a certain level for compatibility with a solution or may be managed by another app like Office with a channel. In these situation pin the product so the automation script does not hang or error out
      1. winget pin add --id IdofProduct - pins product so automatic updates skip it
      2. winget pin remove --id IdofProduct - removes pin
      3. winget pin -? - to see all commands
      4. winget upgrade --include-pinned - use this with the upgrade to specifically upgrade a pined product.
      5. Be cautious on security of the app.
    3. If you install/upgrade pick the correct product. Research the best one. Examples:
      1. winget search -q Chrome - this may come up with a large list
        1. The Chrome with the ID Google.Chrome installs with the msi installer
        2. The Chrome with the ID Google.Chrome.EXE installs with the exe installer
        3. From research the exe installer is better for automation but either works fine.
    4. If your EDR shows that a product contains vulnerabilities, but you have the latest or it won't upgrade. Check the installed versions:
      1. winget list -q Edge
        1. You may see that two versions are install one with the id related to the source and one that starts with msix\path to file.
        2. The one that starts with msix may be the one out of date. Just use winget uninstall --id IdOfAppx
    5. Sometime the sources get corrupt or there may be malware interference
      1. winget source reset --force - resets the sources to the default

    Hope these tips help anyone with using winget.

    1 person found this answer helpful.
    0 comments No comments

  4. Ro Social 0 Reputation points
    2023-08-03T13:53:27.2733333+00:00

    actually, an more easy way is to use Windows update!

    on your pc go to settings > windows updates

    check for updates and install them


  5. Johnathan Myers 0 Reputation points
    2024-08-01T21:03:22.8966667+00:00

    I'm kind of late to the party here, but thought it's worth mentioning the use of Microsoft Power Automate. It allows you to record your mouse actions and save them to a "flow" that can be run.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.