如何从 Windows 11/10 中的凭据管理器中清除所有凭据

如何从 Windows 11/10 中的凭据管理器中清除所有凭据

How to clear all Credentials from Credential Manager in Windows 11/10

At times, you may want to cleаr аll credentials stored in the Credentials Manager; for example, when you’re having issues using your pasѕword on your Windows 10 deνice, but the password works on аll your other devices. In this post, we show you how to clear all credentials from Credential Manager in Windows 11/10 using a Batch file.

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

Credentials are split into four categories viz:

Windows Credentials – are used only by Windows and its services. For example, Windows can use these credentials to automatically log you into the shared folders of another computer on your network. It can also store the password of the Homegroup you have joined and uses it automatically each time you access what is being shared in that Homegroup. If you type a wrong log-in credential, Windows remembers it and fails to access what you need. If this happens, you can edit or remove the incorrect credential, as shown in later sections of this article.Certificate-Based Credentials – they are used together with smart cards, mostly in complex business network environments. Most people will never need to use such credentials and this section is empty on their computers.Generic Credentials – are defined and used by some of the apps you install in Windows so that they get the authorization to use certain resources. Examples of such apps include OneDrive, Slack, Xbox Network (formerly Xbox Live), etc.Web Credentials – they represent login information for websites that is stored by Windows, Skype, Internet Explorer or other Microsoft apps. They exist only in Windows 10 and Windows 8.1, but not in Windows 7.

Read: How to delete Credentials from Credential Manager using Command Prompt.

Clear all credentials from Credential Manager

While you can individually clear or remove credentials, you can create this batch file sourced from Github and run it to clear all credentials from Credential Manager. Here’s how:

Press Windows key + R to invoke the Run dialog.In the Run dialog box, type notepad and hit Enter to open Notepad.Copy and paste the code below into the 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

pause

Save (to the desktop, preferably) the file with a name and append the .bat file extension – eg; ClearCREDS.bat and on the Save as type box select All Files.

To clear all credentials, simply run the batch file with admin privilege (right-click the saved file and select Run as Administrator from the context menu).

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

That’s it!

Related post: How to Add, Backup, Restore User Credentials using Windows Vault.

相关推荐

【設計】色彩學懶人包:配色觀念、實務應用完整收錄
beat365体育亚洲网页版

【設計】色彩學懶人包:配色觀念、實務應用完整收錄

📅 07-10 👁️ 1323
流量卡在哪买比较正规的?2025年避坑指南
beat365体育亚洲网页版

流量卡在哪买比较正规的?2025年避坑指南

📅 10-13 👁️ 8953
凌平平老师个人简介(一级市政实务老师排名)
office365ios版本

凌平平老师个人简介(一级市政实务老师排名)

📅 08-19 👁️ 4322
2025旅行包十大品牌排行榜
在线365bet盘口

2025旅行包十大品牌排行榜

📅 07-15 👁️ 9638
45尺高柜尺寸,可以装多少立方?重量限制?
office365ios版本

45尺高柜尺寸,可以装多少立方?重量限制?

📅 09-05 👁️ 1226
闪信快借审核需要多久?
office365ios版本

闪信快借审核需要多久?

📅 07-02 👁️ 643
国内邮编查询
在线365bet盘口

国内邮编查询

📅 09-20 👁️ 6086
不要被忽悠,一文看懂激光电视和LED投影仪优缺点,谁更值得买?
阿里劳动合同签几年
在线365bet盘口

阿里劳动合同签几年

📅 09-07 👁️ 2322