How to clear all Credentials from Credential Manager in Windows 10 - Windows Basics


Tuesday, December 14, 2021

How to clear all Credentials from Credential Manager in Windows 10

Sometimes you may want to delete all logins stored in the Credentials Manager; for example, when you have problems using the password on your Windows 10 device, but the password works on all your other devices. In this post, we show you how to remove all credentials from Credential Manager in Windows 10 using Batch.

Windows Credentials Manager is where usernames and passwords and other login details are stored for later use in the digital library. This includes information for websites and applications, as well as network login information.

Credentials are divided into four categories viz:

  • Windows Credentials - used only by Windows and its services. For example, Windows may use these credentials to automatically sign you in to the shared folders of another computer on your network. It can also store the password of the Homegroup you have joined and automatically use that password every time you access what is being shared in that Homegroup. If you enter the wrong login information, Windows will remember it and not be able to access what you need. If this happens, you can correct or remove the incorrect login information, as shown in later sections of this article.
  • Certificate-Based Credentials -  they are used in conjunction with smart cards, mostly in complex business networking environments. Most people will never need to use such credentials and this section is empty on their computer.
  • Generic Credentials - are identified and used by certain applications you install in Windows so that they have permission to use certain resources. Examples of such apps include OneDrive, Slack, Xbox Network (formerly Xbox Live), and more.
  • Web Credentials - they represent logins for websites hosted by Windows, Skype, Internet Explorer, or other Microsoft applications. They only exist in Windows 10 and Windows 8.1, but not in Windows 7.

Remove all credential from Credential Manager

While you can delete or remove individual logins, you can create this batch file sourced from Github and run it to remove all logins from the Credential Manager. Here's how to do it:

1. Press Windows Key + R to invoke the Run dialog box.

2. In the Run dialog box, type notepad and press Enter to open Notepad.

3. Copy and paste the code below into a text editor.

@echo off
cmdkey.exe /list > "%TEMP%\List.txt"
findstr.exe Target "%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

4. Save (preferably on desktop) a file with the name and add the .bat file extension - for example: credentialclear.bat and on the Save as type box, select All Files.

5. To remove all credentials, simply run the batch file with administrative privileges (right click on the saved file and select Run as Administrator from the context menu).

You can also schedule the batch file to run automatically in Windows 10 if you want.


That's it!

No comments:

Post a Comment