cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post

SAM Script Arguements Python

Jump to solution

Hi,

I am trying to understand how do I use the arguments in SAM scripts when writing a Windows Script Monitor in python so that I can get the node IP/Name, username and password passed into the script?

I have tried adding the arguments to the arguments field at the top with it inside the script, inside the script without in the arguments field, as "python {SCRIPT} arg1 arg2 ar3" in arguments field with also in the script and other variations but I can't get it working.

Any suggestions?

Any help would be much appreciated, thanks.

1 Solution

Solved this one myself today 😄 Here is how you do it if anyone else is having the same issue.

Nothing needed in the arguments field at the top.

In the script you can have the argument as '${arg}'. You must have the single quotes around the argument.

So for example:

user = '${USER}'
password = '${PASSWORD}'
node = '${IP}'

This should hopefully fix your issues too as this one was bugging me for a long time.

View solution in original post

0 Kudos
1 Reply

Solved this one myself today 😄 Here is how you do it if anyone else is having the same issue.

Nothing needed in the arguments field at the top.

In the script you can have the argument as '${arg}'. You must have the single quotes around the argument.

So for example:

user = '${USER}'
password = '${PASSWORD}'
node = '${IP}'

This should hopefully fix your issues too as this one was bugging me for a long time.

View solution in original post

0 Kudos