Skip to content

Instantly share code, notes, and snippets.

@joshschmelzle
Last active November 12, 2024 14:37
Show Gist options
  • Save joshschmelzle/04c57d957c5bb92e85ae9180021b26dc to your computer and use it in GitHub Desktop.
Save joshschmelzle/04c57d957c5bb92e85ae9180021b26dc to your computer and use it in GitHub Desktop.
How to Remove the Xbox Game Bar with Powershell on Windows 10. Scroll to the end of the gist for Windows 11.

You've probably stumbled upon this researching how to remove the Xbox Game Bar. This gist includes a few different methods you can try. Please note that some of these first options are probably not be available unless you are running an older version of Windows 10.

EDIT: make sure to check out the comment below from @nmhung1985 which seems to be working for most folks.

Uninstalling/Removing the Game Bar (old Windows 10 build GUI options)

(this is no longer an option on any recent Windows 10 build)

  1. Press Windows Key or click on the Start menu.
  2. Start typing Xbox or Game Bar, until you get the Xbox Game Bar app to appear in the results.
  3. Right-click on the app and pick Uninstall. Answer Yes to the prompt, and wait for the process to finish.

Windows Build 19H1 (uninstall moved into Settings)

You might not have an Uninstall option in the right-click context menu. Try drilling into Settings and looking there.

  1. Press Windows Key or click on the Start menu.
  2. Start typing Xbox or Game Bar, until you get the Xbox Game Bar app.
  3. Right click on Xbox Game Bar and click Settings
  4. Scroll down and click Uninstall. Wait for the process to finish.

Windows Build 19H1/19H2 (uninstall button is now grayed out)

On my machine running Windows Build 10.0.18362 the uninstall button is grayed out. The button I'm referring to is here: Xbox Game Bar > Right Click > App Settings > Uninstall.

Game Bar Settings

Depending on why you're trying to remove the Game bar, you might also try changing the Game bar settings.

Go to Search > "game bar settings".

  1. For the option that says Record game clips, screenshots, and broadcasting using Game Bar move the slider to the Off position. This should stop the default Win+G shortcut from opening the Game bar.

  2. If you need Win+G for a different application (I ran into this), you should be able to change the shortcut, and you're done! Go to Search > "game bar settings" > Game bar > Keyboard shortcuts. I verified this on my Surface Pro 1903/19H1/18362.

Removing Microsoft.Xbox* AppXPackage using PowerShell or DISM (short version first, longer version below this section)

Can't find a way to uninstall the Game Bar using the GUI? The PowerShell or the DISM tool might do the trick.

DISM is a Deployment Image Servicing and Management CLI tool from Microsoft built into Windows. You will need to interact with DISM from an elevated (admin) terminal.

1. Open your terminal as an administrator (Windows Key > Start typing "PowerShell" > CTRL + SHIFT + ENTER)

If you're using DISM, this could be cmd.exe. If you're using PowerShell, this needs to be Windows PowerShell. You can interact with either if you launch Windows Terminal as admin.

2. First run dism /Online /Get-ProvisionedAppxPackages | Select-String PackageName | Select-String xbox to see what xbox packages are actually on your system.

You you should be able to accomplish this with DISM or PowerShell. I'll show both approaches, but pick one or the other.

2a. DISM version:

dism /Online /Get-ProvisionedAppxPackages | Select-String PackageName | Select-String xbox

2b. PowerShell version:

Get-ProvisionedAppxPackage -Online | Where-Object { $_.PackageName -match "xbox" }

3.

The following commands will retrieve the AppXPackages matching on xbox and attempt to remove them. There are several commands stringed together (thanks @bashenk for your help on this). Copy and paste the entire block.

3a. DISM version:

dism /Online /Get-ProvisionedAppxPackages | `
Select-String PackageName | `
Select-String xbox | `
ForEach-Object {$_.Line.Split(':')[1].Trim()} | `
ForEach-Object { dism /Online /Remove-ProvisionedAppxPackage /PackageName:$_}

3b. PowerShell cmdlet version:

Get-ProvisionedAppxPackage -Online | `
Where-Object { $_.PackageName -match "xbox" } | `
ForEach-Object { Remove-ProvisionedAppxPackage -Online -PackageName $_.PackageName }

If you want to remove packages for other users, you will need to pass in the -allusers parameter like so:

Get-ProvisionedAppxPackage -Online | `
Where-Object { $_.PackageName -match "xbox" } | `
ForEach-Object { Remove-ProvisionedAppxPackage -Online -AllUsers -PackageName $_.PackageName }

