Skip to content

bongiovimatthew-microsoft/pscredentialWithCert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PSCredential and Smartcard Certificates

Overview

This project provides example code for how to use CredMarshalCredential and CredUnmarshalCredential to manage a CERT_CREDENTIAL_INFO data blob on a PSCredential object. This logic is the same logic used by the Get-Credential PowerShell cmdlet.

For a detailed walkthrough, see this blog post.

PowerShell Examples

This project also contains some example PowerShell code for how to read smartcards and generate PSCredential objects, and how to detect and process a PSCredential object that uses a smartcard.

See the PowerShell folder for more details.

Additional Resources

  1. LogonUser API

  2. CredMarshalCredential function

  3. CredUnmarshalCredential function

  4. CERT_CREDENTIAL_INFO struct

  5. PSCredential object

Contributing

This project welcomes contributions and suggestions.

About

Handle PSCredentials that use a certficiate (smartcard) for logon

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published