Skip to content

Instantly share code, notes, and snippets.

@rschweda
Last active January 25, 2026 07:19
Show Gist options
  • Select an option

  • Save rschweda/f0adc34ef8524a1f74dbc24a3a1939be to your computer and use it in GitHub Desktop.

Select an option

Save rschweda/f0adc34ef8524a1f74dbc24a3a1939be to your computer and use it in GitHub Desktop.
Delete all Xbox App network credentials in Windows

Why does this gist exist?

Have you asked yourself why all those XblGrts network credentials exist on your system? For unknown reasons does the Xbox App for Windows create one of those on each login and clutters the credentials management.

What does this script do?

It is a simple batch script creating a list of all stored keys having a name starting with XblGrts and deleting them.

How to run the script?

Create a .bat file with the code below and run it with admin privileges and be happy 🥳

delete-xblgrts.bat

@echo off
cmdkey.exe /list > "%TEMP%\List.txt"
findstr.exe target=XblGrts "%TEMP%\List.txt" > "%TEMP%\tokensonly.txt"
FOR /F "tokens=1,2 delims= " %%G IN (%TEMP%\tokensonly.txt) DO cmdkey.exe /delete:%%H
del "%TEMP%\List.txt" /s /f /q
del "%TEMP%\tokensonly.txt" /s /f /q
echo All done
pause
@Nyanpasu1
Copy link

thank you!

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