I’m a bit confused on what happens when I run a powershell script on the RMS server which is targeting other servers. Here is how I think it works – correct me if I am wrong.
1. I create a group and populate the servers I want to target within that group
2. I create a Timed Command Rule “Execute a command” and set the management pack.
3. I set the Rule target to something really generic like ‘Windows Server”
4. I disable the rule as I plan to use an override for the group in step 1.
5. I set the schedule to run during the days I want by selecting the “Base on fixed weekly schedule”
6. I set the command line to C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe for the “full path to file” and -Command "&file.ps1" for the “parameters”
7. I then set an override for the group created in step 1.
My question is – does the above powershell script run on the RMS server or does it run on the targeted servers in step one? If it runs on the targeted servers in the group created in step 1, it stands to reason that powershell needs to be installed on those targeted servers and the script needs to live on those servers as well.
It also stands to reason that Opsmanager is may not be the best way to schedule a powershell script that is not event/alert driven. The powershell script I created monitors the state of a particular service on clustered server and lets the owner know every day via an email what clustered node is controlling the service. Scheduled task seems a better solution in this case.
Thoughts?
Thanks
Ethan Froese
University of Missouri