Clear Windows Credentials using command Prompt

How to Clear Windows Credentials Using Command Prompt?

In Windows, the Credentials manager is the feature that stores all your Passwords or credentials, this feature also stores the sing-in information for websites using any browsers, apps, and networks. Also, this helps users to save the login information of mapped drives or shared folders. Whenever you map any Share drive by clicking the option to save your credentials then those credentials will be saved in the Windows credentials manager. Recently credentials manager got upgraded it not only saves your credentials, but it also allows you to view, add, backup, delete, and restore logon credentials. If you face any password-related issue with the Windows Login, then clearing the Windows Credentials will help you to fix this issue. Mostly, users will face issues with the Outlook password, clearing the Windows credentials will fix the issue with the Outlook password. This article will guide you to Clear Windows Credentials Using Command Prompt.

Clear Windows Credentials Using Command Prompt:

You can clear the Windows Credentials using two different methods, The First method is the GUI method, clearing all the Credentials using the Control panel. In the Second method we are going to use the Command Prompt, we are going to create a batch file to delete all the Windows Credentials.

Open the Run command by pressing Windows + R and type Notepad and hit enter.

In Notepad copy paste the below mentioned code.

@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
Clear Windows Credentials Using Command

Now Save the file as ClearWinCreds.bat, in Desktop or any location.

Next, Right-click on the batch file and choose Run as Administrator. This batch will clear all your saved windows credentials.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top