Provides a wrapper around the Credential Manager Win32 API.
When writing and reading stored credentials, if not specified, the credential type defaults to CRED_TYPE_GENERIC. Persistance is defaulted to CRED_PERSIST_LOCAL_MACHINE.
This example sets and retrieves credentials for a Windows Identity
Set-CredManCredential -TargetName "john.smith" -UserName "john.smith" -Secret "password" -Comment "My test cred" -Flags CRED_FLAGS_USERNAME_TARGET -Type CRED_TYPE_DOMAIN_PASSWORD
Get-CredManCredential -TargetName "john.smith" -Type CRED_TYPE_DOMAIN_PASSWORD
This example creates a generic credential for google.com and then updates it by changing the comment. The original secret is preserved with the specified write flag.
Set-CredManCredential -TargetName "google.com" -UserName "john.smith" -Secret "password" -Comment "TESTING"
Set-CredManCredential -TargetName "google.com" -UserName "john.smith" -Comment "Ready To Use" -WriteFlags CRED_PRESERVE_CREDENTIAL_BLOB
*This example retrieves a list of all GENERIC credentials that start with the word Microsoft in the target name.
$Creds = Get-CredManCredentialList -Filter "Microsoft*"
This example removes an existing credential for google.com without being prompted for confirmation
Remove-CredManCredential -TargetName "google.com" -Force
Initial Release.