Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade

How to Manage Credentials in Windows Using CredentialManager

CredentialManager is a built-in feature in Windows that allows users to store and manage their login credentials securely. This tool is particularly useful for managing passwords, certificates, and other sensitive information required to access various network resources, applications, and websites. By using CredentialManager, users can streamline their login processes and enhance security by reducing the need to remember multiple passwords. This article will guide you through the steps to manage credentials using CredentialManager in Windows, including how to create, retrieve, and delete credentials via the GUI and Command Line Interface (CLI).

Examples:

Using CredentialManager via GUI

  1. Accessing CredentialManager:

    • Open the Control Panel.
    • Navigate to "User Accounts."
    • Click on "Credential Manager."
  2. Adding a Credential:

    • Select "Windows Credentials" or "Web Credentials" based on your requirement.
    • Click on "Add a Windows credential" or "Add a generic credential."
    • Enter the network address, username, and password.
    • Click "OK" to save the credential.
  3. Editing or Removing a Credential:

    • Find the credential you want to edit or remove.
    • Click on the credential to expand it.
    • Choose "Edit" to modify the details or "Remove" to delete the credential.

Using CredentialManager via Command Line

Using CMD:

  1. Adding a Credential:

    cmdkey /add:<TargetName> /user:<Username> /pass:<Password>

    Example:

    cmdkey /add:server01 /user:admin /pass:password123
  2. Listing Credentials:

    cmdkey /list
  3. Deleting a Credential:

    cmdkey /delete:<TargetName>

    Example:

    cmdkey /delete:server01

Using PowerShell:

  1. Adding a Credential:

    $TargetName = "server01"
    $Username = "admin"
    $Password = ConvertTo-SecureString "password123" -AsPlainText -Force
    $Credential = New-Object System.Management.Automation.PSCredential($Username, $Password)
    $CredentialManager = New-Object -ComObject "Microsoft.Windows.CredentialManager"
    $CredentialManager.AddCredential($TargetName, $Credential)
  2. Listing Credentials:

    Get-StoredCredential -Target "server01"
  3. Deleting a Credential:

    Remove-StoredCredential -Target "server01"

Using CredentialManager via PowerShell Module

  1. Installing the CredentialManager Module:

    Install-Module -Name CredentialManager
  2. Adding a Credential:

    New-StoredCredential -Target "server01" -UserName "admin" -Password "password123"
  3. Retrieving a Credential:

    Get-StoredCredential -Target "server01"
  4. Removing a Credential:

    Remove-StoredCredential -Target "server01"

To share Download PDF

Gostou do artigo? Deixe sua avaliação!
Sua opinião é muito importante para nós. Clique em um dos botões abaixo para nos dizer o que achou deste conteúdo.