Reset-AppxPackage

Page 1 of 2 12 LastLast

  1. Posts : 10
    Windows 10
       #1

    Reset-AppxPackage


    Hello,

    I am trying to find a way to reset some of my favourite apps easier with just a command.
    I have been told that powershell now supports that, by using the Reset-AppxPackage command of AppX module.
    But you need to have the latest windows builds because it has been added in July of 2020.
    I do have the latest version windows 10 available to me.

    Windows 10 Enterprise
    21H2
    19044.1348
    Windows Feature Experience Pack
    120.2212.3920.0

    But the command is missing from the AppX module for me in 21H2.

    Why I don't get this command in 21H2?
    Is there any way to install it? There isn't any newer version of Windows to update for having it.
    This is what I get as available commands in powershell, no Reset-AppxPackage

    I would appreciate any useful tips, thank you!


    Code:
    Windows PowerShell
    Copyright (C) Microsoft Corporation. All rights reserved.
    
    Try the new cross-platform PowerShell https://aka.ms/pscore6
    
    PS C:\WINDOWS\system32> Get-Command -Module Appx
    
    CommandType     Name                                               Version    Source
    -----------     ----                                               -------    ------
    Alias           Add-AppPackage                                     2.0.1.0    Appx
    Alias           Add-AppPackageVolume                               2.0.1.0    Appx
    Alias           Dismount-AppPackageVolume                          2.0.1.0    Appx
    Alias           Get-AppPackage                                     2.0.1.0    Appx
    Alias           Get-AppPackageLastError                            2.0.1.0    Appx
    Alias           Get-AppPackageLog                                  2.0.1.0    Appx
    Alias           Get-AppPackageManifest                             2.0.1.0    Appx
    Alias           Get-AppPackageVolume                               2.0.1.0    Appx
    Alias           Mount-AppPackageVolume                             2.0.1.0    Appx
    Alias           Move-AppPackage                                    2.0.1.0    Appx
    Alias           Remove-AppPackage                                  2.0.1.0    Appx
    Alias           Remove-AppPackageVolume                            2.0.1.0    Appx
    Alias           Set-AppPackageDefaultVolume                        2.0.1.0    Appx
    Function        Get-AppxLastError                                  2.0.1.0    Appx
    Function        Get-AppxLog                                        2.0.1.0    Appx
    Cmdlet          Add-AppxPackage                                    2.0.1.0    Appx
    Cmdlet          Add-AppxVolume                                     2.0.1.0    Appx
    Cmdlet          Dismount-AppxVolume                                2.0.1.0    Appx
    Cmdlet          Get-AppxDefaultVolume                              2.0.1.0    Appx
    Cmdlet          Get-AppxPackage                                    2.0.1.0    Appx
    Cmdlet          Get-AppxPackageManifest                            2.0.1.0    Appx
    Cmdlet          Get-AppxVolume                                     2.0.1.0    Appx
    Cmdlet          Invoke-CommandInDesktopPackage                     2.0.1.0    Appx
    Cmdlet          Mount-AppxVolume                                   2.0.1.0    Appx
    Cmdlet          Move-AppxPackage                                   2.0.1.0    Appx
    Cmdlet          Remove-AppxPackage                                 2.0.1.0    Appx
    Cmdlet          Remove-AppxVolume                                  2.0.1.0    Appx
    Cmdlet          Set-AppxDefaultVolume                              2.0.1.0    Appx
      My Computer


  2. Posts : 21,421
    19044.1586 - 21H2 Pro x64
       #2

    Hello olympus1 and welcome to TF ,

    See Reset a Store App in Windows 10 Using PowerShell

    Exactly what you want to do.


    EDIT: Wait, I see it's not working for me either
      My Computer


  3. Posts : 21,421
    19044.1586 - 21H2 Pro x64
       #3
      My Computer


  4. Posts : 10
    Windows 10
    Thread Starter
       #4

    steve108 said:
    Hello olympus1 and welcome to TF ,

    See Reset a Store App in Windows 10 Using PowerShell

    Exactly what you want to do.
    Thank you for your instant reply

    I have followed this guide and I get that Reset-AppxPackage is not recognized.
    But it should be, I am on the latest version of Windows (21H2).

    Code:
    Windows PowerShell
    Copyright (C) Microsoft Corporation. All rights reserved.
    
    Try the new cross-platform PowerShell https://aka.ms/pscore6
    
    PS C:\WINDOWS\system32> Get-AppxPackage Microsoft.WindowsCalculator | Reset-AppxPackage
    Reset-AppxPackage : The term 'Reset-AppxPackage' is not recognized as the name of a cmdlet, function, script file, or o
    perable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try aga
    in.
    At line:1 char:47
    + Get-AppxPackage Microsoft.WindowsCalculator | Reset-AppxPackage
    +                                               ~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (Reset-AppxPackage:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
    
    PS C:\WINDOWS\system32>
      My Computer


  5. Posts : 21,421
    19044.1586 - 21H2 Pro x64
       #5

    Sorry, see my revised post and following post - I got the same error as you, but last post has a different way that should work
      My Computer


  6. Posts : 10
    Windows 10
    Thread Starter
       #6

    steve108 said:
    Sorry, see my revised post and following post - I got the same error as you, but last post has a different way that should work
    It doesn't seem to work for me
    I have tried it in an non Microsoft app like Candy Crush with stores information data

    PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage king.com.CandyCrushSaga).InstallLocation + '\AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

    But it doesn't do what the reset button does to the app, clear all data and ask me to login again.
    I think I will end up trying to make an Autoit script for automating the process.. this is something I would like to avoid

    Thank you again for your instant replies, it means a lot to me.
      My Computer


  7. Posts : 21,421
    19044.1586 - 21H2 Pro x64
       #7

    Code:
    Get-AppxPackage | Select-String -Pattern "search"
    
    output:
    Microsoft.Windows.Search_1.14.2.19041_neutral_neutral_cw5n1h2txyewy
    If you change string in quotes from search to the app you've got installed/looking for, does it find it and show an output?

    You can also list all the appxs using Get-AppxPackage and redirect the output to a file so you can search through it.
      My Computer


  8. Posts : 10
    Windows 10
    Thread Starter
       #8

    steve108 said:
    Code:
    Get-AppxPackage | Select-String -Pattern "search"
    
    output:
    Microsoft.Windows.Search_1.14.2.19041_neutral_neutral_cw5n1h2txyewy
    If you change string in quotes from search to the app you've got installed/looking for, does it find it and show an output?

    You can also list all the appxs using Get-AppxPackage and redirect the output to a file so you can search through it.
    Yes, I am getting it

    PS C:\WINDOWS\system32> Get-AppxPackage | Select-String -Pattern "king.com.CandyCrushSaga"

    king.com.CandyCrushSaga_1.2150.1.0_x86__kgqvnymyfvs32

    I have tried this too, the xml exists, I have opened it in notepad.

    Add-AppxPackage -DisableDevelopmentMode -Register "C:\Program Files\WindowsApps\king.com.CandyCrushSaga_1.2150.1.0_x86__kgqvnymyfvs32\AppxManifest.xml"

    - - - Updated - - -

    steve108 said:
    Code:
    Get-AppxPackage | Select-String -Pattern "search"
    
    output:
    Microsoft.Windows.Search_1.14.2.19041_neutral_neutral_cw5n1h2txyewy
    If you change string in quotes from search to the app you've got installed/looking for, does it find it and show an output?

    You can also list all the appxs using Get-AppxPackage and redirect the output to a file so you can search through it.

    Btw, is there any way to at least open the setting page of an uwp app (the page where the reset button is) directly?
    ms-settings:appsfeatures lists all available apps
    I could at least open the settings page of the app without having to navigate to all settings and press the reset button manually or with Autoit.
      My Computer


  9. Posts : 21,421
    19044.1586 - 21H2 Pro x64
       #9

    Okay, let's see what @Brink says.

    I posted in How to Reset Settings App in Windows 10
      My Computer


  10. Posts : 10
    Windows 10
    Thread Starter
       #10

    steve108 said:
    Okay, let's see what @Brink says.

    I posted in How to Reset Settings App in Windows 10
    I ended up with something like that and I run it as admin.
    It deletes the folder where the cache is and it opens the app after to fix some broken stuff.
    It's hacky, it's awful and not the proper way to reset cache.
    But it seems to be the only way, Microsoft seems to have removed the proper way in latest Windows 10 builds.
    And I don't understand the reason especially if they have kept it in Windows 11.

    Code:
    RMDIR /S /Q "%LOCALAPPDATA%\Packages\king.com.CandyCrushSaga_kgqvnymyfvs32"
    powershell start shell:AppsFolder\king.com.CandyCrushSaga_kgqvnymyfvs32!App
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 04:46.
Find Us




Windows 10 Forums