In a networked environment, controlling access to shared folders is essential. When using Windows 11, the operating system stores login credentials for network shares to streamline access. However, removing these credentials may be necessary to maintain security, resolve connectivity issues, or manage different user accounts.
Saved usernames and passwords for network shares are retained in Credential Manager, providing a centralized way to handle stored credentials. For command-line enthusiasts, cmdkey offers direct credential management from the terminal, giving administrators full oversight of the credentials used to access network resources.
Properly managing these Windows 11 credentials ensures that unauthorized access is prevented and that outdated credentials do not cause unexpected authentication errors. Maintaining clarity and control over stored login information is crucial in environments that demand precision and reliability.
Methods to delete saved username and password for network share in Windows:
Steps to clear Windows Credential for shared folders access in Windows 11 using Credential Manager:
- Open Credential Manager through the Windows search bar.
- Select the Windows Credentials tab.
- Click on the dropdown icon for the server or computer that you want to remove from the Credential Manager.
- Click on the remove link.
- Confirm the deletion when prompted.
- Repeat for other credentials as needed.
It might take a while for the credential to be removed from caches. You can either wait or reboot the system.
Steps to clear Windows Credential for shared folders access in Windows 11 using cmdkey:
- Open Command Prompt or PowerShell as an administrator.
- List all the stored credentials.
$ cmdkey /list Currently stored credentials: Target: WindowsLive:target=virtualapp/didlogical Type: Generic User: 02erbobtpesylcou Local machine persistence Target: Domain:target=10.1.11.11 Type: Domain Password User: admin
- Identify the credential associated with the network share.
Target: Domain:target=10.1.11.11
- Delete the specific credential using cmdkey.
$ cmdkey /delete:10.1.11.11 CMDKEY: Credential deleted successfully.
- Verify that the credential has been removed.
cmdkey /list

Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
Comment anonymously. Login not required.