Auto add a certificate-based credential

noam b 26 Reputation points
2021-11-29T10:21:24.45+00:00

Anyone knows an automatic way of adding a certificate-based credential on Credential Manager?
tried with cmdkey and powershell module but they all require username.

the goal is to have the credentials based on a specific domain and a user certificate which is in the "My User Account" Certificates.
We are able to configure it manually and enter the domain and select the certificate, but couldn't find automatic way for that...

thanks alot,

Windows for business Windows Client for IT Pros Devices and deployment Other
Windows for business Windows Client for IT Pros User experience Other
{count} votes

Accepted answer
  1. Limitless Technology 39,916 Reputation points
    2021-12-01T09:44:26.85+00:00

    Hi there,

    You'll need to access the Win32 API to interact with the Credential.SecretManagement and SecretStore from Microsoft appear to be the official solution.This module provides a convenient way for a user to store and retrieve secrets. The secrets are stored in registered extension vaults

    I came across these articles which try adding certificates on credentials manager using Powershell.

    PowerShell support for certificate credentials
    https://devblogs.microsoft.com/scripting/powershell-support-for-certificate-credentials/

    Certificate-Based Credential via PowerShell
    https://social.technet.microsoft.com/Forums/windows/en-US/cf568114-7aa1-4c55-8755-9740f0e8827d/certificatebased-credential-via-powershell?forum=win10itprosecurity


    --If the reply is helpful, please Upvote and Accept it as an answer--

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.