Im trying to create some powershell script monitors and i've got that working fine, however i need to pass arguments to my script. Basically the script handles 12 different monitor types however i dont fully understand how this works.
for example lets say i have a script that checks a website based on a host header, each server has 3 websites, and there are 5 servers.
i have my script, which takes an argument of url.
I want to assign this script to a template and tell it to run this script 3 times, once with an argument of www.abc.com, once with www.xyz.com and again with www.lmn.com
since i've fond this script to be so useful, i've decided i want to have it as part of another template, and again its monitoring a bunch of servers with a handful of sites...
from what i understand i have to create a component for each one (rather painful)
however, what makes this really painful is that if i have to change this script, because i found some faster better way to do it, i need to modify each template and each component..
is there some way to do a script library? or really to separate the script from the arguments?
sorry im faily new to this, but it seems like this would be a pretty obvious feature?