Skip to main content

Add credentials to Windows Credential Manager

  • February 6, 2020
  • 5 replies
  • 123 views

  • Channel Partner
  • 4 replies

Typically I’ll add credentials through a Powershell script with cmdkey however when trying to use cmdkey via Automox the response in the activity logs is “CMDKEY: Credential added successfully. CMDKEY: Credential added successfully.” yet the credentials are not added when checking on the device.


I’m using exit 1 as for evaluation code and cmdkey /add:Server1 /user:Domain\User /pass:pass for the remediation code.


Any thoughts?

5 replies

Nic-Automox
  • Former Automox Employee
  • 832 replies
  • February 6, 2020

The typical issue with worklets is that they run as System, rather than the currently logged in user. Would that interfere with what cmdkey is trying to do?


Nic-Automox
  • Former Automox Employee
  • 832 replies
  • February 6, 2020

Also be careful of sending any credentials through a worklet, as that code gets stored not just in the console, but also in the Automox log file on the local machine (in plain text).


  • Author
  • Channel Partner
  • 4 replies
  • February 7, 2020

I’m not sure. I may need to look into other options via other Powershell options.


  • Author
  • Channel Partner
  • 4 replies
  • February 7, 2020

Good to know that the code gets stored in plain text on the local machine log file. I’ll have to figure out a way to encrypt and decrypt with this method.


Thanks Nic


Nic-Automox
  • Former Automox Employee
  • 832 replies
  • February 7, 2020

I looked at the cmdkey documentation more closely and it looks like the command stores credentials for the currently logged in user, which in the case of a worklet is System. You could log in as another user but that would also require putting more credentials in the worklet and it would be different for each machine that you’re running the worklet on.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings