PowerShell Credentials Manager

CredMan.ps1 is a PowerShell script that provides access to the Win32 Credential Manager API used for management of stored credentials.

4 Star
31,822 times
Add to favorites
E-mail Twitter del.icio.us Digg Facebook
  • Possible to update credentials after password change?
    2 Posts | Last post November 25, 2019
    • I'm not familar with powershell, but I think something like
      "PS C:\> .\CredMan.ps1 -UpdCred -User '[domain]\[user]' -Pass '[NewPassword]'" 
      would help after changing Domain Passwords...
      ...if this would update all entries matching [domain]\[user] with the [NewPassword]
      Is it difficult to add such a function? I have no idea, how to do this.
    • The -AddCred parameter will allow you to update credentials, too. Perfect for when passwords change.
  • Add Web Credentials
    1 Posts | Last post July 01, 2019
    • Is it possible to add Web Credentials instead of Windows Credentials?
      I added a web page with credentials and saw it in the Credentials manager, but the autocomplete did not activate for the page.
  • Error using script in gpo
    1 Posts | Last post January 25, 2019
    • Hello,
      First, thanks for you great job with this script. It might save my life !
      Unfortunatelly when I use it through a GPO to store a login/password, I got an error :
      Failed to write to credentials store for target 'app.digitalize4.com' using 'xxxxxxxxxx', 'yyyyyyyyyyyy',
      'Last edited by vvvv\sssssss on DESKTOP123456'
          + CategoryInfo          : Security error : (:) [], ManagementException
          + FullyQualifiedErrorId : 80070520
      Any help would be appreciate.
  • How to get the DOMAIN_PASSWORD credential's password?
    2 Posts | Last post August 14, 2018
    • Hi, I tried to create a credential of type DOMAIN_PASSWORD, and when I tried to get the credential, the CredentialBlob attribute is $null. Is there any ways that I can get the credential password?
    • This can only work in a domain environment - are you specifying the credentials on creation and recall?
  • can this be exported to csv?
    3 Posts | Last post April 03, 2018
    • Wondering if the GetCred can be exported to a csv? I added the | Export-Csv, and it creates the file but it ends up being a blank file. wanting to capture the password in the credential so it can be called up in a future script. I know it wouldn't be secure but for now I need it to perform that function.
    • Hi,
      In the original Script ouput is a Text String, and it uses a write-host to perform the output.
      You should transform it as an Object, for example:
                 'Username' = $($Cred.UserName)
                 'Password' = $($Cred.CredentialBlob)
                 'Target' = $($Cred.TargetName.Substring($Cred.TargetName.IndexOf("=")+1))
                 'Updated' = $([String]::Format("{0:yyyy-MM-dd HH:mm:ss}", $Cred.LastWritten.ToUniversalTime())) + ' UTC'  #  UTC
                 'Comment' = $($Cred.Comment)
      In this way output can be used into a variable, or exported to a file easily
    • Actually, the information is already *in* object form, but the author decided to explicitly convert it to a string. I replaced lines 962-986 with 'Write-Output $creds', which spits out roughly the same thing as -All but as objects.
  • licensing?
    1 Posts | Last post April 03, 2018
    • The licensing for this is unclear. 'TechNet terms of use' includes a section on software, but has very little to say about software that does not include a specific license: "If Microsoft makes any other Software available on this web site without a license agreement, you may use it solely to design, develop and test your programs to run on Microsoft products and services. "
      I'd like to include a modified version of CredMan in a project I'm developing (for the sole purpose of exporting credentials via command-line, which is bizarrely not provided by standard Windows functionality). Can you please provide an explicit license that either allows or disallows reuse/redistribution of your code?
  • Used the following to clean up all credentials
    1 Posts | Last post August 01, 2017
    • Use at your own risk of course;
      Enum-Creds | ForEach-Object {Del-Creds -Target (($_.TargetName -split "target=")[1])}
  • Why can't I see the added creds in Windows 7 Tresos
    1 Posts | Last post May 22, 2017
    • This is realy great code. Works like a charme.
      But when I add a new credential by unsing –AddCreds, why can’t we see this entry in the 'Control Panel/Tresor'?
  • How can I used a credential in PS script
    1 Posts | Last post September 12, 2016
    • Hi i was wondering how I can use a saved credential in a ps script   
      I am looking to run the Connect-MSOLService -credential cmdlet in a scheduled task run script
  • Error when executing via cygwin SSH "cmd /c"
    2 Posts | Last post March 14, 2016
    • heya, great code that helps me alot :)
      1 thing though. I want to install simple credentials through a script. the script is on the target machine, and works fine as long as I'm runinng it on the machine console (i.e. with mstsc).  but when I'm trying to run my script with cygwin "cmd /c" I'm recieving an Error similar to @Omar IT's:
      Failed to write to credentials store for target '' using 'my_user', 'my_passs', 'Last edited by my_machine\g_user on MY_MACHINE'
    • Ned,
      As I responded to Omar, this script was never intended to be used against a remote machine (much less using a non-Windows remoting mechanism). It's conceivable that you might use PS remoting to accomplish your goals, but I've never tested this.
1 - 10 of 25 Items