4. Verify

Ok - let's see if the xbox packages are still there. Search for the xbox packages again. If there are no results, the respective appxpackages were removed. Run the commands from step 2 again.

You may need to reboot after.

Removing Microsoft.Xbox* AppXPackage using PowerShell and DISM (long and manual version)

This section expands on the short versions. It goes through separate commands instead of stringing commands together. Read this if you're interested in what all the commands do.

Step 1. Remove AppxPackages from current user.

Open PowerShell as your current user (not as an administrator).

Identify user by running $env:Username:

PS C:\Users\josh> $env:Username
josh

Get list of xbox AppxPackages using Get-AppxPackage:

PS C:\Users\josh>  Get-AppxPackage | select-string xbox

Microsoft.Xbox.TCUI_1.24.10001.0_x64__8wekyb3d8bbwe
Microsoft.XboxSpeechToTextOverlay_1.21.13002.0_x64__8wekyb3d8bbwe
Microsoft.XboxGameCallableUI_1000.18362.449.0_neutral_neutral_cw5n1h2txyewy
Microsoft.XboxGameOverlay_1.47.14001.0_x64__8wekyb3d8bbwe
Microsoft.XboxGamingOverlay_3.34.15002.0_x64__8wekyb3d8bbwe
Microsoft.XboxIdentityProvider_12.58.1001.0_x64__8wekyb3d8bbwe

Step 2. Build your remove script using package names discovered in Step 1.

Which might look something like this:

Remove-AppxPackage Microsoft.Xbox.TCUI_1.24.10001.0_x64__8wekyb3d8bbwe
Remove-AppxPackage Microsoft.XboxSpeechToTextOverlay_1.21.13002.0_x64__8wekyb3d8bbwe
Remove-AppxPackage Microsoft.XboxGameCallableUI_1000.18362.449.0_neutral_neutral_cw5n1h2txyewy
Remove-AppxPackage Microsoft.XboxGameOverlay_1.47.14001.0_x64__8wekyb3d8bbwe
Remove-AppxPackage Microsoft.XboxGamingOverlay_3.34.15002.0_x64__8wekyb3d8bbwe
Remove-AppxPackage Microsoft.XboxIdentityProvider_12.58.1001.0_x64__8wekyb3d8bbwe

Run:

PS C:\Users\josh> Remove-AppxPackage Microsoft.Xbox.TCUI_1.24.10001.0_x64__8wekyb3d8bbwe
PS C:\Users\josh> Remove-AppxPackage Microsoft.XboxSpeechToTextOverlay_1.21.13002.0_x64__8wekyb3d8bbwe
PS C:\Users\josh> Remove-AppxPackage Microsoft.XboxGameCallableUI_1000.18362.449.0_neutral_neutral_cw5n1h2txyewy
Remove-AppxPackage : Deployment failed with HRESULT: 0x80073CFA, Removal failed. Please contact your software vendor.
(Exception from HRESULT: 0x80073CFA)
error 0x80070032: AppX Deployment Remove operation on package
Microsoft.XboxGameCallableUI_1000.18362.449.0_neutral_neutral_cw5n1h2txyewy from:
C:\WINDOWS\SystemApps\Microsoft.XboxGameCallableUI_cw5n1h2txyewy failed. This app is part of Windows and cannot be
uninstalled on a per-user basis. An administrator can attempt to remove the app from the computer using Turn Windows
Features on or off. However, it may not be possible to uninstall the app.
NOTE: For additional information, look for [ActivityId] 1e9e759c-9d2e-0000-74d3-a31e2e9dd501 in the Event Log or use
the command line Get-AppPackageLog -ActivityID 1e9e759c-9d2e-0000-74d3-a31e2e9dd501
At line:1 char:1
+ Remove-AppxPackage Microsoft.XboxGameCallableUI_1000.18362.449.0_neut ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (Microsoft.XboxG...l_cw5n1h2txyewy:String) [Remove-AppxPackage], IOException
    + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand

PS C:\Users\josh> Remove-AppxPackage Microsoft.XboxGameOverlay_1.47.14001.0_x64__8wekyb3d8bbwe
PS C:\Users\josh> Remove-AppxPackage Microsoft.XboxGamingOverlay_3.34.15002.0_x64__8wekyb3d8bbwe
PS C:\Users\josh> Remove-AppxPackage Microsoft.XboxIdentityProvider_12.58.1001.0_x64__8wekyb3d8bbwe

You may notice one or more attempts to remove a package failed. We can clean that up using PowerShell as an administrator.

