AutomoxAutomox

Add credentials to Windows Credential Manager

jrscit
February 6, 2020 at 10:49 pm UTC

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?

This discussion is archived and closed to replies. Continue it in the Automox Community Slack.

Discuss on Slack

Replies (5)

Nic-AutomoxFebruary 6, 2020
#1

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-AutomoxFebruary 6, 2020
#2

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).

jrscitFebruary 7, 2020
#3

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

jrscitFebruary 7, 2020
#4

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-AutomoxFebruary 7, 2020
#5

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.