cancel
Showing results for 
Search instead for 
Did you mean: 
m1984y
Level 7

Execute an powershell script with SolarWinds variable input

Jump to solution

Hi

I have a small script that restarts the network on a server if it runs into problems, I have this setup to monitor and the server and trigger the script accordingly in SW.

However is it possible to pass a solarwinds variable to the powershell script?

Thanks

M

0 Kudos
3 Replies
jrouviere
Level 14

Re: Execute an powershell script with SolarWinds variable input

Jump to solution

You can use various Macros in templates, we use some of these:

Best practices for SAM templates

There used to be a more complete list, but I can't find it at the moment. If there's something specific you're trying to do that you don't see on the list let us know.

0 Kudos
tomiannelli
Level 13

Re: Execute an powershell script with SolarWinds variable input

Jump to solution

You can also check out this : Use PowerShell in SAM at the bottom of this article are some useful links to other Powershell articles that will help with this task. The links that I have no longer work. However, you can search Thwack for keywords like MACROS, VARIABLES, and SCRIPTS. The Script Arguments line in the script competent is where you put in your ordered listed of variable. Your script them should reference them as $args[0], $args[1], etc. as mlandman​ shows in this Thwack thread - Powershell script arguments .

m1984y
Level 7

Re: Execute an powershell script with SolarWinds variable input

Jump to solution

thanks all

will checkout today and let you know

0 Kudos