Using PIN with certificate for credentials instead of "Get-Credential"

Welcome Forums General PowerShell Q&A Using PIN with certificate for credentials instead of "Get-Credential"

This topic contains 1 reply, has 1 voice, and was last updated by

 
Participant
6 months, 4 weeks ago.

  • Author
    Posts
  • #99244

    Participant
    Points: 17
    Rank: Member

    We are enforcing smart cards in our environment and require the use of PINs with admin accounts. We are taking advantage of the "Username hint" field to put in a different account. However, Get-Credential does not allow you to use "username hint." Apparently there is some PowerShell support for certificate credentials that I would like to test out, but I am unable to find any examples of how to use the "CredMarshalCredential" API, like shown in the "Hey, Scripting Guy!" blog (below). Any help would be greatly appreciated.

    https://blogs.technet.microsoft.com/heyscriptingguy/2017/12/15/powershell-support-for-certificate-credentials/

  • #99246

    Participant
    Points: 17
    Rank: Member

    hmm actually, it looks like I can use my smart card with "get-credential" by clicking the drop-down, but I still cannot use a different account (taking advantage of "username hint"). Don't think the other API will help either. If anyone has any idea how I can use "Username hint" in powershell or somehow select a different account that the same certificate is mapped to, let me know.

The topic ‘Using PIN with certificate for credentials instead of "Get-Credential"’ is closed to new replies.