If your administrator account is a different account, you may need to use the -AllUsers parameter with certain commands.

Step 3. Check AppxPackage list again

PS C:\Users\josh> Get-AppxPackage | select-string xbox

Microsoft.XboxGameCallableUI_1000.18362.449.0_neutral_neutral_cw5n1h2txyewy

Step 4. Launch PowerShell as an administrator

Now that we have an elevated command prompt. Let's look at the AppxPackage list again. We may see a few more:

PS C:\WINDOWS\system32> Get-AppxPackage | Select-String xbox

Microsoft.XboxGameCallableUI_1000.15063.0.0_neutral_neutral_cw5n1h2txyewy
Microsoft.XboxSpeechToTextOverlay_1.21.13002.0_x64__8wekyb3d8bbwe
Microsoft.XboxGameOverlay_1.47.14001.0_x64__8wekyb3d8bbwe
Microsoft.XboxIdentityProvider_12.58.1001.0_x64__8wekyb3d8bbwe

Note: if you want to remove for multiple users, you need to run with the -AllUsers parameter: Get-AppxPackage -AllUsers.

Let's remove them:

Remove-AppxPackage Microsoft.XboxGameCallableUI_1000.15063.0.0_neutral_neutral_cw5n1h2txyewy
Remove-AppxPackage Microsoft.XboxSpeechToTextOverlay_1.21.13002.0_x64__8wekyb3d8bbwe
Remove-AppxPackage Microsoft.XboxGameOverlay_1.47.14001.0_x64__8wekyb3d8bbwe
Remove-AppxPackage Microsoft.XboxIdentityProvider_12.58.1001.0_x64__8wekyb3d8bbwe

Results:

PS C:\WINDOWS\system32> Remove-AppxPackage Microsoft.XboxGameCallableUI_1000.15063.0.0_neutral_neutral_cw5n1h2txyewy
Remove-AppxPackage : Deployment failed with HRESULT: 0x80073D19, An error occurred because a user was logged off.
error 0x80070032: AppX Deployment Remove operation on package
Microsoft.XboxGameCallableUI_1000.15063.0.0_neutral_neutral_cw5n1h2txyewy from:
C:\Windows\SystemApps\Microsoft.XboxGameCallableUI_cw5n1h2txyewy failed. This app is part of Windows and cannot be
uninstalled on a per-user basis. An administrator can attempt to remove the app from the computer using Turn Windows
Features on or off. However, it may not be possible to uninstall the app.
NOTE: For additional information, look for [ActivityId] 1e9e759c-9d2e-0001-5455-a21e2e9dd501 in the Event Log or use
the command line Get-AppPackageLog -ActivityID 1e9e759c-9d2e-0001-5455-a21e2e9dd501
At line:1 char:1
+ Remove-AppxPackage Microsoft.XboxGameCallableUI_1000.15063.0.0_neutra ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Microsoft.XboxG...l_cw5n1h2txyewy:String) [Remove-AppxPackage], Exception
    + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand

PS C:\WINDOWS\system32> Remove-AppxPackage Microsoft.XboxSpeechToTextOverlay_1.21.13002.0_x64__8wekyb3d8bbwe
PS C:\WINDOWS\system32> Remove-AppxPackage Microsoft.XboxGameOverlay_1.47.14001.0_x64__8wekyb3d8bbwe
PS C:\WINDOWS\system32> Remove-AppxPackage Microsoft.XboxIdentityProvider_12.58.1001.0_x64__8wekyb3d8bbwe

We see one failed. Let's try to use DISM to remove them.

Step 5: Get a list of DISM packages that match on xbox

Search provisioned packages, you might see more packages than what you found via the Remove-AppxPackage cmdlet.

PS C:\WINDOWS\system32> dism /online /get-provisionedappxpackages | select-string packagename | select-string xbox | ForEach-Object {$_.Line.Split(':')[1]}
 Microsoft.XboxGameOverlay_1.47.14001.0_neutral_~_8wekyb3d8bbwe
 Microsoft.XboxGamingOverlay_3.34.15002.0_neutral_~_8wekyb3d8bbwe
 Microsoft.XboxIdentityProvider_12.58.1001.0_neutral_~_8wekyb3d8bbwe
 Microsoft.XboxSpeechToTextOverlay_1.21.13002.0_neutral_~_8wekyb3d8bbwe

Step 6: Remove the DISM packages that match on xbox

Build your script based on output found in step 5.

