Question regarding a Powershell script
I have a Powershell script that will run automatically using a Command Channel in our Test environment. When I use it in our Prod environment it does not appear to be running automatically; custom fields are not updated, I do not see any errors in any of the event logs. I am able to take an AlertId and manually run the script from a Powershell prompt successfully. I do not think that the script or the data that is called from the ';' delimiter .txt file is the issue since I can run manaully. Any pointers to what I should be reviewing as far as environment variables necessary to run the script using a Command Channel and subscription would be greatly appreciated. Thank you.
November 26th, 2012 6:27pm

Can you please post a printscreen of your notification channel config? I'm using this technique a lot in various environments. An example of the configuration of the notification channel can be found here: http://www.authoringfriday.com/2012/07/13/adding-custom-field-info-in-monitors-with-scom-2012/ Check the config in the middle of the blog post.It's doing common things uncommonly well that brings succes.
Free Windows Admin Tool Kit Click here and download it now
November 26th, 2012 6:40pm

Hi Dieter, I am using this as a 'how-to' as it would best fit our needs, http://blog.scomfaq.ch/2012/04/17/scom-2012-using-alert-customfields/ I have checked Tst vs. Prd - they are the same:
November 26th, 2012 7:19pm

I would like to suggest 2 things: Retype the quotes after you have copied them from the internet. Sometimes the single quotes are messed up during copy / paste.I have a similar setup without so many quotes which works for me. Check it out here: http://scug.be/dieter/2011/08/09/scom-2007-how-to-add-custom-field-to-monitor/It's doing common things uncommonly well that brings succes.
Free Windows Admin Tool Kit Click here and download it now
November 26th, 2012 7:25pm

As you suggested I manually typed in the command. Same result.
November 26th, 2012 7:59pm

Hi, If this configuration works well in Test environment and not in Prod environment first check under what account your script is run. If Notification account is not specified Management Server Action Account is used.
Free Windows Admin Tool Kit Click here and download it now
November 26th, 2012 8:42pm

What setting is returned if you run the following in bothe Test and Production on the server running the script: get-executionpolicy Regards Graham New System Center 2012 Blog! - http://www.systemcentersolutions.co.uk View OpsMgr tips and tricks at http://systemcentersolutions.wordpress.com/
November 27th, 2012 11:23am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics