Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Getting Error-Exception calling "Open" with "0" argument(s): "Login failed for user 'DOMAIN\ABCD$'." HRESULT: [-2146233087] in flow designer power-shell action.

Nitish Mudgil
Giga Contributor

I was trying to build an action in the flow designer, to run a power-shell script, which connects to an SQL database and adds a name in a certain group.

  • I have build a credential and alias, a connection and a windows credential (using an AD account) for the authentication.
  • Whenever I run the action it throws this error-"Exception calling "Open" with "0" argument(s): "Login failed for user 'DOMAIN\ABCD$'." HRESULT: [-2146233087]", I have not used the "DOMAIN\ABCD$" user anywhere in my script nor in the credentials. On investigating further I found out that, ABCD is actually the hostname(ABCD.domain.com) of the mid server, the action is using to launch the power-shell.
  • The Power-shell script runs perfectly fine if executed directly from the mid server.

I am not sure what I am missing here, any ideas would be appreciated 🙂

1 REPLY 1

rkota
Tera Contributor

Hi Nitish,

The powershell action in flow designer internally calls "PSScript.ps1" mid server script file. By default the "PSScript.ps1" powershell script tries to test the credentials associated with the flow action.

If you want to skip the credentials test, you can add the below line "$skipTest = 1" before the try and catch. 

$skipTest = 1

try {
if ($useCred) {
if ($skipTest) {
$cred = getCredential $Private:userProtected $Private:passwordProtected
}
else {
$cred = & $credTestFunc -computer $computer -user $Private:userProtected -password $Private:passwordProtected -debug $debug
}
} else {
& $noCredTestFunc -computer $computer -debug $debug
}
}

 

Regards,

Rajesh