dism /online /remove-provisionedappxpackage /packagename:Microsoft.XboxGameOverlay_1.47.14001.0_neutral_~_8wekyb3d8bbwe
dism /online /remove-provisionedappxpackage /packagename:Microsoft.XboxGamingOverlay_3.34.15002.0_neutral_~_8wekyb3d8bbwe
dism /online /remove-provisionedappxpackage /packagename:Microsoft.XboxIdentityProvider_12.58.1001.0_neutral_~_8wekyb3d8bbwe
dism /online /remove-provisionedappxpackage /packagename:Microsoft.XboxSpeechToTextOverlay_1.21.13002.0_neutral_~_8wekyb3d8bbwe

Example Result:

PS C:\WINDOWS\system32> dism /online /remove-provisionedappxpackage /packagename:Microsoft.XboxGameOverlay_1.47.14001.0_neutral_~_8wekyb3d8bbwe

Deployment Image Servicing and Management tool
Version: 10.0.18362.1

Image Version: 10.0.18362.476

The operation completed successfully.
PS C:\WINDOWS\system32> dism /online /remove-provisionedappxpackage /packagename:Microsoft.XboxGamingOverlay_3.34.15002.0_neutral_~_8wekyb3d8bbwe

Deployment Image Servicing and Management tool
Version: 10.0.18362.1

Image Version: 10.0.18362.476

The operation completed successfully.
PS C:\WINDOWS\system32> dism /online /remove-provisionedappxpackage /packagename:Microsoft.XboxIdentityProvider_12.58.1001.0_neutral_~_8wekyb3d8bbwe

Deployment Image Servicing and Management tool
Version: 10.0.18362.1

Image Version: 10.0.18362.476

The operation completed successfully.
PS C:\WINDOWS\system32> dism /online /remove-provisionedappxpackage /packagename:Microsoft.XboxSpeechToTextOverlay_1.21.13002.0_neutral_~_8wekyb3d8bbwe

Deployment Image Servicing and Management tool
Version: 10.0.18362.1

Image Version: 10.0.18362.476

The operation completed successfully.

Step 7. Verify

Run DISM as an administrator:

PS C:\WINDOWS\system32>  dism /online /get-provisionedappxpackages | select-string packagename | select-string xbox
PS C:\WINDOWS\system32>

Run AppXPackage as a normal user:

PS C:\Users\josh> Get-AppxPackage | select-string xbox

Microsoft.XboxGameCallableUI_1000.18362.449.0_neutral_neutral_cw5n1h2txyewy

Run AppXPackage as an elevated user:

PS C:\WINDOWS\system32> Get-AppxPackage | Select-String xbox

Microsoft.XboxGameCallableUI_1000.15063.0.0_neutral_neutral_cw5n1h2txyewy

In this example, I had difficulty removing the XboxGameCallableUI package.

Want to just remove all the packages matching on xbox?

Launch PowerShell as an adminstrator.

Step 1. Verify what they are.

Get-AppxPackage | select-string xbox

Step 2. Remove any packages matching on xbox.

Get-AppxPackage | select-string xbox | Remove-AppxPackage

Struggling removing certain packages like the Microsoft.XboxGamingOverlay?

@Svenster64 commented that they had issues on build 1909 removing the XboxGamingOverlay.

Verify it is installed:

Get-AppxPackage -AllUsers Microsoft.XboxGamingOverlay

Remove it:

Get-AppxPackage -AllUsers Microsoft.XboxGamingOverlay | Remove-AppxPackage

This works on Windows 11 to get rid of the Game Bar. Verified on Windows 11 version 23H2 (22631.3880).

If you start seeing a popup around ms-gamingoverlay, try the following commands in an elevated terminal:

reg add HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR /f /t REG_DWORD /v "AppCaptureEnabled" /d 0
reg add HKEY_CURRENT_USER\System\GameConfigStore /f /t REG_DWORD /v "GameDVR_Enabled" /d 0

Appendix

Did something different to remove the Game bar? Please comment and let us know (except via apps like CCleaner).

I'll try to keep this gist updated to help other folks stumbling onto this gist.

Cheers!

@divmgl
Copy link

divmgl commented May 30, 2023

Does this work for win11 as of now? Anyone knows?

Running these commands will bring up an annoying popup message whenever a game is opened that says "Get an app to open ms-gamingoverlay". So probably not worth it.

@tarreislam
Copy link

Running these commands will bring up an annoying popup message whenever a game is opened that says "Get an app to open ms-gamingoverlay". So probably not worth it.

Trust me, its worth it, its almost so I wanna go away from Windows because of it and run the windows apps thru WINE

