<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Mark Manty blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/markmanty/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/markmanty/feed.xml</link>
    <description>System Center Operations Manager</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:59:41 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Registry tweaks for SCOM measure twice cut once</title>
      <link>https://docs.microsoft.com/archive/blogs/markmanty/registry-tweaks-for-scom-measure-twice-cut-once</link>
      <pubDate>Fri, 28 Apr 2017 19:49:05 GMT</pubDate>
      <dc:creator><![CDATA[Mark Manty]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/markmanty/?p=375</guid>
      <description><![CDATA[Hi all,

Wanted to call out something that happened recently with a customer.

When modifying...]]></description>
      <content:encoded><![CDATA[Hi all,

Wanted to call out something that happened recently with a customer.

When modifying registry ensure that you double or triple check any changes made: <a href="https://blogs.technet.microsoft.com/kevinholman/2017/03/08/recommended-registry-tweaks-for-scom-2016-management-servers/">Registry Tweaks</a>  (note Kevin's useful and handy reg add commands - that helps prevent below issue from occurring in first place).

A customer had inadvertently added the dalinitiateclearpool new qword (instead of dword) and then the sdk service would not stay running.

Here are the errors you may see on your management server with incorrect keys created.

26399 and 29380

Scroll down and note in the 29380 event log description we see "DataAccessRegistry.ReadInitiateClearPool" tipping us off on the issue. Simply delete the qword value and create new dword value and then the sdk service runs as designed.

&nbsp;

Log Name:      Operations Manager
Source:        OpsMgr SDK Service
Date:          2/5/2013 1:06:23 PM
Event ID:      26339
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Description:
An exception was thrown while initializing the service container.
Exception message: Initialize
Full exception: Feature of type

From &lt;https://vkbexternal.partners.extranet.microsoft.com/vkbwebservice/viewcontent.aspx?portalId=1&amp;filePath=file%3A%2F%2Fcy1mssvkblfs01.partners.extranet.microsoft.com%2Fmsscatalog%2F2013%2F02%2F04%2Fcb827dfe-fe6e-e211-987e-002dd802026b.xml&amp;contentType=MSS&amp;displayTermHighlighting=true&amp;promoteToEnglish=true&amp;displayXMLForm=false&amp;searchTerms=%3CSearchTerms%3E%3CTerm%20Text%3D%2226380%22%20%2F%3E%3CTerm%20Text%3D%22scom%22%20%2F%3E%3CTerm%20Text%3D%22ConfigurationReaderException%22%20%2F%3E%3C%2FSearchTerms%3E&amp;displayActions=true&amp;webPreview=true&amp;source=4096&amp;componentId=2&amp;sequence=18&amp;sessionId=1424104402151&gt;
Log Name:      Operations Manager
Source:        OpsMgr SDK Service
Date:          2/13/2017 14:25:27
Event ID:      26380
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Description:
The System Center Data Access service failed due to an unhandled exception.
The service will attempt to restart.
Exception:

Microsoft.EnterpriseManagement.ConfigurationReaderException: The feature named 'OperationsManager' and of type 'Microsoft.EnterpriseManagement.ServiceDataLayer.IDataAccessFeature, Microsoft.EnterpriseManagement.DataAccessService.Core, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' cannot be added to the container. ---&gt; Microsoft.EnterpriseManagement.ComponentActivationException: The constructor for the component threw an exception. Please see the inner exception for more details. ---&gt; System.TypeInitializationException: The type initializer for 'Microsoft.EnterpriseManagement.DataAccessLayer.DataAccessRegistry' threw an exception. ---&gt; System.TypeInitializationException: The type initializer for 'Microsoft.EnterpriseManagement.DataAccessLayer.GlobalDefaults' threw an exception. ---&gt; System.InvalidCastException: Specified cast is not valid.
at Microsoft.EnterpriseManagement.DataAccessLayer.<strong>DataAccessRegistry.ReadInitiateClearPool</strong>(String product)
at Microsoft.EnterpriseManagement.DataAccessLayer.GlobalDefaults.Initialize(String product)
at Microsoft.EnterpriseManagement.DataAccessLayer.GlobalDefaults..cctor()
--- End of inner exception stack trace ---
at Microsoft.EnterpriseManagement.DataAccessLayer.DataAccessRegistry.InitializeStateMap()
at Microsoft.EnterpriseManagement.DataAccessLayer.DataAccessRegistry..cctor()
--- End of inner exception stack trace ---
at Microsoft.EnterpriseManagement.DataAccessLayer.DataAccessRegistry.StateMap(String product)
at Microsoft.EnterpriseManagement.DataAccessLayer.RetryPolicy..ctor()
at Microsoft.EnterpriseManagement.ServiceDataLayer.DataAccessFeatureImplementation..ctor()
at Microsoft.EnterpriseManagement.ServiceDataLayer.DataAccessFeatureImplementation..ctor(EnterpriseManagementObjectViewName objectView)
--- End of inner exception stack trace ---
at Microsoft.EnterpriseManagement.ComponentActivator.Activate[T](ActivationContext`1 context)
at Microsoft.EnterpriseManagement.SingletonLifetimeManager`1.GetComponent[K]()
at Microsoft.EnterpriseManagement.FeatureContainer.GetFeatureInternal[T](Type type, String featureName)
at Microsoft.EnterpriseManagement.FeatureContainer.AddFeatureInternal[T,V](ActivationContext`1 context, String featureName)
--- End of inner exception stack trace ---
at Microsoft.EnterpriseManagement.ConfigurationReaderHelper.ReadFeatures(XPathNavigator navi, IContainer container)
at Microsoft.EnterpriseManagement.ConfigurationReaderHelper.Process()
at Microsoft.EnterpriseManagement.ServiceDataLayer.DispatcherService.Initialize(InProcEnterpriseManagementConnectionSettings configuration)
at Microsoft.EnterpriseManagement.ServiceDataLayer.DispatcherService.InitializeRunner(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart(Object obj)
Event Xml:
&lt;Event xmlns="https://schemas.microsoft.com/win/2004/08/events/event"&gt;
&lt;System&gt;
&lt;Provider Name="OpsMgr SDK Service" /&gt;
&lt;EventID Qualifiers="49152"&gt;26380&lt;/EventID&gt;
&lt;Level&gt;2&lt;/Level&gt;
&lt;Task&gt;0&lt;/Task&gt;
&lt;Keywords&gt;0x80000000000000&lt;/Keywords&gt;
&lt;TimeCreated SystemTime="2017-02-13T19:25:27.000000000Z" /&gt;
&lt;EventRecordID&gt;4783657&lt;/EventRecordID&gt;
&lt;Channel&gt;Operations Manager&lt;/Channel&gt;
&lt;Computer&gt;MyComputer.failure.com&lt;/Computer&gt;
&lt;Security /&gt;
&lt;/System&gt;
&lt;EventData&gt;
&lt;Data&gt;Microsoft.EnterpriseManagement.ConfigurationReaderException: The feature named 'OperationsManager' and of type 'Microsoft.EnterpriseManagement.ServiceDataLayer.IDataAccessFeature, Microsoft.EnterpriseManagement.DataAccessService.Core, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' cannot be added to the container. ---&amp;gt; Microsoft.EnterpriseManagement.ComponentActivationException: The constructor for the component threw an exception. Please see the inner exception for more details. ---&amp;gt; System.TypeInitializationException: The type initializer for 'Microsoft.EnterpriseManagement.<strong>DataAccessLayer.DataAccessRegistry'</strong> threw an exception. ---&amp;gt; System.TypeInitializationException: The type initializer for 'Microsoft.EnterpriseManagement.DataAccessLayer.GlobalDefaults' threw an exception. ---&amp;gt; System.InvalidCastException: Specified cast is not valid.
at Microsoft.EnterpriseManagement.DataAccessLayer.<strong>DataAccessRegistry.ReadInitiateClearPool</strong>(String product)
at Microsoft.EnterpriseManagement.DataAccessLayer.GlobalDefaults.Initialize(String product)
at Microsoft.EnterpriseManagement.DataAccessLayer.GlobalDefaults..cctor()
--- End of inner exception stack trace ---
at Microsoft.EnterpriseManagement.DataAccessLayer.DataAccessRegistry.InitializeStateMap()
at Microsoft.EnterpriseManagement.DataAccessLayer.DataAccessRegistry..cctor()
--- End of inner exception stack trace ---
at Microsoft.EnterpriseManagement.DataAccessLayer.DataAccessRegistry.StateMap(String product)
at Microsoft.EnterpriseManagement.DataAccessLayer.RetryPolicy..ctor()
at Microsoft.EnterpriseManagement.ServiceDataLayer.DataAccessFeatureImplementation..ctor()
at Microsoft.EnterpriseManagement.ServiceDataLayer.DataAccessFeatureImplementation..ctor(EnterpriseManagementObjectViewName objectView)
--- End of inner exception stack trace ---
at Microsoft.EnterpriseManagement.ComponentActivator.Activate[T](ActivationContext`1 context)
at Microsoft.EnterpriseManagement.SingletonLifetimeManager`1.GetComponent[K]()
at Microsoft.EnterpriseManagement.FeatureContainer.GetFeatureInternal[T](Type type, String featureName)
at Microsoft.EnterpriseManagement.FeatureContainer.AddFeatureInternal[T,V](ActivationContext`1 context, String featureName)
--- End of inner exception stack trace ---
at Microsoft.EnterpriseManagement.ConfigurationReaderHelper.ReadFeatures(XPathNavigator navi, IContainer container)
at Microsoft.EnterpriseManagement.ConfigurationReaderHelper.Process()
at Microsoft.EnterpriseManagement.ServiceDataLayer.DispatcherService.Initialize(InProcEnterpriseManagementConnectionSettings configuration)
at Microsoft.EnterpriseManagement.ServiceDataLayer.DispatcherService.InitializeRunner(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart(Object obj)&lt;/Data&gt;
&lt;/EventData&gt;
&lt;/Event&gt;

&nbsp;

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>SCOM Alert Update connector example for SCOM 2016</title>
      <link>https://docs.microsoft.com/archive/blogs/markmanty/scom-alert-update-connector-example-for-scom-2016</link>
      <pubDate>Mon, 24 Apr 2017 20:10:09 GMT</pubDate>
      <dc:creator><![CDATA[Mark Manty]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/markmanty/?p=345</guid>
      <description><![CDATA[Hi,

With the release of SCOM 2016 I elected to recompile this updated version of SCOM Alert...]]></description>
      <content:encoded><![CDATA[Hi,

With the release of SCOM 2016 I elected to recompile this updated version of SCOM Alert Updater connector example that I describe in a earlier post: <a href="https://blogs.technet.microsoft.com/markmanty/2012/05/03/scom-alert-updater-service-connector-example-updating-scom-alerts/">AUC Example </a>

Instructions on configuration are the same as mentioned in earlier post.

Note that I did very limited testing.  Built and installed on a all in one SCOM 2016 Lab environment. Validated connector is created and after configuring the connector to get all alerts it processed a handful of alerts.

Also, I put connector.xml and AlertUpdaterService.exe.config files in debug folder of zip. When copying text from blog it does not always copy over well, so included the copy I used in my lab environment as an example.

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/AUCFiles.png"><img width="300" height="159" class="alignnone size-medium wp-image-346" alt="aucfiles" src="https://msdnshared.blob.core.windows.net/media/2017/04/AUCFiles-300x159.png" /></a>

This version should allow you to configure on SCOM 2016 without having to grab old DLL's and place in service directories to allow for it to run. It just requires SCOM 2016 Console be installed. It was built with Visual studio 2015 targeting .net 4.5.

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/AlertUpdaterServiceSCOM2016.V1.zip">alertupdaterservicescom2016-v1</a>
<h4><strong>Disclaimer:</strong></h4>
<h4>All information on this blog is provided on an as-is basis with no warranties and for informational purposes only. Use at your own risk. The opinions and views expressed in this blog are those of the author and do not necessarily state or reflect those of my employer.</h4>
&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>SCOM Auto Author example tool</title>
      <link>https://docs.microsoft.com/archive/blogs/markmanty/scom-auto-author-example-tool</link>
      <pubDate>Thu, 22 Sep 2016 19:48:46 GMT</pubDate>
      <dc:creator><![CDATA[Mark Manty]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/markmanty/?p=245</guid>
      <description><![CDATA[Hi, Mark Manty Premier Field Engineer with Microsoft here with another example tool for System...]]></description>
      <content:encoded><![CDATA[Hi, Mark Manty Premier Field Engineer with Microsoft here with another example tool for System Center Operations Manager.

This example tool (version 1.2) allows you to use snippet templates that you have created with VSAE allowing command line driven automation using your snippet templates to create monitoring workflows.

Did I test every possible monitoring workflow? No, so don’t be surprised if some of your custom templates do not work. If you would like to share the template you use that is failing that would make it much easier to reproduce any issues that are discovered. Included in the zip file are the snippet template examples that I created for testing the tool.

&nbsp;
<h1>Command line examples</h1>
&nbsp;

When running the example tool with command line parameters passed, it will perform some validation checks to verify if the line is formatted and ready to add workflow automated from command line.

If it finds that there are invalid parameters, it will display this windows with command line help for each Template it finds in the template directory.

The tool always expects to see the templatesnippet file passed as first argument.

Second argument is the Management pack xml file that it should add workflow to or create new MP if the MP Xml file does not exist.

Each subsequent parameter passed is unique to the template snippet specified in the first argument passed.

Note that there is a check box selection that can be unchecked to prevent the window from closing automatically. This auto close feature was added to help ensure automated command line would continue running in the event that command line params were incorrect on one line or multiple.

<a href="https://msdnshared.blob.core.windows.net/media/2016/09/params-were-incorrect-on-line-line-or-multiple.png"><img width="1024" height="331" class="aligncenter wp-image-255 size-large" alt="params were incorrect on line line or multiple" src="https://msdnshared.blob.core.windows.net/media/2016/09/params-were-incorrect-on-line-line-or-multiple-1024x331.png" /></a>

Text from Command line help box.

Note: I will display until a semi-validated set of command line parameters are passed to me :)

&nbsp;

Command Line Help:

&nbsp;

scomautoauthor.exe "C:\SCOMTools\SCOMAutoAuthor\SCOMAutoAuthor\bin\Debug\Templates\SnippetTemplate.EventLog.Monitor.templatesnippet" "c:\temp\My.Management.Pack.Name.xml" "Monitor ID" "Monitor Display Name" "Monitor Target" "Event Log Name" "Event ID" "Event Source"

&nbsp;

scomautoauthor.exe "C:\SCOMTools\SCOMAutoAuthor\SCOMAutoAuthor\bin\Debug\Templates\SnippetTemplate.EventLog.WindowsComputer.Monitor.templatesnippet" "c:\temp\My.Management.Pack.Name.xml" "Monitor ID" "Monitor Display Name" "Monitor Target" "Event Log Name" "Event ID" "Event Source"

&nbsp;

scomautoauthor.exe "C:\SCOMTools\SCOMAutoAuthor\SCOMAutoAuthor\bin\Debug\Templates\SnippetTemplate.LocalApplication.Class.templatesnippet" "c:\temp\My.Management.Pack.Name.xml" "Class ID" "Class Display Name" "Registry Key" "Class Description"

&nbsp;

scomautoauthor.exe "C:\SCOMTools\SCOMAutoAuthor\SCOMAutoAuthor\bin\Debug\Templates\SnippetTemplate.Performance.Collection.Rule.templatesnippet" "c:\temp\My.Management.Pack.Name.xml" "Rule Class Target" "Rule ID" "Counter Name" "Object Name" "Instance Name" "Frequency"

&nbsp;

scomautoauthor.exe "C:\SCOMTools\SCOMAutoAuthor\SCOMAutoAuthor\bin\Debug\Templates\SnippetTemplate.Service.Monitor.templatesnippet" "c:\temp\My.Management.Pack.Name.xml" "Monitor Class Target" "Monitor ID" "Service Name" "Monitor Display Name" "Monitor Description"

&nbsp;

&nbsp;

&nbsp;

Below is an example that you could use to create a MP with discovery, event log, performance collections, and service monitors all from command line. Note that I have spaces in some of the last lines for fields that should not have spaces, demonstrating the tool auto remove spaces to correct.

Also, for the service monitors they both have the same Monitor ID specified and the tool automatically fixes that for you also, so the Field is unique in your MP. I imagine some users may not want this auto correction and may change this in future to configure allow auto correction or disable auto correction.

scomautoauthor.exe "C:\SCOMAutoAuthor\Templates\SnippetTemplate.LocalApplication.Class.templatesnippet" "c:\MPs\My.Management.Pack.Name.xml" "My.Target2" "My Class Target2 Display Name" "Software\MyTarget2" "My Target2 Class Description"

&nbsp;

scomautoauthor.exe "C:\SCOMAutoAuthor\Templates\SnippetTemplate.EventLog.Monitor.templatesnippet" "c:\MPs\My.Management.Pack.Name.xml" "Event.Monitor.1" "Monitor Event Log 1" "My.Target2" "Application" "1" "MyEventSource"

&nbsp;

scomautoauthor.exe "C:\SCOMAutoAuthor\Templates\SnippetTemplate.Performance.Collection.Rule.templatesnippet" "c:\MPs\My.Management.Pack.Name.xml" "My.Target2" "Rule.Collect.Perf1" "Counter1" "Object1" "Instance1" "900"

&nbsp;

scomautoauthor.exe "C:\SCOMAutoAuthor\Templates\SnippetTemplate.Service.Monitor.templatesnippet" "c:\MPs\My.Management.Pack.Name.xml" "My.Target2" "Monitor.Service.1" "Service1" "Monitor Service1" "Monitor Service1 Description"

&nbsp;

scomautoauthor.exe "C:\SCOMAutoAuthor\Templates\SnippetTemplate.Service.Monitor.templatesnippet" "c:\MPs\My.Management.Pack.Name.xml" "My.Target2" "Monitor.Service.1" "Service2" "Monitor Service2" "Monitor Service2 Description"

&nbsp;

scomautoauthor.exe "C:\SCOMAutoAuthor\Templates\SnippetTemplate.Performance.Collection.Rule.templatesnippet" "c:\MPs\My.Management.Pack.Name.xml" "My.Target2" "Rule.Col lect.Perf1" "Counter1" "Object1" "Instance1" "900"

&nbsp;

&nbsp;
<h1>Using with UI</h1>
&nbsp;

Note that you can also run this in UI. If you run example tool with no command line arguments and UI will be presented where you can enter MP or open MP file and create monitoring workflows by selecting the templates and entering information. This supports adding multiple lines resulting in multiple monitoring workflows being created.

<a href="https://msdnshared.blob.core.windows.net/media/2016/09/workflows-being-created.png"><img width="920" height="727" class="aligncenter wp-image-265 size-full" alt="workflows being created" src="https://msdnshared.blob.core.windows.net/media/2016/09/workflows-being-created.png" /></a>

&nbsp;

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2016/09/worflowscreated2.png"><img width="915" height="702" class="aligncenter wp-image-275 size-full" alt="worflowscreated2" src="https://msdnshared.blob.core.windows.net/media/2016/09/worflowscreated2.png" /></a>

&nbsp;

Note that you can select Target button to get formatted string that can be used for specifying the target you would like. It will be formatted with Alias reference and the tool will automatically add the correct alias for the references based on the MP you are adding workflows in.

<a href="https://msdnshared.blob.core.windows.net/media/2016/09/workflows-in.png"><img width="998" height="559" class="aligncenter wp-image-285 size-full" alt="workflows in" src="https://msdnshared.blob.core.windows.net/media/2016/09/workflows-in.png" /></a>

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2016/09/workflows-in2.png"><img width="994" height="553" class="aligncenter wp-image-295 size-full" alt="workflows in2" src="https://msdnshared.blob.core.windows.net/media/2016/09/workflows-in2.png" /></a>

&nbsp;

You can copy that string to use for your targeting.

After adding your monitoring workflows, select Create button to add those workflows to the MP.

When it is done it will clear out the date you entered for the workflows indicating it is complete and you can close the application.

&nbsp;

Note: you can validate MP is ok by importing into test environment, or by using MP Author tool or VSAE to validate MP is correct.

&nbsp;

&nbsp;
<h1>Additional notes</h1>
&nbsp;

Must run as admin command prompt.

Requires .NET 4.5.2 or later.

Example tool creates C:\temp directory if does not exist and create files in that directory for adding monitor workflows. We do not clean up those files, so can look at them for troubleshooting purposes.

Example tool auto increment the version on the MP file after each monitor workflow is added. So, if your version starts at 1.0.0.0 and you use the example tool to add 2 new monitors, the new version will be 1.0.0.2

Example tool makes backup copies of MP before each monitor workflow is added. The backup files are in the same directory where you create your new or update your MP with SCOM Auto author. They have extensions with date time, so they can be opened with notepad to review changes to MP as each workflow was added. It is safe to delete these files if you prefer to do so.

&nbsp;
<h1>Installation/Configuration</h1>
&nbsp;

Copy files in zip file to a directory.

<a href="https://msdnshared.blob.core.windows.net/media/2016/09/to-a-directory.png"><img width="300" height="151" class="size-medium wp-image-305 aligncenter" alt="to a directory" src="https://msdnshared.blob.core.windows.net/media/2016/09/to-a-directory-300x151.png" /></a>

&nbsp;

If running on system without SCOM console installed, you can copy Microsoft.EnterpriseManagement.Core.dll to same directory so it can find the DLL to allow run successful.

Note that the MPs folder listed below contains all the sealed management packs that you may want to reference in the management pack files you are creating. If you need to add additional MP’s to the folder, you can do this and the tool will automatically load the classes and references will be available when building your management packs. Note that after adding new sealed MP files to directory the next time you run the tool it will read those additional or updated MP’s and they will be available for targeting. If tool is already running, close the application and run again for updated list to be available.

<a href="https://msdnshared.blob.core.windows.net/media/2016/09/to-be-available.png"><img width="775" height="208" class="aligncenter wp-image-315 size-full" alt="to be available" src="https://msdnshared.blob.core.windows.net/media/2016/09/to-be-available.png" /></a>

&nbsp;
<h2>How to add additional templates to tool.</h2>
&nbsp;

You will add three files with the same name and different extensions to the folder named Templates where the SCOMAutoAuthor.exe example tool resides.

Screen shot below:

<a href="https://msdnshared.blob.core.windows.net/media/2016/09/resides-screen-shots-below.png"><img width="824" height="446" class="aligncenter wp-image-325 size-full" alt="resides screen shots below" src="https://msdnshared.blob.core.windows.net/media/2016/09/resides-screen-shots-below.png" /></a>

The RTF file will contain notes on how to use the template monitor, this is for display purposes only and help for others that may be using your templatesnippet file. It is loaded in tool UI when your template is selected from the drop down menu.

The TemplateSnippet file is a VSAE template snippet file you or someone else may have created using Visual Studio Authoring Extensions.

The TXT file contains information about the templatesnippet file that helps SCOMAutoAuthor format data and allows for you to select the order in which the input data is required. It also allows for specifying if a data field should be unique within the management pack file you are creating and also if spaces should be allowed in a given field. The program will remove spaces if specified and also ensure the string is unique within an MP by auto adding random number to end of string field until the string field is unique and not found in the management pack.

I am not going to cover snippettemplate files format here, however there are many blogs and resources available to learn how to create and use them with Visual Studio Authoring Extensions, a couple are listed below.

<a href="https://blogs.technet.microsoft.com/kevinholman/2014/01/21/how-to-use-snippets-in-vsae-to-write-lots-of-workflows-quickly/">https://blogs.technet.microsoft.com/kevinholman/2014/01/21/how-to-use-snippets-in-vsae-to-write-lots-of-workflows-quickly/</a>

<a href="https://tjmklaver.wordpress.com/2012/06/15/author-your-mp-with-snippet-templates-in-visual-studio/">https://tjmklaver.wordpress.com/2012/06/15/author-your-mp-with-snippet-templates-in-visual-studio/</a>

&nbsp;

The TXT file example contents are below:

Service Monitor Basic - Target hosted class (Monitor Target, Service Name, Service Monitor display name, Service Monitor description)

#text('Monitor Target')#;Monitor Class Target;nospace

#text('Monitor Id')#;Monitor ID;UniqueNoSpace

#text('ServiceName')#;Service Name;none

#text('Service Monitor Display Name')#;Monitor Display Name;none

#text('Service Monitor Description')#;Monitor Description;none

-- comment field

-- Replacement string;Display string for field;(UniqueNoSpace,nospace,none)

&nbsp;

The first line in the above example is the display name that is displayed in SCOMAutoAuthor tool drop down menu. This helps you to inform the user of what this template creates and is used for.

Each subsequent line represents one parameter that is required by the snippetTemplate file and specifies the string that it replaces within snippettemplate file;Display String for the columns; Field requirements (like none, or Must be unique with no spaces, or just should not allow any spaces).

If “–-“ is found in first two characters of a line it is treated as a comment line that the tool ignores.

&nbsp;

&nbsp;
<h2>NOTE</h2>
&nbsp;

Txt file and snippet files #text and alias are CASE SENSITIVE. Replacement of text fails if does not match case.

&nbsp;

&nbsp;
<h1>Version 1.2 and later</h1>
&nbsp;

Items listed below are included with versions 1.2 and later of this example tool.
<h2>Monitor workflows with scripts</h2>
&nbsp;

Added script file replacement capability with your templates. This allows you to specify a script file for the template to embed in your management pack using command line to create the monitoring workflows.

&nbsp;

PowerShell.Script.Monitor.Two.State.Timed.ServerOS.Target

For this example template the contents of text file are:

PowerShell Script Timed two state Monitor (Target Server OS disabled)

#text('Monitor Id')#;Monitor ID;UniqueNoSpace

#text('Monitor Name')#;Monitor Display Name;none

#text('Script Name')#;Script Name (ends with .PS1);endswithps1

$IncludeFileContent/Scripts/MonitoringScript.PS1$;PS Script Path;script

#text('Folder')#;Folder Check;none

#text('Max Files')#;Max Files In Folder;none

-- Example of a comment line

&nbsp;

&nbsp;

In the template snippet file see where Monitoring script is specified and highlighted in yellow. Note that in the template we have &lt;![CDATA[ and ]]&gt; surrounding the script. Since most scripts we reference will not be xml safe we simple surround with CDATA to prevent us from having to make our scripts XML safe replacing characters to make them xml safe. This allows us to insert scripts that we have already tested from running without further modification.

..

..

&lt;ProbeAction ID="Probe" TypeID="#alias('Microsoft.Windows.Library')#!Microsoft.Windows.PowerShellPropertyBagTriggerOnlyProbe"&gt;

&lt;ScriptName&gt;#text('Script Name')#&lt;/ScriptName&gt;

&lt;ScriptBody&gt;

&lt;![CDATA[

$IncludeFileContent/Scripts/MonitoringScript.PS1$

]]&gt;

&lt;/ScriptBody&gt;

&lt;Parameters&gt;

..

..

&nbsp;

&nbsp;

Let me know what you think of the tool and let me know if you find any issues with any templates you use. Would appreciate the template and txt file from any that you experience failures with. I have created a few included and imagine there are some cases where it may fail. I can take a look at it and work on when I have time to correct those issues.

&nbsp;

Thank you for reading.

&nbsp;
<h4><strong>Disclaimer:</strong></h4>
<h4>All information on this blog is provided on an as-is basis with no warranties and for informational purposes only. Use at your own risk. The opinions and views expressed in this blog are those of the author and do not necessarily state or reflect those of my employer.</h4>
&nbsp;

Example tool zip file below

<a href="https://msdnshared.blob.core.windows.net/media/2016/09/SCOMAutoAuthor_v1.2.zip">SCOMAutoAuthor_v1.2</a>

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>SCOM scheduling maintenance mode tool</title>
      <link>https://docs.microsoft.com/archive/blogs/markmanty/scom-scheduling-maintenance-mode-tool</link>
      <pubDate>Tue, 16 Apr 2013 05:47:00 GMT</pubDate>
      <dc:creator><![CDATA[Mark Manty]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/markmanty/2013/04/16/scom-scheduling-maintenance-mode-tool/</guid>
      <description><![CDATA[Hi,
Mark Manty Premier Field Engineer with Microsoft here with another example for SystemCenter...]]></description>
      <content:encoded><![CDATA[<p>Hi,</p>
<p>Mark Manty Premier Field Engineer with Microsoft here with another example for System<br />Center Operations Manager.</p>
<p>You might recall the previous example&nbsp;command line tool that would set maintenance<br />mode for a list of servers in a text file. Today I have an updated example that<br />built upon the existing tool. Previous example: <a href="https://blogs.technet.com/b/markmanty/archive/2012/05/14/scom-maintenance-mode-setting-for-list-of-servers.aspx">https://blogs.technet.com/b/markmanty/archive/2012/05/14/scom-maintenance-mode-setting-for-list-of-servers.aspx</a></p>
<p>You may find that you have many requests for scheduling down time for servers and would<br />rather enable your customers to set their own maintenance mode times without<br />logging into SCOM servers. With this new example you can provide customers with<br />access to copy text file to a share with their list of servers and maintenance<br />mode configuration to allow them to perform this on their own.</p>
<p>I ran this in a test environment and it does not have to run on a RMS or MS to work. It must<br />meet the below requirements in order to run successfully:</p>
<ul>
<li>.NET 3.5 Framework</li>
<li>SCOM R2 Console (User Interface installed) or SCOM 2012 Console (tested with SCOM 2012 SP1)</li>
<li>Run under an account that has administrative rights to the SCOM Management Group</li>
</ul>
<p>&nbsp;</p>
<p>Extract the file MaintenanceModeListSched.exe from MaintenanceModeListSchedExample_V1.zip<br />to a directory of your choice.</p>
<p>Open Administrative command prompt and edit a text file with the systems you want to<br />put in maintenance mode.</p>
<p>Here I am typing out the text of three example files used to set maintenance mode for. Note the first line is date time in military time. 2nd line is ON or OFF indicating to turn on or off maintenance mode. 3rd line is number of minutes. 4th line is the maintenance mode reason. 5th through last line is the list of servers you want to set maintenance mode on.</p>
<p><br />Example1.mm is set to run at 4:00 pm or later. Example2.mm is set to run at<br />6:23 pm. And ExampleFail.mm has a miss-formatted date time field.</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/8468.Capture1.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/8468.Capture1.PNG"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/8468.Capture1.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/8468.Capture1.PNG" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>Run the maintenancemodelistsched.exe with no parameters to see what the command line<br />tool expects for parameters.</p>
<p>Now run command passing in your RMS name, directory where maintenance mode text files will<br />reside, and wildcard to the file names to process.</p>
<p>Example:</p>
<p>MaintenanceModeList.exe<br />SCOMRMS&nbsp;c:\Maintmodelistschedule *.txt</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/5305.Capture2.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/5305.Capture2.PNG"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/5305.Capture2.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/5305.Capture2.PNG" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>Note only&nbsp;the servers in example1 file were set, however the Management servers were not placed in maintenance mode by design.&nbsp;</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/3324.Capture3.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/3324.Capture3.PNG"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/3324.Capture3.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/3324.Capture3.PNG" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>See folders and results.txt file contents. Results are appended to this file every time it sets<br />maintenance mode on servers specified in the files.</p>
<p>Screen shot<br />below:</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/4571.Capture4.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/4571.Capture4.PNG"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/4571.Capture4.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/4571.Capture4.PNG" alt="" border="0" /></a>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>If a file is miss formatted it is moved to the Failed folder for your review.</p>
<p>&nbsp;&nbsp;</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/6607.Capture5.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/6607.Capture5.PNG"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/6607.Capture5.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/6607.Capture5.PNG" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Note that the file that was processed is moved to the Completed folder and renamed to add<br />date time to ensure unique and allow you to know when this file was processed.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/2318.Capture6.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/2318.Capture6.PNG"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/2318.Capture6.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/2318.Capture6.PNG" alt="" border="0" /></a></p>
<p>&nbsp;&nbsp;</p>
<p>&nbsp;Event log error is created in the event of a date time parsing error. See event below:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/8030.EventLogError.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/8030.EventLogError.PNG"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/8030.EventLogError.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/8030.EventLogError.PNG" alt="" border="0" /></a>&nbsp;</p>
<p>&nbsp;</p>
<p>Event log success informational event is raised for every file it processes successfully.</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/4137.EventLogProcessed.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/4137.EventLogProcessed.PNG"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/4137.EventLogProcessed.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/4137.EventLogProcessed.PNG" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>Event 100 is logged every time the tool is run. This could be used to monitor for missed<br />event and alert to notify you when the scheduled task may be failing to execute<br />the tool.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/1184.EventLogInformational.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/1184.EventLogInformational.PNG"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/1184.EventLogInformational.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/1184.EventLogInformational.PNG" alt="" border="0" /></a>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>You can create scheduled tasks to run every 5, 10, or 15 minutes to set maintenance mode on<br />the files in a folder of your choice. Then ensure you share out that folder to<br />customers that will be using this process to schedule maintenance mode for<br />their servers. As mentioned earlier you can monitor for events in the event log<br />to alert you when issues occur.</p>
<p>&nbsp;</p>
<p>This is an example tool that will enable your customers to schedule maintenance mode on<br />servers without having to understand how to navigate SCOM and also without<br />having to provide access to the SCOM console.</p>
<p>&nbsp;</p>
<p><strong><em>Disclaimer:</em></strong></p>
<p><strong><em>This example is provided &ldquo;AS IS&rdquo; with no warranty expressed or implied. Run<br />at your own risk. The opinions and views expressed in this blog are those of<br />the author and do not necessarily state or reflect those of Microsoft.</em></strong></p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/telligent.evolution.components.attachments/01/9071/00/00/03/56/70/23/MaintenanceModeListSchedExample_V1.zip" original-url="https://blogs.technet.com/cfs-filesystemfile.ashx/__key/telligent-evolution-components-attachments/01-9071-00-00-03-56-70-23/MaintenanceModeListSchedExample_5F00_V1.zip">MaintenanceModeListSchedExample_V1.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Automate closing old SCOM alerts tool</title>
      <link>https://docs.microsoft.com/archive/blogs/markmanty/automate-closing-old-scom-alerts-tool</link>
      <pubDate>Thu, 16 Aug 2012 08:07:00 GMT</pubDate>
      <dc:creator><![CDATA[Mark Manty]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/markmanty/2012/08/16/automate-closing-old-scom-alerts-tool/</guid>
      <description><![CDATA[Hi,
Mark Manty Premier Field Engineer with Microsoft here with another example tool for System...]]></description>
      <content:encoded><![CDATA[<p>Hi,</p>
<p>Mark Manty Premier Field Engineer with Microsoft here with another example tool for System Center Operations Manager.</p>
<p>Today I have an example tool that can be used to close old SCOM alerts. For those that do not want to use command line PowerShell commands to perform these actions they can use this&nbsp;command line tool to save time closing alerts.</p>
<p>I ran this in a test environment and it does not have to run on a RMS or MS to work. It must meet the below requirements in order to run successfully:</p>
<ul>
<li>.NET 3.5 Framework</li>
<li>SCOM R2 Console (User Interface installed)</li>
<li>Run as account that has administrative rights to the SCOM Management Group</li>
</ul>
<p>Extract the files to some directory of your choice.</p>
<p>Open Administrative command prompt and run the CloseOldSCOMAlerts.exe scomrms&nbsp;48 * Rules</p>
<p>Where scomrms is your root management server name. 48 is the number of hours old alerts to close. * is all alerts (can specify "Health Service" to only close alerts that have "Health Service string in the alert name). Rules specifies only to close alerts that are generated from Rules.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/0245.1.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/0245.1.PNG"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/0245.1.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/0245.1.PNG" /></a></p>
<p>The first two parameters are required. If you do not specify third and fourth parameter it defaults to close all alerts (monitors and rules).</p>
<p>The third parameter can be used to specify a string to match on alert name to close only those that contain that string or you can specify * to close any alert.</p>
<p>The fourth parameter can specify "Rules", "Monitors", or ALL. Rules will only close alerts from rules and Monitors will close alerts only from Monitors.</p>
<p>Note that closing alerts that are generated from Monitors Will NOT reset the health of the monitor. It only closes the alert.</p>
<p>If you have an alerting rule that is used to validate alerting is working, this would be an option you could use to schedule closing of old alerts to help ensure these old alerts do not fill up your operations manager database that will impact your performance.</p>
<p>I hope you find this tool useful and enjoy this example tool.</p>
<p>&nbsp;</p>
<p><em><b>Disclaimer:</b></em></p>
<p><em><b>This example is provided &ldquo;AS IS&rdquo; with no warranty expressed </b></em><em><b>or implied. Run at your own risk. </b></em><em><b>The opinions and views expressed in this </b></em><em><b>blog are those of the author and do not necessarily state or reflect those of </b></em><em><b>Microsoft.</b></em></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/telligent.evolution.components.attachments/01/9071/00/00/03/51/47/31/CloseOldSCOMAlertsv1.zip" original-url="https://blogs.technet.com/cfs-filesystemfile.ashx/__key/telligent-evolution-components-attachments/01-9071-00-00-03-51-47-31/CloseOldSCOMAlertsv1.zip">CloseOldSCOMAlertsv1.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Get Connected Consoles command line tool for SCOM</title>
      <link>https://docs.microsoft.com/archive/blogs/markmanty/get-connected-consoles-command-line-tool-for-scom</link>
      <pubDate>Fri, 22 Jun 2012 13:48:00 GMT</pubDate>
      <dc:creator><![CDATA[Mark Manty]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/markmanty/2012/06/22/get-connected-consoles-command-line-tool-for-scom/</guid>
      <description><![CDATA[Hi,
Mark Manty Premier Field Engineer with Microsoft here with another example for System Center...]]></description>
      <content:encoded><![CDATA[<p>Hi,</p>
<p>Mark Manty Premier Field Engineer with Microsoft here with another example for System Center Operations Manager.</p>
<p>Today we are going to walk through an example command line tool that will display the current number of connections to the SCOM SDK service.</p>
<p>In most cases the recommended limit to the number of console connections you should have are 50 <span style="color: black; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">simultaneous </span>connections. If you have a large number of agents reporting into one management group the recommended limit declines to 25 <span style="color: black; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">simultaneous </span>connections.&nbsp;Discovering whom is connected is the problem we are addressing with this tool today.</p>
<p>I ran this in a test environment and it does not have to run on a RMS or MS to work. It must meet the below requirements in order to run successfully:</p>
<ul>
<li>.NET 3.5 Framework</li>
<li>SCOM R2 Console (User Interface installed)</li>
<li>Run as account that has administrative rights to the SCOM Management Group</li>
</ul>
<p>Extract the files to some directory of your choice.</p>
<p>Open Administrative command prompt.</p>
<p>Run the GetConnectedConsoles.exe with no parameters to see what the command line tool expects for parameters.</p>
<p>As you can see, it is only looking for one parameter that is your RMS server name.</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/6428.Capture.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/6428.Capture.PNG"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/6428.Capture.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/6428.Capture.PNG" /></a></p>
<p>&nbsp;</p>
<p>The program lists out all the users that currently have a SCOM console connection. Users will be displayed once for every connection they have open.</p>
<p>This is an example tool that will assist in finding who has how many SCOM consoles open.</p>
<p></p>
<p><em><b>Disclaimer:</b></em></p>
<p><em><b>This example is provided &ldquo;AS IS&rdquo; with no warranty expressed </b></em><em><b>or implied. Run at your own risk. </b></em><em><b>The opinions and views expressed in this </b></em><em><b>blog are those of the author and do not necessarily state or reflect those of </b></em><em><b>Microsoft.</b></em></p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/telligent.evolution.components.attachments/01/9071/00/00/03/50/54/84/GetConnectedConsolesV1.zip" original-url="https://blogs.technet.com/cfs-filesystemfile.ashx/__key/telligent-evolution-components-attachments/01-9071-00-00-03-50-54-84/GetConnectedConsolesV1.zip">GetConnectedConsolesV1.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>SCOM Agent Primary/Failover Management Server configuration tool</title>
      <link>https://docs.microsoft.com/archive/blogs/markmanty/scom-agent-primaryfailover-management-server-configuration-tool</link>
      <pubDate>Tue, 05 Jun 2012 13:13:00 GMT</pubDate>
      <dc:creator><![CDATA[Mark Manty]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/markmanty/2012/06/05/scom-agent-primaryfailover-management-server-configuration-tool/</guid>
      <description><![CDATA[Hi,
Mark Manty Premier Field Engineer with Microsoft here with another example&nbsp;tool&nbsp;for...]]></description>
      <content:encoded><![CDATA[<p>Hi,</p>
<p>Mark Manty Premier Field Engineer with Microsoft here with another example&nbsp;tool&nbsp;for System Center Operations Manager.</p>
<p>Today&nbsp;I have an example&nbsp;tool that&nbsp;can be used to view and change SCOM agent's Primary and Failover management servers. For those that do not want to use command line PowerShell commands to perform these actions they can use this visual tool to configure for agent failover.</p>
<p>I ran this in a test environment and it does not have to run on a RMS or MS to work. It must meet the below requirements in order to run successfully:</p>
<ul>
<li>.NET 3.5 Framework</li>
<li>SCOM R2 Console (User Interface installed)</li>
<li>Run as account that has administrative rights to the SCOM Management Group</li>
</ul>
<p>Extract the files to some directory of your choice.</p>
<p>Open Administrative command prompt&nbsp;and run the AgentFailover.exe. Type in your Root Management server name and select Connect to load all agent information.</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/1050.1.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/1050.1.PNG"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/1050.1.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/1050.1.PNG" /></a></p>
<p>&nbsp;</p>
<p>Select an agent to view it's current configuration. Use add and remove to change failover agents and/or change the primary Management server using drop down list. Select Apply Changes button to set the new changes.</p>
<p>If you want an updated list of all agents configuration information select Refresh All Information button to do so.</p>
<p>Hope you find this tool useful and enjoy this example tool.</p>
<p>&nbsp;</p>
<p><em><b>Disclaimer:</b></em></p>
<p><em><b>This example is provided &ldquo;AS IS&rdquo; with no warranty expressed </b></em><em><b>or implied. Run at your own risk. </b></em><em><b>The opinions and views expressed in this </b></em><em><b>blog are those of the author and do not necessarily state or reflect those of </b></em><em><b>Microsoft.</b></em></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/telligent.evolution.components.attachments/01/9071/00/00/03/50/21/71/AgentFailOverV1.zip" original-url="https://blogs.technet.com/cfs-filesystemfile.ashx/__key/telligent-evolution-components-attachments/01-9071-00-00-03-50-21-71/AgentFailOverV1.zip">AgentFailOverV1.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>SCOM maintenance mode setting for list of servers</title>
      <link>https://docs.microsoft.com/archive/blogs/markmanty/scom-maintenance-mode-setting-for-list-of-servers</link>
      <pubDate>Mon, 14 May 2012 09:15:00 GMT</pubDate>
      <dc:creator><![CDATA[Mark Manty]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/markmanty/2012/05/14/scom-maintenance-mode-setting-for-list-of-servers/</guid>
      <description><![CDATA[Hi,
Mark Manty Premier Field Engineer with Microsoft here with another example for System Center...]]></description>
      <content:encoded><![CDATA[<p>Hi,</p>
<p>Mark Manty Premier Field Engineer with Microsoft here with another example for System Center Operations Manager.</p>
<p>Today we are going to walk through an example&nbsp;command line tool that will set maintenance mode for a list of servers in a text file.</p>
<p>Customers who have large environments with SCOM agents will at some point in time need to set maintenance mode for a large number of servers. This example tool will read a list of servers and set maintenance mode on them for the number of minutes specified. It can also stop maintenance mode for a list of servers. It validates that the servers in the tex file are not management servers to prevent setting maintenance mode on your SCOM infrastructure.</p>
<p>I ran this in a test environment and it does not have to run on a RMS or MS to work. It must meet the below requirements in order to run successfully:</p>
<ul>
<li>.NET 3.5 Framework</li>
<li>SCOM R2 Console (User Interface installed)</li>
<li>Run as account that has administrative rights to the SCOM Management Group</li>
</ul>
<p>&nbsp;</p>
<p>Extract the files to some directory of your choice.</p>
<p>Open Administrative command prompt and edit a text file with the systems you want to put in maintenance mode.</p>
<p>Run the maintenancemodelist.exe with no parameters to see what the command line tool expects for parameters.</p>
<p>NOTE: I added an additional parameter that you can use to add your specific comments for the reason you are setting maintenance mode. See Maintmodelisttoolv2 download.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/6354.1.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/6354.1.PNG"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/6354.1.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/6354.1.PNG" /></a></p>
<p>&nbsp;</p>
<p>Now run command passing in your RMS name, path to server list, ON, number minutes for maintenance mode, and optionally the name of the results file to save results to.</p>
<p>Example:</p>
<p>MaintenanceModeList.exe SCOMRMS&nbsp;c:\Maintmode\serverlist.txt&nbsp;ON 120</p>
<p>Results are saved to results.txt file as a default if you do not provide the output file.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/35373.2.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/35373.2.PNG"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/35373.2.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/35373.2.PNG" /></a></p>
<p>&nbsp;</p>
<p>See that the servers I listed in my input file are now in maintenance mode and that they were set to 120 minutes.</p>
<p>Note that the tool will not set maintenance mode on SCOM Management servers. This can be useful to use and prevent users from setting maintenance mode on your SCOM servers causing you headaches to recover from.</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/2477.3.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/2477.3.PNG"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/2477.3.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/2477.3.PNG" /></a></p>
<p>&nbsp;</p>
<p>Now we can run the tool with below command line to stop maintenance mode on the list of servers we previously set.</p>
<p>MaintenanceModeList.exe scomrms c:\maintmode\serverlist.txt Off</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/4760.4.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/4760.4.PNG"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/4760.4.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/4760.4.PNG" /></a></p>
<p>&nbsp;</p>
<p>Notice that maintenance mode was turned off for all servers in your input file.</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/5241.5.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/5241.5.PNG"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/5241.5.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/5241.5.PNG" /></a></p>
<p>&nbsp;</p>
<p>This is an example tool that will will speed up the process of setting maintenance mode for a list of servers.</p>
<p>&nbsp;</p>
<p><em><b>Disclaimer:</b></em></p>
<p><em><b>This example is provided &ldquo;AS IS&rdquo; with no warranty expressed </b></em><em><b>or implied. Run at your own risk. </b></em><em><b>The opinions and views expressed in this </b></em><em><b>blog are those of the author and do not necessarily state or reflect those of </b></em><em><b>Microsoft.</b></em></p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/telligent.evolution.components.attachments/01/9071/00/00/03/49/78/30/MaintModeListToolv2.zip" original-url="https://blogs.technet.com/cfs-filesystemfile.ashx/__key/telligent-evolution-components-attachments/01-9071-00-00-03-49-78-30/MaintModeListToolv2.zip">MaintModeListToolv2.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>SCOM Alert Updater Service - connector example updating SCOM alerts</title>
      <link>https://docs.microsoft.com/archive/blogs/markmanty/scom-alert-updater-service-connector-example-updating-scom-alerts</link>
      <pubDate>Thu, 03 May 2012 07:10:00 GMT</pubDate>
      <dc:creator><![CDATA[Mark Manty]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/markmanty/2012/05/03/scom-alert-updater-service-connector-example-updating-scom-alerts/</guid>
      <description><![CDATA[Hi,

Mark Manty Premier Field Engineer with Microsoft here with another example for System Center...]]></description>
      <content:encoded><![CDATA[Hi,

Mark Manty Premier Field Engineer with Microsoft here with another example for System Center Operations Manager.

Quick note on updated build for SCOM 2016: <a href="https://blogs.technet.microsoft.com/markmanty/2017/04/24/scom-alert-update-connector-example-for-scom-2016/">AUC updated example</a>

Today we are going to walk through an example Windows service that is a SCOM connector.

Customers who use product connectors often find they need to modify custom fields and place important data there for their incident management systems to leverage. Additionally connector subscriptions criteria
is limited, we often will need more granular control of which alerts we want to send across a connector to create incidents. Reducing floods of incidents created from SCOM alerts is a priority with most organizations.

My example connector service provides this capability and is simple to maintain and install, plus I have provided the source code for this example allowing anyone interested the ability to add features and/or functionality.

PFE customers may already be familiar with Boris Yanushpolsky’s Alert Update Connector. This is an example that I developed that simulates similar functionality. Building the service requires Visual Studio 2010 and for the SCOM R2 agent to be installed on the system you are building service. SCOM agent does not have to report to a management group.

I ran this in a test environment and it does not have to run on a RMS or MS to work. It must meet the below requirements in order to run successfully:
<ul>
 	<li>.NET 4.0 Framework</li>
 	<li>SCOM R2 Console (User Interface installed) or SCOM 2012 Console installed</li>
 	<li>Run as account that has administrative rights to the SCOM Management Group</li>
</ul>
Let’s dive in.

Select Administration – Settings in SCOM Console and use New… button to create new resolution states for Processed and SendAlert. Processed should be set to 251 and SendAlert can be 252 for example.

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/2313.1.PNG"></a><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/3187.NewResStatesCreate.PNG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/3187.NewResStatesCreate.PNG" border="0" /></a>
Note that the Processed 251 resolution state is hard coded in the service. This is the resolution state that the connector service updates alerts that have been processed. You should use the connector configuration file (more on this file later) to change resolution state to SendAlert 252 value should you want to pass this on to another connector that will then forward these events to your ticketing system.

<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/6175.ResState251.PNG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/6175.ResState251.PNG" border="0" /></a>
<b></b>

<b>Create Connector Configuration file</b>

One of the items in alertupdaterservice.exe.config file is ConfigurationFilePath. This contains the path and file name that stores your alerts to modify.

Below is the text to copy and paste into your Connector.xml file.

The first alert source is an example with all possible Property Names you can modify. ResolutionState, CustomField1 – 10.

<span style="font-size: xx-small">&lt;ConnectorConfig </span><span style="font-size: xx-small">GlobalResolutionState="251"&gt;</span>

<span style="font-size: xx-small">  &lt;AlertSources&gt;</span>

<span style="font-size: xx-small">    &lt;AlertSource </span><span style="font-size: xx-small">Id="b59f78ce-c42a-8995-f099-e705dbb34fd4" Type="Monitor" </span><span style="font-size: xx-small">UserName="Domain\username"&gt;</span>

<span style="font-size: xx-small">      &lt;PropertiesToModify&gt;</span>

<span style="font-size: xx-small">        &lt;Property </span><span style="font-size: xx-small">Name="ResolutionState" NewValue="252" </span><span style="font-size: xx-small">GroupIdFilter="" /&gt;</span>

<span style="font-size: xx-small">        &lt;Property Name="CustomField1" </span><span style="font-size: xx-small">NewValue="$ServerName$" GroupIdFilter="" /&gt;</span>

<span style="font-size: xx-small">        &lt;Property </span><span style="font-size: xx-small">Name="CustomField2" NewValue="$Id$" </span><span style="font-size: xx-small">GroupIdFilter="" /&gt;</span>

<span style="font-size: xx-small">        &lt;Property </span><span style="font-size: xx-small">Name="CustomField3" NewValue="$Name$" </span><span style="font-size: xx-small">GroupIdFilter="" /&gt;</span>

<span style="font-size: xx-small">        &lt;Property </span><span style="font-size: xx-small">Name="CustomField4" NewValue="$ManagementGroup$" </span><span style="font-size: xx-small">GroupIdFilter="" /&gt;</span>

<span style="font-size: xx-small">        &lt;Property </span><span style="font-size: xx-small">Name="CustomField5" </span><span style="font-size: xx-small">NewValue="$MonitoringObjectDisplayName$" GroupIdFilter="" </span><span style="font-size: xx-small">/&gt;</span>

<span style="font-size: xx-small">        &lt;Property </span><span style="font-size: xx-small">Name="CustomField6" NewValue="$MonitoringObjectFullName$" </span><span style="font-size: xx-small">GroupIdFilter="" /&gt;</span>

<span style="font-size: xx-small">        &lt;Property Name="CustomField7" </span><span style="font-size: xx-small">NewValue="$NetbiosComputerName$" GroupIdFilter="" /&gt;</span>

<span style="font-size: xx-small">        &lt;Property </span><span style="font-size: xx-small">Name="CustomField8" NewValue="$NetbiosDomainName$" </span><span style="font-size: xx-small">GroupIdFilter="" /&gt;</span>

<span style="font-size: xx-small">        &lt;Property </span><span style="font-size: xx-small">Name="CustomField9" NewValue="$PrincipalName$" </span><span style="font-size: xx-small">GroupIdFilter="" /&gt;</span>

<span style="font-size: xx-small">        &lt;Property </span><span style="font-size: xx-small">Name="CustomField10" NewValue="$Severity$" </span><span style="font-size: xx-small">GroupIdFilter="" /&gt;</span>

<span style="font-size: xx-small">      &lt;/PropertiesToModify&gt;</span>

<span style="font-size: xx-small">    &lt;/AlertSource&gt;</span>

<span style="font-size: xx-small">    &lt;AlertSource </span><span style="font-size: xx-small">Id="308c0379-f7f0-0a81-a947-d0dbcf1216a7" Type="Monitor" </span><span style="font-size: xx-small">UserName="Domain\username"&gt;</span>

<span style="font-size: xx-small">      &lt;PropertiesToModify&gt;</span>

<span style="font-size: xx-small">        &lt;Property </span><span style="font-size: xx-small">Name="ResolutionState" NewValue="252" </span><span style="font-size: xx-small">GroupIdFilter="" /&gt;</span>

<span style="font-size: xx-small">        &lt;Property </span><span style="font-size: xx-small">Name="CustomField1" NewValue="$ServerName$" </span><span style="font-size: xx-small">GroupIdFilter="" /&gt;</span>

<span style="font-size: xx-small">      &lt;/PropertiesToModify&gt;</span>

<span style="font-size: xx-small">    &lt;/AlertSource&gt;</span>

<span style="font-size: xx-small">      &lt;/PropertiesToModify&gt;</span>

<span style="font-size: xx-small">    &lt;/AlertSource&gt;</span>

<span style="font-size: xx-small">  &lt;/AlertSources&gt;</span>

<span style="font-size: xx-small">&lt;/ConnectorConfig&gt;</span>

&nbsp;

The two AlertSource configuration items above are examples of how to configure a given rule/monitor to update custom fields and change your resolution state of these alerts to SendAlert.

GroupIdFilter can be used to specify only to update the NewValue If it belongs to the specified group.

Here are the properties on the alerts that were modified using the service with the connector configuration file above.

<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/3603.hshbalert.PNG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/3603.hshbalert.PNG" border="0" /></a>

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/0743.failedconnectAlertProperty.PNG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/0743.failedconnectAlertProperty.PNG" border="0" /></a>

&nbsp;

Question:

How do I find the Id for the alerting monitors and rules that I want to modify?

You can use PowerShell or read MP files xml and dig through the file to find the monitor or alert’s ID. If you are a Premier customer you could use Boris's ConnectoryConfiguration tool to create your configuration file.

Open Operations Manager Shell and run this command.

get-alert -criteria 'Name = ''Health Service Heartbeat Failure'''

This will work if you have alerts that are available in the management group.

The data returned will have a line for MonitoringRuleId.  This is the value you can specify in the AlertSource section for Id.

MonitoringRuleId
: b59f78ce-c42a-8995-f099-e705dbb34fd4

&nbsp;

What if you do not have any recent alerts that you can query with PowerShell to find the Id?

get-monitor -criteria 'DisplayName = ''Health Service Heartbeat Failure'''

Id                     : b59f78ce-c42a-8995-f099-e705dbb34fd4

You can use similar command line for rules by using get-rule command.

To get the GroupIdFilter you can use PowerShell to get the Group ID similarly.

get-monitoringobjectgroup

Find the group you want and find the associated Id.

Id               : 9e249559-e166-0e92-1bfc-fea90a63f843

&nbsp;

I started working on a user interface tool to select monitors and rules that would allow you to configure the connector configuration file, however I have not completed this yet. I may blog about this in future when
completed, if I hear back that this is useful and would be a good use of my time.

<b></b>

<b>Editing alertupdaterservice.exe.config file.</b>

<b>RootManagementServerName</b>
should replace localhost with RMS Server name or one of your 2012 SCOM management servers. If this service is running on one of your management servers or RMS you can specify localhost.

<b>PollingIntervalInSeconds</b>
number of seconds before it polls and processes new alerts, default is every 10 seconds.

<b>ConfigurationFilePath</b>
this is the path to your configuration file that has alert id’s along with fields to update.

<b>ExcludedResolutionStates</b>
value should be 255 which is Closed resolution state.

<b>FailoverMS</b> is a
semicolon delimited list of management servers should you be using SCOM 2012 that the service will attempt to connect to should the RootManagementServerName connection fail.

&lt;?xml version="1.0" encoding="utf-8"?&gt;

&lt;configuration&gt;

&lt;appSettings&gt;

&lt;add key="RootManagementServerName" value="localhost" /&gt;

&lt;add key="PollingIntervalInSeconds" value="10" /&gt;

&lt;add key="ConfigurationFilePath" value="C:\AUCS\Connector.xml" /&gt;

&lt;add key="ExcludedResolutionStates" value="255"/&gt;

&lt;add key="FailoverMS" value="SCOM2012MS1;SCOM2012MS2" /&gt;

&lt;/appSettings&gt;

&lt;/configuration&gt;

&nbsp;

<b>Installing Alert Updater Service</b>

Run command prompt as administrator.

Change to the directory where you have your files copied, in this case c:\aucs

Run below command to install the service.

C:\AUCS&gt;C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe c:\aucs\AlertUpdaterService.exe

Note: if you get an error indicating System.BadImageFormatException you are trying to install the 32 bit version of the service using the 64 bit framework or you are trying to install the 64 bit version of the service with
the 32 bit .NET framework.

<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/0815.1.PNG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/0815.1.PNG" border="0" /></a>

&nbsp;

Change “AlertUpdaterService” to automatic start and enter credentials of an account that is in SCOM administrators group.

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/6888.2.PNG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/6888.2.PNG" border="0" /></a>

&nbsp;

&nbsp;

Change logon credentials and save.

<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/0363.3.PNG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/0363.3.PNG" border="0" /></a>

&nbsp;

Start the Alert Updater Service.

Open SCOM Console and select Administration – Product
connectors – internal connectors.

Bring properties up on Alert Updater Connector and select Add… button to create the new subscription for alerts you want this connector to subscribe to.

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/4111.4.PNG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/4111.4.PNG" border="0" /></a>

&nbsp;

Enter a subscription name such as “All Alerts alert updater” and select Next.

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/2352.5.PNG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/2352.5.PNG" border="0" /></a>

&nbsp;

Select all the groups you want to subscribe to and select next.

<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/3252.6.PNG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/3252.6.PNG" border="0" /></a>

&nbsp;

Select Next to allow new targets to automatically be added when new ones are created.

<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/5270.7.PNG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/5270.7.PNG" border="0" /></a><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/1768.6.PNG"></a>

&nbsp;

Select the criteria you want and select create. In this case I am selecting all severity and all priority alerts from all categories. I am only selecting alerts with a resolution state of New.

<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/3755.8.PNG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/3755.8.PNG" border="0" /></a>

&nbsp;

Select Apply and OK to save your changes.

Now in your active alerts view you should see most of your active alerts are either in a Processed or SendAlert state. As alerts are created they are set to New resolution state. As the connector service
processes alerts it will change the resolution state to processed or to the custom resolution state that you specify in your connector configuration file.

&nbsp;

<b>Service failover</b>

What if you are running this with SCOM 2012 and the management server you are connected to fails?

Here is the is what happens if you have FailoverMS servers listed in your configuration file.

First you get a error event (could be different based on when the failure occurs).

In this case we get a 7010 error event.

Service failed. Please restart service: The client has been disconnected from the server. Please call ManagementGroup.Reconnect() to reestablish the connection.

Then we see a 5002 information event indicating using failover MS.

Changing connection to failover MS: SCOM2012MS1. Will attempt to connect to new MS.

Then we see a 50 and 55 event indicating connections established.

(50) Successfully connected to SDK service on: SCOM2012MS1

(55) Successfully established connector connection

And within a few minutes you should see 700 informational event indicating processing alerts. This event is a heartbeat event indicating we are processing events and working. You could monitor for missed event 700 within 10 minutes and alert if not found. Could indicate service is not working.

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/1614.Failover1.PNG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/1614.Failover1.PNG" border="0" /></a>

<b>Service EventCodes list</b>

All events are logged to Application event log with event source of “AlertUpdaterService”. Below is a list of possible event codes that may be logged by the service. You could add or remove from the source to suit your needs. You can also create a custom management pack to monitor the service for running state and other errors that may occur.

10 = Successfully stopped service.

13 = Service failed to stop within timeout period

20 = Successfully Loaded Service Configuration

21 = RootManagementServer Configuration invalid - Check service configuration file for errors

22 = PollingIntervalInSeconds Configuration invalid - Check service configuration file for errors

23 = PollingIntervalInSeconds Configuration not numeric - Check service configuration file for errors

24 = ConfigurationFilePath Configuration invalid - Check service configuration file for errors

25 = ExcludedResolutionStates Configuration invalid - Check service configuration file for errors

26 = ExcludedResolutionStates Configuration not numeric - Check service configuration file for errors

29 = LoadServiceConfiguration() Catch All Failure: (+ error message) Properties to modify configuration entries:

30 = Successfully Loaded Properties to Modify Configuration

31 = Detected Change in configuration file reloading.

32 = Problem Reloading configuration file Please restart service: (+ message)

33 = Could not configure File Watcher, so will have to restart service if you change configuration file: (+ message)

35 = LoadAlertPropertiesToModify() Configuration File NOT found: (filename)

38 = Failed to write log file for Properties to Modify Configuration: (+ error messsage) warning

39 = LoadAlertPropertiesToModify() Catch all failure: (+ error message) Critical

50 = Successfully connected to SDK service on: (RMS Server Name)

51 = Failed in LoadServiceConfiguration(). Check event log for additional details. Exiting service

52 = Failed in LoadAlertPropertiesToModify(). Check event log for additional details. Exiting service

53 = Failed Loading configuration files. Check event log for additional details. Exiting service: (+ message)

55 = Successfully established connector connection

100 = Could not locate Monitoring Connector. Will attempt to create connector. (Informational)

101 = Failed to create connector Exiting: (+ Message)

102 = Failed to get monitoring connector Exiting: (+ message)

119 = Successfully created Alert Updater Connector (only occurs first time run service if has never been
run (55 event otherwise). Creates Connector in SCOM.

700 = Processing Alerts Now. (Can use this with missed event notification to monitor if service is healthy when running.)

710 = Failed parsing Properties:(string parsing)

711 = Failed replacing Properties updating alert(ignore most cases): (string parsing) : (error information)

5000 = There are No backup Management Servers to retry connection.

5001 = Successfully loaded list of failover Management servers:  + (Management server list read from registry HKLM\Software\AUCS\FailoverMS MSList
String value)

5002 = Changing connection to failover MS:  + new ManagementServer + Will attempt to connect to new MS.

5010 = Failed last attempt to reconnect to Management Group. Fatal error check health of RMS/MS and restart service.

5011 = Failed last attempt to reconnect MS list to Management Group. Fatal error check health of RMS/MS and restart service.

7010 = Service failed. Please restart service: + (error message)

7012 = Service failed. Please restart service: + (error message)

&nbsp;

<b>Alert Parameter Replacement</b>

Below is a list of the parameters you can populate custom fields with using the service. Replacement paramters begin and end with ‘$’. Some of these may return null values, so you may find that you do not use them or you may want to tweak the code to return additional or different values.

&nbsp;
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td nowrap="nowrap" valign="bottom">Replacement
Parameter</td>
<td nowrap="nowrap" valign="bottom">Name</td>
<td nowrap="nowrap" valign="bottom">Description</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$ServerName$</td>
<td nowrap="nowrap" valign="bottom">ServerName</td>
<td nowrap="nowrap" valign="bottom">Computer name that the alert was generated for</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$WebConsoleURL$</td>
<td nowrap="nowrap" valign="bottom"></td>
<td nowrap="nowrap" valign="bottom">Link to the alert if you have SCOM Web Console</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$Category$</td>
<td nowrap="nowrap" valign="bottom">Category</td>
<td nowrap="nowrap" valign="bottom">Gets the category of the alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$ConnectorId$</td>
<td nowrap="nowrap" valign="bottom">ConnectorId</td>
<td nowrap="nowrap" valign="bottom">Gets or sets the globally unique identifier (GUID) for the connector corresponding
to the monitoring alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$ConnectorStatus$</td>
<td nowrap="nowrap" valign="bottom">ConnectorStatus</td>
<td nowrap="nowrap" valign="bottom">Gets the status of this alert relative to the connector.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$Context$</td>
<td nowrap="nowrap" valign="bottom">Context</td>
<td nowrap="nowrap" valign="bottom">Gets the context of the alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$CustomField1$</td>
<td nowrap="nowrap" valign="bottom">CustomField1</td>
<td nowrap="nowrap" valign="bottom">Gets or sets the value of the custom field 1 for the alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$CustomField10$</td>
<td nowrap="nowrap" valign="bottom">CustomField10</td>
<td nowrap="nowrap" valign="bottom">Gets or sets the value of the custom field 10 for the alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$CustomField2$</td>
<td nowrap="nowrap" valign="bottom">CustomField2</td>
<td nowrap="nowrap" valign="bottom">Gets or sets the value of the custom field 2 for the alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$CustomField3$</td>
<td nowrap="nowrap" valign="bottom">CustomField3</td>
<td nowrap="nowrap" valign="bottom">Gets or sets the value of the custom field 3 for the alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$CustomField4$</td>
<td nowrap="nowrap" valign="bottom">CustomField4</td>
<td nowrap="nowrap" valign="bottom">Gets or sets the value of the custom field 4 for the alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$CustomField5$</td>
<td nowrap="nowrap" valign="bottom">CustomField5</td>
<td nowrap="nowrap" valign="bottom">Gets or sets the value of the custom field 5 for the alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$CustomField6$</td>
<td nowrap="nowrap" valign="bottom">CustomField6</td>
<td nowrap="nowrap" valign="bottom">Gets or sets the value of the custom field 6 for the alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$CustomField7$</td>
<td nowrap="nowrap" valign="bottom">CustomField7</td>
<td nowrap="nowrap" valign="bottom">Gets or sets the value of the custom field 7 for the alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$CustomField8$</td>
<td nowrap="nowrap" valign="bottom">CustomField8</td>
<td nowrap="nowrap" valign="bottom">Gets or sets the value of the custom field 8 for the alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$CustomField9$</td>
<td nowrap="nowrap" valign="bottom">CustomField9</td>
<td nowrap="nowrap" valign="bottom">Gets or sets the value of the custom field 9 for the alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$Description$</td>
<td nowrap="nowrap" valign="bottom">Description</td>
<td nowrap="nowrap" valign="bottom">Gets the description of the alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$Id$</td>
<td nowrap="nowrap" valign="bottom">Id</td>
<td nowrap="nowrap" valign="bottom">Overridden. Gets the globally unique identifier (GUID) for the alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$IsMonitorAlert$</td>
<td nowrap="nowrap" valign="bottom">IsMonitorAlert</td>
<td nowrap="nowrap" valign="bottom">Gets a Boolean value that determines whether the alert was generated by a monitor.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$LastModified$</td>
<td nowrap="nowrap" valign="bottom">LastModified</td>
<td nowrap="nowrap" valign="bottom">Gets the last time, in DateTime format, that the alert was modified.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$LastModifiedBy$</td>
<td nowrap="nowrap" valign="bottom">LastModifiedBy</td>
<td nowrap="nowrap" valign="bottom">Gets the name of the user that last modified the alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$LastModifiedByNonConnector$</td>
<td nowrap="nowrap" valign="bottom">LastModifiedByNonConnector</td>
<td nowrap="nowrap" valign="bottom">Gets the last time, in DateTime format, the alert was modified by something other
than a connector.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$MaintenanceModeLastModified$</td>
<td nowrap="nowrap" valign="bottom">MaintenanceModeLastModified</td>
<td nowrap="nowrap" valign="bottom">Gets the time, in DateTime format, that the maintenance mode of this alert was
last modified.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$ManagementGroup$</td>
<td nowrap="nowrap" valign="bottom">ManagementGroup</td>
<td nowrap="nowrap" valign="bottom">Gets the Management Group that the object is in. (inherited from MonitoringBase)</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$ManagementGroupId$</td>
<td nowrap="nowrap" valign="bottom">ManagementGroupId</td>
<td nowrap="nowrap" valign="bottom">Gets the globally unique identifier (GUID) for the Management Group that the
object is in. (inherited from MonitoringBase)</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$ManagementGroupName$</td>
<td nowrap="nowrap" valign="bottom"></td>
<td nowrap="nowrap" valign="bottom">Management Group name from the alert</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$MonitoringClassId$</td>
<td nowrap="nowrap" valign="bottom">MonitoringClassId</td>
<td nowrap="nowrap" valign="bottom">Gets the globally unique identifier (GUID) of the non-abstract monitoring class of
the associated monitoring object.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$MonitoringObjectDisplayName$</td>
<td nowrap="nowrap" valign="bottom">MonitoringObjectDisplayName</td>
<td nowrap="nowrap" valign="bottom">Gets the display name of the monitoring object that is associated with the alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$MonitoringObjectFullName$</td>
<td nowrap="nowrap" valign="bottom">MonitoringObjectFullName</td>
<td nowrap="nowrap" valign="bottom">Gets the full name of the monitoring object that is associated with the alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$MonitoringObjectHealthState$</td>
<td nowrap="nowrap" valign="bottom">MonitoringObjectHealthState</td>
<td nowrap="nowrap" valign="bottom">Gets the health state of the monitoring object associated with this alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$MonitoringObjectId$</td>
<td nowrap="nowrap" valign="bottom">MonitoringObjectId</td>
<td nowrap="nowrap" valign="bottom">Overridden. Gets the globally unique identifier (GUID) for the monitoring object that is
associated with this alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$MonitoringObjectInMaintenanceMode$</td>
<td nowrap="nowrap" valign="bottom">MonitoringObjectInMaintenanceMode</td>
<td nowrap="nowrap" valign="bottom">Gets a value indicating whether the monitoring object associated with the alert is
in maintenance mode.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$MonitoringObjectName$</td>
<td nowrap="nowrap" valign="bottom">MonitoringObjectName</td>
<td nowrap="nowrap" valign="bottom">Gets the name of the monitoring object that is associated with this alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$MonitoringObjectPath$</td>
<td nowrap="nowrap" valign="bottom">MonitoringObjectPath</td>
<td nowrap="nowrap" valign="bottom">Gets the path to the monitoring object that is associated with this alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$MonitoringRuleId$</td>
<td nowrap="nowrap" valign="bottom">MonitoringRuleId</td>
<td nowrap="nowrap" valign="bottom">Overridden. Gets the globally unique identifier (GUID) for the rule associated with the
alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$Name$</td>
<td nowrap="nowrap" valign="bottom">Name</td>
<td nowrap="nowrap" valign="bottom">Gets the name of the alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$NetbiosComputerName$</td>
<td nowrap="nowrap" valign="bottom">NetbiosComputerName</td>
<td nowrap="nowrap" valign="bottom">Gets the name of the computer that raised this alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$NetbiosDomainName$</td>
<td nowrap="nowrap" valign="bottom">NetbiosDomainName</td>
<td nowrap="nowrap" valign="bottom">Gets the domain of the computer that raised this alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$Owner$</td>
<td nowrap="nowrap" valign="bottom">Owner</td>
<td nowrap="nowrap" valign="bottom">Gets or sets the owner of the alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$Parameters$</td>
<td nowrap="nowrap" valign="bottom">Parameters</td>
<td nowrap="nowrap" valign="bottom">Gets a collection of parameters for the alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$PrincipalName$</td>
<td nowrap="nowrap" valign="bottom">PrincipalName</td>
<td nowrap="nowrap" valign="bottom">Gets the principal name of the computer that this alert was created for.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$Priority$</td>
<td nowrap="nowrap" valign="bottom">Priority</td>
<td nowrap="nowrap" valign="bottom">Gets the priority of the alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$ProblemId$</td>
<td nowrap="nowrap" valign="bottom">ProblemId</td>
<td nowrap="nowrap" valign="bottom">Gets the globally unique identifier (GUID) of the associated monitor if the
IsMonitorAlert property is true, otherwise, gets or sets the GUID for the
problem.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$RepeatCount$</td>
<td nowrap="nowrap" valign="bottom">RepeatCount</td>
<td nowrap="nowrap" valign="bottom">Gets the repeat count of this alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$ResolutionState$</td>
<td nowrap="nowrap" valign="bottom">ResolutionState</td>
<td nowrap="nowrap" valign="bottom">Gets the resolution state of the alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$ResolvedBy$</td>
<td nowrap="nowrap" valign="bottom">ResolvedBy</td>
<td nowrap="nowrap" valign="bottom">Gets the user who resolved this alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$Severity$</td>
<td nowrap="nowrap" valign="bottom">Severity</td>
<td nowrap="nowrap" valign="bottom">Gets the severity of the alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$SiteName$</td>
<td nowrap="nowrap" valign="bottom">SiteName</td>
<td nowrap="nowrap" valign="bottom">Gets the site name of the alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$StateLastModified$</td>
<td nowrap="nowrap" valign="bottom">StateLastModified</td>
<td nowrap="nowrap" valign="bottom">Gets the time, in DateTime format, that the state of this alert was last modified.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$TicketId$</td>
<td nowrap="nowrap" valign="bottom">TicketId</td>
<td nowrap="nowrap" valign="bottom">Gets or sets a string identifier for the ticket of the alert.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$TimeAdded$</td>
<td nowrap="nowrap" valign="bottom">TimeAdded</td>
<td nowrap="nowrap" valign="bottom">Gets the time, in DateTime format, the alert was added to the system.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$TimeRaised$</td>
<td nowrap="nowrap" valign="bottom">TimeRaised</td>
<td nowrap="nowrap" valign="bottom">Gets the time, in DateTime format, the alert was raised.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$TimeResolutionStateLastModified$</td>
<td nowrap="nowrap" valign="bottom">TimeResolutionStateLastModified</td>
<td nowrap="nowrap" valign="bottom">Gets the last time, in DateTime format, the resolution state of the alert was
modified.</td>
</tr>
<tr>
<td nowrap="nowrap" valign="bottom">$TimeResolved$</td>
<td nowrap="nowrap" valign="bottom">TimeResolved</td>
<td nowrap="nowrap" valign="bottom">Gets the time, in DateTime format, the alert was resolved.</td>
</tr>
</tbody>
</table>
&nbsp;

<b>Example Source Code</b>

I am including the example service along with example source code to allow you to see how a SCOM connector could be developed.

I created this project with Visual Studio 2010.

Note I built this on a system that had SCOM 2007 R2 CU5 updated Console. This is required to build the service as it utilizes the SCOM SDK binaries located in C:\Program Files\System Center Operations Manager 2007\SDK Binaries directory (or drive you installed console to).

While this was built using the SCOM 2007 SDK binaries, I did test successfully on SCOM 2007 R2 and SCOM 2012 RC1.

<b></b>

<b>E</b><b>xample Source Code</b>

&nbsp;

Extract the files from zip file and run Visual Studio 2010. Locate AlertUpdaterService Solution file and open.

When the service is started the OnStart method sets global variable bStopped to false indicating the service is running. Then it creates a new thread that contains the alert updater logic and exits.

The OnStop method set’s bStopped variable to true in order for the ConnectorMain thread to know that it should exit processing in order for the service to stop. Wait for the thread to complete processing and then exit OnStop, so the service can stop running.

<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/4670.SourceStartStop.PNG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/4670.SourceStartStop.PNG" border="0" /></a>

The service initializes a file watcher on your configuration file that contains alert information to update. Should the watcher fail to initialize it will log an event indicating that you have to restart the service for any changes to take effect. The service should normally load the new configuration file when you change your configuration file and log events indicating reload occurred.

<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/0285.sourceFileWatcher.PNG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/0285.sourceFileWatcher.PNG" border="0" /></a>

ConnectorMain method loads the service configuration and alert configuration data to get management server name to connect and other configuration data to run the service. Should it fail to load the data it will not run. You should review your configuration file to fix errors should this fail.

<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/2287.sourceConMain1.PNG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/2287.sourceConMain1.PNG" border="0" /></a>

&nbsp;

Should the service lose it’s connection to SCOM it will retry connection against the Root Management server if running on SCOM 2007 R2. Should this be SCOM 2012 and you specified failoverMS list in the configuration file it will attempt to connect to the failover list in the order specified. Should it fail to connect to any failover MS in your list it will attempt to connect to the orginal RMS/MS one more time before failing out.

It also resets the connection retry count if the last time it retried is greater than 30 minutes ago. You can change this value by modifying AddMinutes(30) below to the value you desire and rebuild project.

Should you be running SCOM 2007 R2 you could populate FailoverMS list with your RMS server name delimited with ; for however many time you would like the retry to occur before the service fails.

<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/4048.sourceconmain2.PNG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/4048.sourceconmain2.PNG" border="0" /></a>

&nbsp;

In CallMain we connect to the management group get the connector or create the connector if not found. Log results to event log should anything fail. After we successfully get the connector we will use that to get any alerts that it subscribes to.

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/4162.sourcemain1.PNG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/4162.sourcemain1.PNG" border="0" /></a>

&nbsp;

I added a heartbeat that writes to the event log that could be used with a missed event monitor to alert indicating the service is not processing alerts. You can comment this out or add as a monitoring event that would help validate service is still actively processing alerts. This logs an event aproximately every two minutes.

<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/6165.sourceHeartbeat.PNG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/6165.sourceHeartbeat.PNG" border="0" /></a>

&nbsp;

&nbsp;

Get the web console URL from SCOM and acknowledge alerts so we do not process them again. Then we loop on all the alerts that the connector received since last iteration.

We skip processing the excluded resolution state.

We also populate the server name should server name be a replacement parameter that the connector needs to update.

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/7610.sourcewebconsole.PNG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/7610.sourcewebconsole.PNG" border="0" /></a>

&nbsp;

We populate string values should any replacement parameters be specified.

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/5383.sourceSetvalues.PNG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/5383.sourceSetvalues.PNG" border="0" /></a>

&nbsp;

Here we set custom fields with the replacement parameter specified.

<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/0131.sourcealertcustomfields.PNG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/0131.sourcealertcustomfields.PNG" border="0" /></a>

&nbsp;

&nbsp;

We now log events to event log indicating status and update the alert connector id to null and specify a string value that we updated the alert with or without changes that will show up in properties history of alert.

<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/1663.sourceupdatealert.PNG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/1663.sourceupdatealert.PNG" border="0" /></a>

&nbsp;

I hope you enjoy this example SCOM connector service and let me know if anyone is interested in a User interface tool to configure your connector.xml configuration file with alerts and replacement parameters. If I have time I will work on that example next.

<b> </b>

<em><b>Disclaimer:</b></em>

<em><b>This example is provided “AS IS” with no warranty expressed </b></em><em><b>or implied. Run at your own risk. </b></em><em><b>The opinions and views expressed in this </b></em><em><b>blog are those of the author and do not necessarily state or reflect those of </b></em><em><b>Microsoft.</b></em>

<b> </b>

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/telligent.evolution.components.attachments/01/9071/00/00/03/49/30/06/AlertUpdaterServiceBlog.zip">AlertUpdaterServiceBlog.zip</a>]]></content:encoded>
    </item>
    <item>
      <title>Changing SCOM Health Service Action Account tool</title>
      <link>https://docs.microsoft.com/archive/blogs/markmanty/changing-scom-health-service-action-account-tool</link>
      <pubDate>Wed, 29 Feb 2012 10:59:00 GMT</pubDate>
      <dc:creator><![CDATA[Mark Manty]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/markmanty/2012/02/29/changing-scom-health-service-action-account-tool/</guid>
      <description><![CDATA[Hi, Mark Manty Premier Field Engineer for Microsoft with anexample program to change Agents default...]]></description>
      <content:encoded><![CDATA[<p>Hi, Mark Manty Premier Field Engineer for Microsoft with an<br />example program to change Agents default Health Service Action Account. The<br />majority of your agents should be set to &ldquo;Local System Action Account&rdquo; with the<br />exception of your Management Servers.</p>
<p>This example program allows you to change the default action<br />account associated with a given agent in bulk fashion. If you set your default<br />action account incorrectly and already deployed thousands of agents you will<br />greatly appreciate the tool. Changing this account in the SCOM console is a<br />manual and slow process for large number of agents.</p>
<p>I ran this in a test environment and it does not have to run<br />on a RMS or MS to work. It must meet the below requirements in order to run<br />successfully:</p>
<ul>
<li>.NET 3.5 Framework</li>
<li>SCOM R2 Console (User Interface installed)</li>
<li>Run as account that has administrative rights to<br />the SCOM Management Group</li>
</ul>
<p>See example below where my agents are set to my SCOMAction<br />account. I would like to change those to &ldquo;Local System Action Account&rdquo; with the<br />exception being my Management servers.</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/2677.1.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/2677.1.PNG"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/2677.1.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/2677.1.PNG" /></a><br />&nbsp;<br />&nbsp;</p>
<p>Download the ZIP file ChangeDefaultActionAccount.zip and extract RunasAccountProfile.exe to a folder of your choice.</p>
<p>Open an administrative command prompt running under an account that has SCOM administrative privileges.</p>
<p>Change to the directory where you extracted RunasAccountProfile.exe.</p>
<p>Run program by typing &ldquo;RunasAccountProfile.exe&rdquo; and press enter.</p>
<p>Change SCOMRMS to your RMS server name and press &ldquo;Connect&rdquo; button.</p>
<p><br /> <a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/3835.2.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/3835.2.PNG"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/3835.2.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/3835.2.PNG" /></a></p>
<p>&nbsp;</p>
<p>Select the servers you want to modify Default Action account for.</p>
<p>Note: you can right click select all or deselect all. Also, you can use the exclude Management servers to exclude them from selection. If<br />you manually select them they will update the selected Management servers accounts.</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/0003.3.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/0003.3.PNG"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/0003.3.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/0003.3.PNG" /></a></p>
<p>After selecting the new action account and the servers to update, select Update to update accounts.</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/7701.4.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/7701.4.PNG"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/7701.4.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/7701.4.PNG" /></a></p>
<p>&ldquo;Complete&rdquo; message will display when it is done updating.</p>
<p><br />Note the output window displays results of the update.</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/1207.5.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/1207.5.PNG"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/1207.5.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/1207.5.PNG" /></a><br />&nbsp;</p>
<p>Validate that the accounts were updated.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/6114.6.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/6114.6.PNG"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/71/6114.6.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-71/6114.6.PNG" /></a></p>
<p>&nbsp;</p>
<p>This program can save a lot of your time updating agents should a large number of agents require changing.</p>
<p>&nbsp;</p>
<p><strong><em>Disclaimer:</em></strong></p>
<p><strong><em>This example is provided &ldquo;AS IS&rdquo; with no warranty expressed</em></strong><br /><strong><em>or implied. Run at your own risk.</em></strong></p>
<p><strong><em>The opinions and views expressed in this</em></strong><br /><strong><em>blog are those of the author and do not necessarily state or reflect those of</em></strong><br /><strong><em>Microsoft.</em></strong></p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/telligent.evolution.components.attachments/01/9071/00/00/03/48/38/97/ChangeDefaultActionAccount.zip" original-url="https://blogs.technet.com/cfs-filesystemfile.ashx/__key/telligent-evolution-components-attachments/01-9071-00-00-03-48-38-97/ChangeDefaultActionAccount.zip">ChangeDefaultActionAccount.zip</a></p>]]></content:encoded>
    </item>
  </channel>
</rss>