Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Flow designer returns Status 1 for powershell script

Rohith Sureshk1
Tera Contributor

Hi ,

 

When trying to execute a OOB flow action - Does Group exists? (from adv2 spoke), we are getting following in flow logs:

 

1. PowerShell Script execution failed. Script returned status 1 using account <Service-account name>.

2. Failed while executing ActionDoesGroupExists_AD_v2.ps1 (Access denied)

3. IPaasActionProbe | PowerShell Script execution failed. Script returned status 1 using account <Service-account name>.

 

Points to be noted:

1. Test credentials button on flow is returning no error and is successfully validating.

2. Same script with same creds when executing directly in Mid Server is working fine.

 

Need help on how to resolve this issue. Thanks

 

Regards,

Rohith.S 

13 REPLIES 13

yeah right. 

 

"Test Credentials" against port 135 is validating successfully. so my understanding is credType "AD" might be using a different port which we might not have access to? 

 

 

@Rohith Sureshk1  Yes, WMI (Windows credential) typically uses TCP port 135.
Check the connection using the port number: 445

Bhuvan
Giga Patron

@Rohith Sureshk1 

 

You can use this knowledge article to resolve the issue,

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1587272

 

Thanks,

Bhuvan

J Siva
Kilo Patron
Kilo Patron

Hi @Rohith Sureshk1 
Please check whether the service account has access to the PowerShell script file on your MID Server host.
Regards,
Siva