01-25-2021 06:31 AM
Hi all
I'm trying to get Command-Arguments in a self-made script in Powershell.
On Python it is:
demisto.args().get('<command-argument>')
What is it in Powershell? Because I tried it with:
$demisto.Args()["<command-argument>"]
But this didn't worked on my self-made script.
Thanks
roger
01-25-2021 07:01 AM
You can get the args passed in like this:
$value = $demisto.Args().value
$demisto.Results($value)
If you create a new automation script, and switch the type to Powershell, there is some example code provided.
01-25-2021 07:01 AM
You can get the args passed in like this:
$value = $demisto.Args().value
$demisto.Results($value)
If you create a new automation script, and switch the type to Powershell, there is some example code provided.
01-26-2021 01:52 AM
Thank you MBeauchamp
That helped me. My script is now runinng 🙂
cheers
roger
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!