@BrunoEdu77
Copy link

Portuguese:

Obrigadoo, isso aí tem me ajudado muito, pra melhorar o Desempenho do Windows 10 e Em Jogos!

English:

Thaank you, this has helped me a lot, to improve Windows 10 Performance and In Games!
:)

@7hoovR
Copy link

7hoovR commented Oct 13, 2023

if it doesn't work run powershell as administrator to using "Remove-AppxPackage Microsoft.XboxGameCallableUI_1000.15063.0.0_neutral_neutral_cw5n1h2txyewy" use Nsudo open powershell with elevated permissions of "TrustedInstaller" and you can easily remove Microsoft.XboxGameCallableUI.

any info on what it leaves behind? sounds like a program similar to ccleaner to me

@7hoovR
Copy link

7hoovR commented Oct 13, 2023

I'm on windows 10 pro, 22H2 build 19045.3570, with a single user and running powershell as admin, everything works up until Microsoft.XboxGameCallableUI_1000.19041.3570.0_neutral_neutral_cw5n1h2txyewy and the feedback i get is:

Remove-AppxPackage : The request is not supported.
error 0x80070032: AppX Deployment Remove operation on package Microsoft.XboxGameCallableUI_1000.19041.3570.0_neutral_neutral_cw5n1h2txyewy from: C:\Windows\SystemApps\Microsoft.XboxGameCallableUI_cw5n1h2txyewy failed. This app is part of Windows and cannot be
uninstalled on a per-user basis. An administrator can attempt to remove the app from the computer using Turn Windows Features on or off. However, it may not be possible to uninstall the app.
At line:1 char:1
+ Remove-AppxPackage -AllUsers Microsoft.XboxGameCallableUI_1000.19041. ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Remove-AppxPackage], COMException
    + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand

don't know what to do, that error code doesn't seem to have much help online as well

@sjnicholson
Copy link

So issue I have is that I followed the PowerShell to remove

Get-ProvisionedAppxPackage -Online | Where-Object { $_.PackageName -match "xbox" } | ForEach-Object { Remove-ProvisionedAppxPackage -Online -AllUsers -PackageName $_.PackageName }

BUT, I want to re-enable the GameBar which is proving impossible as all the Windows settings exist for it, but the Windows store won't install it, and no option via the store to uninstall as it doesn't think its installed.

Windows + G just greats me with an error - You need a new type of app to open ms-overlaylink - any ideas how to reverse the instructions here?

@vladtdr
Copy link

vladtdr commented Jul 31, 2024

easiest command is just to Get-AppxPackage | select-string xbox | Remove-AppxPackage

man, i actually love you, none of this worked, but your one line of command did it!!!! tnx!!!

@TheArgentinian
Copy link

I've done this a few times and the useless Game Bar keeps coming back.

@22rw
Copy link

22rw commented Oct 4, 2024

The commands provided by nmhung1985 worked for me!
Afaik the Remove-/Add-AppxPackage commands are only available in PowerShell 5.

Only thing that remained was the shortcut registration for WIN + G and so on, warning about a missing app to handle ms-gamebar urls.

To disable this on Windows 10 (22H2) just disable the 'Enable Xbox Game Bar' toggle in Settings > Gaming > Game Bar before uninstalling the GameBar package. source
And while this still didn't allow me to remap / reuse the key combinations to something else (Tried with PowerToys Keyboard Manager), it at least removes the annoying popup :|

If for any reason you need to reinstall the Game Bar app, execute the following command in an elevated command prompt:

winget install 9NZKPSTSNW4P --source msstore --accept-source-agreements --accept-package-agreements

source

@UKsFLAMEZ
Copy link

EDITION: Windows 11 Pro
VERSION: 24H2
BUILD: 26100.2033
i used terminal (ADMIN) these worked for me:

Get-ProvisionedAppxPackage -Online | Where-Object { $_.PackageName -match "xbox" }

Get-ProvisionedAppxPackage -Online | Where-Object { $_.PackageName -match "xbox" } |
ForEach-Object { Remove-ProvisionedAppxPackage -Online -AllUsers -PackageName $_.PackageName }

EVEN GOT RID OF THE ANNOYING POPUP!
reg add HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR /f /t REG_DWORD /v "AppCaptureEnabled" /d 0
reg add HKEY_CURRENT_USER\System\GameConfigStore /f /t REG_DWORD /v "GameDVR_Enabled" /d 0

@notarobloxwhat2
Copy link

Thanks! It worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment