Executing a Powershell Script

ceiverso
Tera Contributor

am trying to follow this youtube video here:

 

https://www.youtube.com/watch?v=is8vSW4aFQk&t=97s&ab_channel=AkhilVangala

 

Not quite getting how to get a powershell script to run? I created this per the video instruction (below):

 

ceiverso_2-1672243535483.png

But... I do not receive any input and nothing was processed?

 

ceiverso_3-1672243558021.png

 

 

 

1 REPLY 1

jaheerhattiwale
Mega Sage
Mega Sage

@ceiverso In video he is passing the PowerShell script in setCommand function(see image below)

 

jaheerhattiwale_0-1672244294116.png

 

The third parameter is command which is nothing but a PowerShell script. The command is passed to output ecc queue in payload (see below image)

jaheerhattiwale_1-1672244400900.png

 

You just need to copy the code as is and pass your PowerShell script in 3rd parameter of setCommand function.

 

Please mark as correct answer if this solves your issue.

Please mark the answer as correct or helpful based on impact
ServiceNow Community Rising Star, Class of 2023