Windows 11 saves the usernames and passwords you use for network shares, NAS drives, other PCs and some apps, so you don’t have to type them each time. If a password changed, you connected with the wrong account, or you’re handing the PC to someone else, you’ll want to remove those saved network credentials. This guide covers Credential Manager, the cmdkey command, disconnecting cached network sessions, and forgetting saved Wi-Fi networks.
Quick Answer
Search for Credential Manager in Start, open Windows Credentials, click the saved entry for the server or PC, and click Remove. Restart or sign out so Windows stops using the cached connection.

Method 1: Credential Manager
- Click Start, type Credential Manager, and open it. (It’s also in Control Panel > User Accounts > Credential Manager.)
- Click Windows Credentials.
- Under Windows Credentials, find the entry named after the server, NAS or PC, such as NAS-OFFICE or 192.168.1.20.
- Click the arrow to expand it, then click Remove and confirm with Yes.
Use Edit instead if you just need to update the password. The Web Credentials tab holds passwords saved by Microsoft Edge and some apps.
Method 2: cmdkey in Command Prompt
- Open Terminal or Command Prompt.
- List saved credentials:
cmdkey /list - Delete one by its target name:
cmdkey /delete:NAS-OFFICEFor domain-style targets, use the exact name shown, for example cmdkey /delete:Domain:target=NAS-OFFICE.
Method 3: Disconnect Cached Network Sessions
Windows keeps an open connection to a share even after you remove the credential, which is why the old account can still work until you restart. To drop connections immediately:
net use
lists them, and
net use * /delete
disconnects all mapped drives and sessions (type Y to confirm). To remove one, use net use \\NAS-OFFICE\share /delete. Then reconnect and enter the correct username and password.
Forget a Saved Wi-Fi Network
- Go to Settings > Network & internet > Wi-Fi > Manage known networks.
- Click Forget next to the network.
Or in Terminal: netsh wlan show profiles, then netsh wlan delete profile name=”NetworkName”.
Connect With a Different Account
After removing the old credential and disconnecting sessions, open File Explorer and type \\servername in the address bar. When prompted, enter the new username (for example servername\username) and password. Check Remember my credentials only on your own PC.
Sharing only works on trusted networks; see how to change a network from Public to Private in Windows 11.
Troubleshooting
| Problem | Fix |
|---|---|
| Old account still connects | Run net use * /delete, or restart the PC |
| “Multiple connections to a server by the same user” error | Disconnect existing sessions to that server first |
| Entry comes back after removal | A mapped drive set to reconnect at sign-in is re-saving it; remap the drive |
| Can’t find the entry | Check both Windows Credentials and Generic Credentials sections |
Related: how to create a network drive.
Frequently Asked Questions
Is it safe to delete credentials in Credential Manager?
Yes. The worst case is being asked to sign in again. Avoid removing entries for apps you’re unsure about unless you know their passwords.
Does this work in Windows 10?
Yes, the steps are the same.
Summary
- Open Credential Manager > Windows Credentials.
- Expand the network entry and click Remove.
- Run net use * /delete or restart to drop cached sessions.
- Forget Wi-Fi networks in Settings or with netsh.

Kermit Matthews is a freelance writer based in Philadelphia, Pennsylvania with more than a decade of experience writing technology guides. He has a Bachelor’s and Master’s degree in Computer Science and has spent much of his professional career in IT management.
He specializes in writing content about iPhones, Android devices, Microsoft Office, and many other popular applications and devices.