Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
Credential Manager is a feature in Windows that allows users to store credentials, such as usernames and passwords, for various network resources, websites, and applications. This article will guide you through the process of managing credentials using the Credential Manager in Windows, including how to add, edit, and remove credentials. Additionally, we will explore how to perform these tasks via Command Prompt (CMD) and PowerShell.
While Credential Manager does not have direct CMD commands for adding credentials, you can use cmdkey
to manage credentials. Here’s how to add a credential:
cmdkey /add:TARGET_NAME /user:USERNAME /pass:PASSWORD
Replace TARGET_NAME
with the name of the resource, USERNAME
with your username, and PASSWORD
with your password.
You can use the New-StoredCredential
cmdlet from the CredentialManager module. First, you need to install the module:
Install-Module -Name CredentialManager -Scope CurrentUser
Then, add a credential:
$cred = New-Object -TypeName PSCredential -ArgumentList "USERNAME", (ConvertTo-SecureString "PASSWORD" -AsPlainText -Force)
New-StoredCredential -Target "TARGET_NAME" -Credential $cred
Replace TARGET_NAME
, USERNAME
, and PASSWORD
with your respective values.
To edit a credential, you generally need to delete the existing one and add a new one with the updated details.
cmdkey /delete:TARGET_NAME
Replace TARGET_NAME
with the name of the resource.
Remove-StoredCredential -Target "TARGET_NAME"
Replace TARGET_NAME
with the name of the resource.
cmdkey /add:myserver.local /user:admin /pass:password123
$cred = New-Object -TypeName PSCredential -ArgumentList "admin", (ConvertTo-SecureString "password123" -AsPlainText -Force)
New-StoredCredential -Target "myapp" -Credential $cred
cmdkey /delete:myserver.local
Remove-StoredCredential -Target "myapp"