Passing Runtime parameters to an Orchestrator Runbook

jansi rani krishnan 601 Reputation points
2021-05-21T07:42:02.04+00:00

Hi Team,

I have the “Run .Net Script” activity in one of the Runbooks, Which actually runs a PowerShell commands to send the incident information to ServiceNow using REST web services. I need to pass the credentials for authentication purpose while making the web service call. The same shell script when I run independently, it is working fine as I supply the credentials during the runtime.

I need some information on “How to pass a runtime parameters to the Runbook”, which is a sensitive information in our case. Please share the information if anyone knows how to pass the runtime parameters.

Sample code:

$CRED=get-credential
$ResponseObject=Invoke-RESTMethod -Uri $URL method 'POST' -credential $CRED -body $JsonBody -ContentType 'application/json'

Error details:

While running the runbook, it is getting failed at $CRED statement with the error "Cannot process command because of one or more missing mandatory parameters: credential"

Regards,
Jansi

System Center Orchestrator
System Center Orchestrator

A family of System Center products that provide an automation platform for orchestrating and integrating both Microsoft and non-Microsoft IT tools.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    2 deleted comments

    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.