Get-AppxPackage is a PoweShell Cmdlet that allows you to manage app packages in Windows, it is used to list, examine, and manage the app packages installed for a user or across the system. using this built-in command you can see what appx packages are installed on the current user profile or in the System profile. The app package has two file name extension, .msix or .appx, to get the list of installed appx packages you need to run the following command in Powershell elevated more. Get-AppxPackage will list out all the app packages installed for the current user from the Microsoft Store and third-party apps. Also, this command allows you to Install or uninstall apps using PowerShell, sometimes you may receive an error while executing the get-appxpackage command, if you encounter the following error while running the command “‘get-appxpackage’ is not recognized as an internal or external command, operable program or batch file.” then this troubleshooting guide will help you to fix this issue.
Fix ‘get-appxpackage’ is not recognized as an internal or external command, operable program or batch file:
You will receive the following full error message while running the Get-AppxPackage in a PowerShell cmdlet.
'get-appxpackage' is not recognized as an internal or external command,
operable program or batch file.
If you are receiving this error, then try the following resolution methods, and make sure you are entering the ‘get-appxpackage’ in command prompt instead of PowerShell.
Solution 1: Run the Command in Elevated Mode:
Get-AppxPackage cmdlet requires admin access to run, so make sure your user account has admin access, if not get the admin access. Launch the PowerShell in elevated mode.
Press the Start button and type PowerShell.
Right-click on PowerShell and choose Run as administrator.
Now type the cmdlet and hit enter. Mostly this will fix the Access Denied issue. If you are receiving a Get-Appxpackage Not Recognized error, then check the spelling of the cmdlet, and run the command in elevated mode.
Solution 2: Check Permission of the Destination Directory:
Mostly while opening the PowerShell, by default the Destination Directory will be in C: Drive and C drive have full permission by default. If you are trying to install any app in a particular folder or Partition drive, then make sure that folder or partition has full permission to Read and Write.
Open the Destination folder or partition using file explorer.
Right-click on the folder and choose Properties, then switch to Security Tab.
Then under Group or User Names make sure your account is visible and have full permission.
Also check the SYSTEM user account is present and has full permission. If not click on the advanced and give full permission.
Read:Â How to Fix Security tab missing from File Properties?
Solution 3: Check the Appx Deployment service Status:
If you are receiving the ‘get-appxpackage’ is not recognized as an internal or external command error while running the Appx command, then you need to check the Appx Deployment service is running or not.
Open run command by pressing Windows + R and type Services.msc and hit enter. This command will open the Service Management Console.
Now Look for the AppX Deployment Service (AppXSVC), then make sure it is running.
If it’s not running then Start the service. Mostly this will fix Get-Appxpackage Not Recognized error while running the appx command.
Solution 4: Use Registry Editor to Start AppXSvc Service
You can also use the Registry editor to run this service. Open Regedit and navigate to the following registry path.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AppXSvc
From the left-hand side click on the AppXSvc Registry key and from the right-hand side, look for Start DWORD.
Double click on the Start DWORD and set the Value data to 3 and click on OK.
Close the Registry Editor and restart the system once.
Solution 5: Check your PATH Environment Variable
Make sure you PowerShell is updated, if not, update the PowerShell, after updating the PowerShell run the command and check, if you still receiving the same error, then issue might be with your PATH environment Variable.
Open File Explorer by pressing Widows + E and right click on This PC and choose Properties.
Click on Advanced system settings, Now system Properties window will appear, click on Environment Variables.
Under System Variables, locate and select the ‘Path’ variable, and click on Edit.
Under Edit environment variable, Ensure the following directory (or similar, depending on your system) is included.
C:\Windows\System32\WindowsPowerShell\v1.0\
OR
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
If you are unable to find mentioned path variable, then click on New and add the path variable, Next click on OK, and restart the system once.
After completing these steps, you should be able to use the Get-AppxPackage
cmdlet successfully.
Read More: Â
Remove and Restore windows10 Default apps using PowerShell?
How to Uninstall Mixed Reality Portal Using PowerShell?