<?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>Managing the Hybrid Cloud</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/hybridcloud360/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/hybridcloud360/feed.xml</link>
    <description>Tips, Tricks and Pills</description>
    <lastBuildDate>Tue, 16 Apr 2019 06:09:27 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>SCOM and APM - the simplest workaround.</title>
      <link>https://docs.microsoft.com/archive/blogs/hybridcloud360/scom-and-apm-the-simplest-workaround</link>
      <pubDate>Fri, 29 Jun 2018 09:04:09 GMT</pubDate>
      <dc:creator><![CDATA[Bruno Gabrielli]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/hybridcloud360/?p=2025</guid>
      <description><![CDATA[Hi there,
here I go again to help you out . In this post I will walk you through a temporary...]]></description>
      <content:encoded><![CDATA[<p>Hi there,
</p><p>here I go again to help you out . In this post I will walk you through a <strong><em>temporary</em></strong> workaround for the long running Application Performance Monitoring (APM) issue affecting Internet Information Services (IIS) and SharePoint servers. Again, this is a <strong>temporary</strong> workaround that I am sharing to unblock the upgrade/update/new installation of your System Center Operations Manager (SCOM) environments, where IIS and SharePoint are in use and APM will not be used.
</p><p>The reason why I call it temporary, is because <span style="text-decoration:underline"><strong><em>it does not fix</em></strong>
		</span>the APM issue. Unfortunately, should you need APM monitoring, this workaround cannot help you out and you must wait for the official solution from the Product Group.
</p><p><span style="background-color:yellow"><strong>NOTE:</strong></span><span style="color:black"> I got in touch with the SCOM Product Group and they are already working on a <strong><em>permanent</em></strong> fix which is in line with the below changes</span>. Hence, make sure you install the fix and un-configure them once it is released.
</p><p>
 </p><p><span style="text-decoration:underline"><strong>The topic:
</strong></span></p><p>As you surely know, there is a long running issue impacting SharePoint servers monitored through SCOM. This issue has been already discussed in several posts like:
</p><ul><li><a href="https://blogs.technet.microsoft.com/momteam/2017/03/21/apm-feature-in-scom-2016-agent-may-cause-a-crash-for-the-iis-application-pool-running-under-net-2-0-runtime/">https://blogs.technet.microsoft.com/momteam/2017/03/21/apm-feature-in-scom-2016-agent-may-cause-a-crash-for-the-iis-application-pool-running-under-net-2-0-runtime/</a>
		</li><li><a href="https://blogs.technet.microsoft.com/momteam/2017/05/31/apm-fix-for-agent-crashing-issue-shipped-in-ur3-is-not-completely-resolved/">https://blogs.technet.microsoft.com/momteam/2017/05/31/apm-fix-for-agent-crashing-issue-shipped-in-ur3-is-not-completely-resolved/</a>
		</li><li><a href="https://blogs.technet.microsoft.com/momteam/2017/06/06/update-on-apm-fix-for-agent-crashing-issue-shipped-in-ur3/">https://blogs.technet.microsoft.com/momteam/2017/06/06/update-on-apm-fix-for-agent-crashing-issue-shipped-in-ur3/</a>
		</li><li><a href="https://blogs.technet.microsoft.com/kevinholman/2017/08/05/reinstalling-your-scom-agents-with-the-noapm-switch/">https://blogs.technet.microsoft.com/kevinholman/2017/08/05/reinstalling-your-scom-agents-with-the-noapm-switch/</a>
		</li></ul><p>Reading through the blog posts listed above, it looks like this issue is only affecting SCOM 2016 agents and newer versions. One of the suggested workaround is to rely on SCOM 2012 R2 agent version. Well, in some cases, this does not work or it's not enough .
</p><p>In fact, during one of our customer visits, me and my colleague Antonio Canitano ran into a new uncovered scenario causing this known issue. While performing an in-place upgrade of SCOM from version 2012 R2 to version 2016, knowing the existing issue, <span style="text-decoration:underline"><strong>we left the agents at 2012 R2 version.</strong></span>
	</p><p>Everything seemed to work fine, but after a couple of days the customer started experiencing issues on his SharePoint servers (the same servers which had been working like a charm for 2 years with the same SCOM 2012 R2 agent version) even without having the APM monitoring configured.
</p><p><span style="text-decoration:underline"><strong>The issue:
</strong></span></p><p>The problem the customer had, was due to the well-know APM issue discussed several times, but in a different scenario where the failure was supposed to not happen and hence unexpected.
</p><p>Basically, when an agent is installed with the default settings, the APM binaries are deployed, the APM service is created but left disabled. This means that on the agent machine, the APM stuff is present but not used (dormant state). As you can imagine, in this normal scenario, one never expects to see failures (Application Pool crashes) caused by APM. But you know that theory and reality are 2 different things 
</p><p>Since, as recommended in the official posts above we diligently left the agents at 2012 R2 <span style="text-decoration:underline">and hence we did not expect this situation</span>, we had to investigate the real reason why this happened. We only noticed a server restart right after the issue, which made us thinking about some configuration that became effective after the reboot.
</p><p>We started looking around to see what was changed, but nothing came to mind. Then we started looking at the only thing which was changed: the Management Server and Management Pack versions. In particular we noticed that among the new Management Packs there was the <strong>Microsoft.SystemCenter.Apm.Infrastructure</strong> that got changed. We compared the 2012 R2 and 2016 versions and among the several differences between there was one in particular that caught our attention.
</p><p>A new parameter for the rule <strong>Apply APM Agent configuration</strong> was added: the <strong>EnableRTIA Profiler</strong> with the default setting of <strong>True.
</strong></p><p><img src="https://msdnshared.blob.core.windows.net/media/2018/06/062918_0816_SCOMandAPM1.png" alt="" />
	</p><p>This parameter is responsible for the silent activation of the APM Profiler, which become active after the <strong>World Wide Web Publishing Service</strong> gets restarted, through the creation of 2 new REG_MULTI_SZ registry keys: one under the <em>W3SVC\Environment</em> path and another one under the <em>WAS\Environment</em> path, both with the same values:
</p><ul><li>Reg Key1 == <strong><em>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Environment
</em></strong></li><li>Reg Key2 == <strong><em>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WAS\Environment
</em></strong></li><li>Values ==
</li></ul><p>    <strong><em>COR_PROFILER={AD5651A8-B5C8-46ca-A11B-E82AEC2B8E78}
</em></strong></p><p>    <strong><em>Cor_Enable_Profiling=1
</em></strong></p><p>
 </p><p style="margin-left: 36pt"><img src="https://msdnshared.blob.core.windows.net/media/2018/06/062918_0816_SCOMandAPM2.png" alt="" /><strong>
		</strong></p><p>
 </p><p><span style="text-decoration:underline"><strong>The prove and the repro
</strong></span></p><p>It is very easy to repro the issue, if you would like. In a test environment, where SCOM 2016 or 1801 is installed, install the SCOM agent (2012 R2, 2016 or 1801) on a SharePoint server using the default proposed settings. You will see that, as expected, the APM service is set as below.
</p><p style="margin-left: 36pt"><img src="https://msdnshared.blob.core.windows.net/media/2018/06/062918_0816_SCOMandAPM3.png" alt="" />
	</p><p>At this point:
</p><ol><li>Log on to the SharePoint server
</li><li>From an elevated <strong><em>Command Prompt</em></strong>, perform an <strong><em>IISReset</em></strong>
		</li><li><div>Open the <strong><em>SharePoint Central Administration</em></strong> site and see the result:
</div><p><img src="https://msdnshared.blob.core.windows.net/media/2018/06/062918_0816_SCOMandAPM4.png" alt="" />
			</p></li></ol><p>
 </p><p><span style="text-decoration:underline"><strong>The workaround:</strong>
		</span></p><p>With that amount of information in our hands, we thought about an easy workaround which is broadly applicable. Putting this workaround in place, customers <span style="text-decoration:underline"><strong>who do not rely on APM</strong></span> could move ahead updating, migrating or simply installing SCOM 2016 or 1801 with no known blockers.
</p><p>Here are the steps to put the workaround in place:
</p><ol><li><div>Create an override for the rule <strong>Apply APM Agent configuration</strong> (yes, the above-mentioned rule) targeted to the <strong>.NET Application Monitoring Agent</strong> class for the parameter <strong>EnableRTIA Profiler</strong> that set it to <strong>False</strong>.
</div><p><img src="https://msdnshared.blob.core.windows.net/media/2018/06/062918_0816_SCOMandAPM5.png" alt="" />
			</p></li><li><div>Wait for the new configuration be delivered and applied. To make sure it is in place, you check for the presence of the following events in the Operations Manager Event Log
</div><ol><li><div>Event ID 1201 (containing the name and the version of the management pack you just used to store the override)
</div><p><img src="https://msdnshared.blob.core.windows.net/media/2018/06/062918_0816_SCOMandAPM6.png" alt="" />
					</p></li><li><div>Event ID 1210
</div><p><img src="https://msdnshared.blob.core.windows.net/media/2018/06/062918_0816_SCOMandAPM7.png" alt="" />
					</p></li></ol></li><li><div>From an elevated <strong><em>Command Prompt</em></strong>, perform an <strong><em>IISReset</em></strong>
			</div><p><img src="https://msdnshared.blob.core.windows.net/media/2018/06/062918_0816_SCOMandAPM8.png" alt="" />
			</p></li><li><div>Check the registry (the 2 keys should have disappeared)
</div><p><img src="https://msdnshared.blob.core.windows.net/media/2018/06/062918_0816_SCOMandAPM9.png" alt="" />
			</p></li><li><div>Open the <strong><em>SharePoint Central Administration</em></strong> site and see the result … <span style="color:#00b050"><strong>BOOOM, back to work</strong> !!!</span>:
</div><p><img src="https://msdnshared.blob.core.windows.net/media/2018/06/062918_0816_SCOMandAPM10.png" alt="" />
			</p></li></ol><p>Me and Antonio really hope that with this post will make your update/upgrade or fresh install experience easier relieving you from the need of managing the Agent version. You can safely go ahead with whatever agent version and APM installed.</p>]]></content:encoded>
    </item>
    <item>
      <title>OpsMgr event ID 26319 and p_GetDatawarehouseVersion on SCOM 1801 – RESOLVED !!!</title>
      <link>https://docs.microsoft.com/archive/blogs/hybridcloud360/opsmgr-event-id-26319-and-p_getdatawarehouseversion-on-scom-1801-resolved</link>
      <pubDate>Mon, 25 Jun 2018 09:32:40 GMT</pubDate>
      <dc:creator><![CDATA[Bruno Gabrielli]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/hybridcloud360/?p=1295</guid>
      <description><![CDATA[Hi SCOM folk 
Today I am going to blog how to resolve event ID 26319 on System Center Operations...]]></description>
      <content:encoded><![CDATA[<p>Hi SCOM folk 
</p><p>Today I am going to blog how to resolve event ID 26319 on System Center Operations Manager (SCOM) 1801 related to the <strong><em>p_GetDatawarehouseVersion</em></strong> stored procedure from getting generated.
</p><p><span style="text-decoration:underline"><strong>The topic:
</strong></span></p><p>Looking at the Operations Manager event log on Management Server(s) from time to time, as any good SCOM Administrator should do, you will find some instances of the event ID 26319 (yeah, the well-known generic 26319 ).
</p><p>What will surprise you is that among all these instances, there are some of them which have an interesting description. They report about the lack of permissions to execute a given stored procedure or that a stored procedure is missing. These instances of event 26319 get generated <strong>*only*</strong> on SCOM 1801 installations, every time the Operations Console is opened.
</p><p><img src="https://msdnshared.blob.core.windows.net/media/2018/06/062618_1816_OpsMgrevent1.png" alt="" />
	</p><p><span style="text-decoration:underline"><strong>The issue:
</strong></span></p><p>As anticipated above, opening the Operations console will cause the generation of event ID 26319.
</p><p>This event is generated with 2 different descriptions, depending on what type of installation has been carried out. That means that:
</p><ol><li><div>On <strong>new</strong> installations, the event is generated with this string in the description: <em><span style="color:red">The EXECUTE permission was denied on the object '<strong>p_GetDatawarehouseVersion</strong>', database 'OperationsManagerDW', schema 'sdk'.)</span>.</em>
			</div><p><img src="https://msdnshared.blob.core.windows.net/media/2018/06/062618_1816_OpsMgrevent2.png" alt="" />
			</p></li><li><div>On <strong>upgraded</strong> installations (from SCOM 2016), the event is generated with this string in the description: <span style="color:red"><strong><em>Reason. (Fault Detail is equal to Could not find stored procedure 'sdk.p_GetDatawarehouseVersion'.)</em></strong></span>.
</div><p><img src="https://msdnshared.blob.core.windows.net/media/2018/06/062618_1816_OpsMgrevent3.png" alt="" />
			</p></li></ol><p>The reason behind is that during the installation, the setup procedure for some unknown and strange reasons:
</p><ol style="margin-left: 38pt"><li>Did not correctly set the permission for the sdk database schema <span style="text-decoration:underline">on new installations</span>
		</li><li>Did not create the stored procedure, and of course did not set the permission, <span style="text-decoration:underline">on upgraded installations</span>
		</li></ol><p><span style="text-decoration:underline"><strong>The solution:</strong>
		</span></p><p>Luckily, there is a solution for this mess. To resolve the issue and to stop the event ID 26319 from getting generated in both cases, follow the steps below:
</p><ol><li>Logon to the SQL Server host where the SQL Instance hosting the OperationsManagerDW is running
</li><li><div>Open <strong><em>SQL Server Management Studio</em></strong> and connect to it
</div><p><img src="https://msdnshared.blob.core.windows.net/media/2018/06/062618_1816_OpsMgrevent4.png" alt="" />
			</p></li><li><div>Expand <strong><em>Databases</em></strong>
				<span style="font-family:Wingdings">à</span>
				<strong><em>OperationsManagerDW</em></strong>
				<span style="font-family:Wingdings">à</span>
				<strong><em>Programmability</em></strong>
				<span style="font-family:Wingdings">à</span>
				<strong><em>Stored Procedures</em></strong>
			</div><p><img src="https://msdnshared.blob.core.windows.net/media/2018/06/062618_1816_OpsMgrevent5.png" alt="" />
			</p></li><li>Scroll down, and search for the <strong><em>p_GetDatawarehouseVersion</em></strong> stored procedure
</li><li>If the stored procedure is already there, <span style="text-decoration:underline">meaning that this is a new installation</span>, jump to step <strong>13</strong>; otherwise continue to step <strong>6</strong>.
</li><li><div><a href="https://msdnshared.blob.core.windows.net/media/2018/06/CREATE_sdk.p_GetDatawarehouseVersion.zip">Download</a> the file attached to this post (taken from a new SCOM 1801 Installation) and save it locally on the SQL Server (i.e. in the <strong><em>C:\Temp</em></strong> folder or on the desktop). The file contains the following code:<span style="color:red"><strong>
					</strong></span></div><p><img src="https://msdnshared.blob.core.windows.net/media/2018/06/062618_1816_OpsMgrevent6.png" alt="" /><span style="color:red"><strong>
					</strong></span></p></li><li><div>In SQL Server Management Studio, click on <strong><em>File</em></strong>
				<span style="font-family:Wingdings">à</span>
				<strong><em>Open <span style="font-family:Wingdings">à</span> File</em></strong>
			</div><p><img src="https://msdnshared.blob.core.windows.net/media/2018/06/062618_1816_OpsMgrevent7.png" alt="" />
			</p></li><li><div>On the <strong><em>Open File</em></strong> windows, select the file downloaded in step <strong>6</strong> and click <strong><em>Open</em></strong>
			</div><p><img src="https://msdnshared.blob.core.windows.net/media/2018/06/062618_1816_OpsMgrevent8.png" alt="" />
			</p></li><li><div>Should you get the following message, click <strong><em>No</em></strong>
			</div><p><img src="https://msdnshared.blob.core.windows.net/media/2018/06/062618_1816_OpsMgrevent9.png" alt="" />
			</p></li><li><div>Once the file content is loaded, click <strong><em>Execute</em></strong>
			</div><p><img src="https://msdnshared.blob.core.windows.net/media/2018/06/062618_1816_OpsMgrevent10.png" alt="" />
			</p></li><li><div>Make sure the result pane is showing a success message
</div><p><img src="https://msdnshared.blob.core.windows.net/media/2018/06/062618_1816_OpsMgrevent11.png" alt="" />
			</p></li><li><div>After the stored procedure is created, scroll up; right-click on <strong><em>Stored Procedures</em></strong> and click <strong><em>Refresh</em></strong>
			</div><p><img src="https://msdnshared.blob.core.windows.net/media/2018/06/062618_1816_OpsMgrevent12.png" alt="" />
			</p></li><li><div>From the stored procedures list, find and select the <strong><em>p_GetDatawarehouseVersion</em></strong>; right-click on it and select <strong><em>Properties.</em></strong>
			</div><p><img src="https://msdnshared.blob.core.windows.net/media/2018/06/062618_1816_OpsMgrevent13.png" alt="" />
			</p></li><li><div>In the <strong><em>Properties</em></strong> screen, select the <strong><em>Permission </em></strong>page
</div><p><img src="https://msdnshared.blob.core.windows.net/media/2018/06/062618_1816_OpsMgrevent14.png" alt="" />
			</p></li><li><div>Click on the <strong><em>Search</em></strong> button and in the <strong><em>Select Users or Roles</em></strong> type the <strong><em>OpsMgrReader </em></strong>role name
</div><p><img src="https://msdnshared.blob.core.windows.net/media/2018/06/062618_1816_OpsMgrevent15.png" alt="" />
			</p></li><li>Click on <strong><em>Check Names</em></strong> and then click <strong><em>OK</em></strong>
		</li><li><div>In the bottom part of the <strong><em>Permission </em></strong>page, check the box corresponding to <strong><em>Execute</em></strong> in the <strong><em>Grant</em></strong> column and click <strong><em>OK</em></strong>
			</div><p><img src="https://msdnshared.blob.core.windows.net/media/2018/06/062618_1816_OpsMgrevent16.png" alt="" />
			</p><p>
 </p></li></ol><p>The procedure above will fix the issue with the <strong><em>p_GetDatawarehouseVersion</em></strong> stored procedure and will stop the generation of event ID 26319 related to it … and will save you from headache 
</p><p>Thank you all and enjoy problem solving 
</p><p>
 </p><p><a href="https://msdnshared.blob.core.windows.net/media/2018/06/CREATE_sdk.p_GetDatawarehouseVersion.zip">CREATE_sdk.p_GetDatawarehouseVersion.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>How to deal with Scheduled Maintenance Mode and SQL Always On</title>
      <link>https://docs.microsoft.com/archive/blogs/hybridcloud360/how-to-deal-with-scheduled-maintenance-mode-and-sql-always-on</link>
      <pubDate>Thu, 08 Mar 2018 10:59:11 GMT</pubDate>
      <dc:creator><![CDATA[Bruno Gabrielli]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/hybridcloud360/?p=1075</guid>
      <description><![CDATA[UPDATE: November 2018 the 9th – For SCOM 2016 only this issue has been fixed in UR6

Hi...]]></description>
      <content:encoded><![CDATA[<span style="color: #00b050"><strong>UPDATE: November 2018 the 9<sup>th</sup> – <span style="text-decoration: underline;font-style: italic">For SCOM 2016 only</span> this issue has been fixed in UR6</strong></span>

Hi everyone,

Bruno here. Today I will cover a topic that came to my attention several times, without being previously discussed broadly and deeply.

<span style="text-decoration: underline"><strong>The topic:
</strong></span>

Have you ever asked yourself what happen when you create a Scheduled Maintenance mode entry in your <a href="https://docs.microsoft.com/en-us/system-center/scom/what-is-new?view=sc-om-2016">System Center 2016 - Operations Manager</a> and <a href="https://docs.microsoft.com/en-us/system-center/scom/what-is-new-1801?view=sc-om-1801">above</a> with its database hosted on <a href="https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/overview-of-always-on-availability-groups-sql-server">SQL Server Always ON</a>? Have you ever checked if a given Scheduled Maintenance Mode run after the Availability Group was moved over to a secondary replica? How can I make sure that it works as expected?

<span style="text-decoration: underline"><strong>The issue:
</strong></span>

When using SQL Server Always On, all the changes occurring on databases which are part of the Availability Group are replicated to secondary replica(s). This is obviously not true for system databases such as (Master, Model, MSDB and TempDB) which can't be part of any Availability Group by design and hence cannot replicate.

To better explain the scenario, let's think about the new SQL Login creation. You know for sure that, as part of the Always On configuration, you need to replicate the Logins which are stored on the Master database, from the primary replica to all secondary replicas which belong to a given Availability Group (see <a href="https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/logins-and-jobs-for-availability-group-databases">Logins and Jobs for Availability Group Databases</a>).

Going back to our topic, when you create a Scheduled Maintenance Mode entry in System Center Operations Manager, the operation takes places into 2 different places: The OperationsManager database and the MSDB database. As I said before, the Operations Manager gets replicated over the secondary replicas, whilst the MSDB gets not.

Given that, as you can imagine, the Scheduled Maintenance Mode will not work anymore until you switch the Availability Group back to the original node.

<span style="text-decoration: underline"><strong>The prove and repro:
</strong></span>

For those of you which are not yet convinced, you can simple repro the issue doing the following:
<ol>
 	<li>In the <strong>Operations Console</strong>, create a new scheduled MM entry in SCOM if don't have any.</li>
 	<li>
<div>On the primary replica (the active instance), using <strong>Microsoft SQL Server management Studio</strong>, run the following query against the OperationsManager database to see Scheduled Maintenance mode entries and take note of (at least) one ID from the <em>ScheduleId</em> column</div>
<span style="color: blue;font-family: Consolas;font-size: 9pt;background-color: white"><em>SELECT<span style="color: black">
<span style="color: gray">*<span style="color: black">
<span style="color: blue">FROM<span style="color: black"> [OperationsManager]<span style="color: gray">.<span style="color: black">[dbo]<span style="color: gray">.<span style="color: black">[MaintenanceModeSchedule]
</span></span></span></span></span></span></span></span></span></em></span></li>
 	<li>
<div>On the primary replica (the active instance), using <strong>Microsoft SQL Server management Studio</strong>, run the following query against the MSDB and take note of the result:</div>
<p style="margin-left: 36pt"><span style="color: blue;font-family: Consolas;font-size: 9pt;background-color: white"><em>SELECT <span style="color: gray">*<span style="color: black">
<span style="color: blue">FROM<span style="color: black"> [msdb]<span style="color: gray">.<span style="color: black">dbo<span style="color: gray">.<span style="color: black">sysjobs <span style="color: blue">WHERE<span style="color: black"> [name] <span style="color: gray">=<span style="color: black">
<span style="color: red">'&lt;&lt;Value_of_ScheduledId_field_from_previous_query&gt;&gt;'
</span></span></span></span></span></span></span></span></span></span></span></span></span></em></span></p>
</li>
 	<li>On one of the secondary replicas (the passive instances), run the same as step <strong><em>3</em></strong>. You will see no lines returned (as expected).</li>
</ol>
<span style="text-decoration: underline"><strong>The solution:
</strong></span>

The solution to this issue is simple, but because of the problem's nature, cannot be considered a one-time solution. In fact, you need to apply it each and every time you create a new Scheduled Maintenance Mode.

But let's get this done now :
<ol>
 	<li>On the primary replica, open <strong>Microsoft SQL Server Management Studio</strong> and connect to it (you can use the listener name or the instance name as you prefer)</li>
 	<li>Expand <strong>SQL Server Agent</strong>
<span style="font-family: Wingdings">à</span>
<strong>Jobs</strong></li>
 	<li>Find the job named as the <em>ScheduledId </em>you got from step <strong><em>3</em></strong> in the previous section, right-click on it and select <strong>Script Jos as </strong><span style="font-family: Wingdings">à</span>
<strong>CREATE To </strong><span style="font-family: Wingdings">à</span>
<strong>File</strong></li>
</ol>
<p style="margin-left: 36pt"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2018/03/030818_0952_Howtodealwi1.png" /></p>

<ol>
 	<li>Give the file a name and click <strong>Save</strong></li>
 	<li>Now, connect to one of the secondary replica</li>
 	<li>Expand <strong>Databases </strong><span style="font-family: Wingdings">à</span>
<strong>System Databases</strong> and select the <strong>MSDB</strong> database</li>
 	<li>Open the file you saved in step <strong><em>4</em></strong> and click <strong>Execute</strong> (make sure you selected the MSDB database and that its name is appearing in the box on the left, right above <strong>Object Explorer</strong>)</li>
</ol>
<p style="margin-left: 36pt"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2018/03/030818_0952_Howtodealwi2.png" /></p>

<ol>
 	<li>
<div style="text-align: justify">Right-click on <strong>Jobs</strong> and select <strong>Refresh</strong>. You will see the newly created job appearing.</div></li>
 	<li>Repeat the above steps for any affected job on any Secondary replica</li>
 	<li>If you want, you can failover the Availability Group over one of the secondary and run the Scheduled Maintenance Mode.</li>
</ol>
Of course, this is just a quick and dirty workaround. I am pretty sure that working with your DBA you can find a way to make the Job definition aligned between replicas, automatically

Thank you all; I really hope that this post will save your time as well as you from headaches]]></content:encoded>
    </item>
    <item>
      <title>Making data ingestion through HTTP Data Collector API automatic using Operations Manager.</title>
      <link>https://docs.microsoft.com/archive/blogs/hybridcloud360/making-data-ingestion-through-http-data-collector-api-automatic-using-operations-manager</link>
      <pubDate>Thu, 14 Dec 2017 14:10:01 GMT</pubDate>
      <dc:creator><![CDATA[Bruno Gabrielli]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/hybridcloud360/?p=1045</guid>
      <description><![CDATA[Hi folks,

Here I am again. This time I will be writing my second post around HTTP Data Collector,...]]></description>
      <content:encoded><![CDATA[Hi folks,

Here I am again. This time I will be writing my second post around HTTP Data Collector, more in particular on how to make that data ingestion automatic.

There are several methods that can be used. Basically, depending on your need and environment you could use:
<ul>
 	<li>Azure Automation</li>
 	<li>Azure Automation with Hybrid Worker roles</li>
 	<li>Windows Task Scheduler</li>
 	<li>System Center Operations Manager (SCOM)</li>
</ul>
<span style="text-decoration: underline"><strong>Background:
</strong></span>

I implemented a script to ingest data using HTTP Data Collector. This data represents a custom Log Analytics field, that maps to the Organizational Unit (OU) a given computer belongs to.

In the example below, you see a part of the script which is used to retrieve and push the OU information:
<p style="margin-left: 36pt"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/12/121417_1309_Makingdatai1.png" /></p>
I want to later use this data to create computer groups in Azure Log Analytics based on the OU. Now, since there is a data retention policy in Azure Log Analytics, I need to ingest this data on a given frequency: say once per day.

As listed above, I can use the Task Scheduler in my Windows Operating System, to create a task which executes my PowerShell script or, since I have System Center Operations Manager monitoring all my computers I would go for it.

<span style="text-decoration: underline"><strong>Implementation:
</strong></span>

I will focus the discussion on SCOM, since the first 2 methods have been discussed in several other blogs and Task Scheduler is something we all know very well. Moreover, I personally do not recommend any approach which involves manual configuration or action to be carried on or applied on more than one target.

At this point the question is: How can I teach SCOM to retrieve and send data?

First, note that this approach works also for agents which have not been configured to report to Azure Log Analytics as long as they have Internet access. Second, the "secret" ingredient that you need is just a "collection rule" which run a PowerShell script (mine or any other script of your choice) and that's it.

I will continue my discussion, with the assumption that you have dealt with Management Pack Authoring before. If not, you will appreciate the following links:
<ul>
 	<li><em>Authoring for System Center 2012 - Operations Manager</em> at <a href="https://technet.microsoft.com/en-us/library/hh457564(v=sc.12).aspx">https://technet.microsoft.com/en-us/library/hh457564(v=sc.12).aspx</a></li>
 	<li><em>Authoring Tools</em> at <a href="https://technet.microsoft.com/en-us/library/hh457569(v=sc.12).aspx">https://technet.microsoft.com/en-us/library/hh457569(v=sc.12).aspx</a></li>
 	<li><em>Authoring Management Packs – the fast and easy way, using Visual Studio???</em> at <a href="https://blogs.technet.microsoft.com/kevinholman/2016/06/04/authoring-management-packs-the-fast-and-easy-way-using-visual-studio/">https://blogs.technet.microsoft.com/kevinholman/2016/06/04/authoring-management-packs-the-fast-and-easy-way-using-visual-studio/</a></li>
</ul>
I built my data ingestion MP using a fragment from Kevin Holman's <a href="https://gallery.technet.microsoft.com/SCOM-Management-Pack-VSAE-2c506737">SCOM Management Pack VSAE Fragment Library</a>. I used the <strong><em>Timed PowerShell Rule</em></strong> (identified by the <em>Rule.TimedScript.PowerShell.WithParams.mpx</em> file. Since it was just a Proof of Concepts (PoC) I created the MP directly using an XML editor, doing a bit of copy/paste.

Before importing the sample MP, let's have a look at the key parts:
<ul>
 	<li>
<div><span style="text-decoration: underline"><strong>The frequency:</strong></span> This needs to be adjusted according to your needs. It can be done through overrides. During my tests, I set it to run once per day (86400 seconds)</div>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/12/121417_1309_Makingdatai2.png" /></li>
 	<li>
<div><span style="text-decoration: underline"><strong>The script:</strong></span> I basically used the same sample script that I referenced in my <a href="https://blogs.technet.microsoft.com/hybridcloud360/2017/10/11/http-data-collector-api-in-a-real-customer-scenario/">previous post</a> with few small adjustments to add the logging and to use parameters for <em>WorkspaceID</em> and <em>PrimaryKey</em>. Of course, you can replace my sample script with any other script that fits your needs the best; it's just a matter of doing it the right way (parameters order, data retrieving and posting syntax, and so on)</div>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/12/121417_1309_Makingdatai3.png" /></li>
 	<li>
<div><span style="text-decoration: underline"><strong>The parameters:</strong></span> They really depends on the script in use; hence parameters can be considered something which are up to your script. In my example, on one of the rules, I did use the following:</div>
<ul>
 	<li>WorkspaceID</li>
 	<li>PrimaryKey</li>
 	<li>DebugEnabled</li>
</ul>
<p style="margin-left: 18pt"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/12/121417_1309_Makingdatai4.png" /></p>
<p style="margin-left: 18pt">And passed them through, this way (you'll need to replace with your <em>WorkspaceID</em> and <em>PrimaryKey</em>):</p>
<p style="margin-left: 18pt"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/12/121417_1309_Makingdatai5.png" /></p>
</li>
</ul>
With all that said, it should be easier to go and create rules to upload data to Azure Log Analytics. Anyway, attached to the post, I am providing you with my sample MP which includes both RegistryKey and OU based rules. As I normally do, the rules come disabled by default.

<span style="text-decoration: underline"><strong>Lesson Learned:
</strong></span>
<ul>
 	<li>Take into high consideration the pricing tier you subscribed. Data retention differs according to the pricing tier. For instance, if you are on the free subscription, the data will be kept for only 7; hence configuring the script to run every 2 weeks will put you in a situation in which you have missing data on the week before the collection is configured to run again. More info on pricing and licensing can be found at <a href="https://www.microsoft.com/en-us/cloud-platform/operations-management-suite">https://www.microsoft.com/en-us/cloud-platform/operations-management-suite</a> and at <a href="https://azure.microsoft.com/en-us/pricing/">https://azure.microsoft.com/en-us/pricing/</a> .</li>
 	<li>Enable the rule only where needed. if you need data from more than one computer, the recommendation is to create a group and to configure the override for that group.</li>
 	<li>Disable the debug once you made sure that the rules work as expected.</li>
</ul>
Thanks,

Bruno.

<a href="https://msdnshared.blob.core.windows.net/media/2017/11/HTTPUploadDataToLogAnalytics.Addendum.zip">HTTPUploadDataToLogAnalytics.Addendum.zip</a>]]></content:encoded>
    </item>
    <item>
      <title>HTTP Data Collector API in a real customer scenario</title>
      <link>https://docs.microsoft.com/archive/blogs/hybridcloud360/http-data-collector-api-in-a-real-customer-scenario</link>
      <pubDate>Wed, 11 Oct 2017 10:35:56 GMT</pubDate>
      <dc:creator><![CDATA[Bruno Gabrielli]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/hybridcloud360/?p=936</guid>
      <description><![CDATA[Hi there,

I am back writing a blog post about how I used the HTTP Data Collector API to fulfill a...]]></description>
      <content:encoded><![CDATA[Hi there,

I am back writing a blog post about how I used the <a href="https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-data-collector-api">HTTP Data Collector API</a> to fulfill a specific customer request.

<span style="text-decoration: underline"><strong>Background:
</strong></span>

My customer requested to create a computer group in OMS, whose membership was based on an attribute different from the computer name.

There was hence the need for a new custom attribute to be populated in OMS and to be later used in the Log Analytics to create a <a href="https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-computer-groups">Computer Group</a>.

<span style="text-decoration: underline"><strong>Implementation:
</strong></span>

Since the official documentation can be found on the <a href="https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-data-collector-api">HTTP Data Collector API</a> TechNet page, I'll focus on the method I used to retrieve the data I need. Analyzing the PowerShell example on the <a href="https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-data-collector-api">TechNet page</a>, I recognized 3 specific areas:
<ol>
 	<li>
<div>On the top of the script there's an area containing your workspace access information. Here, you have to customize this info before running the script.</div>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/10/101117_0935_HTTPDataCol1.png" /></li>
 	<li>
<div>In the center, there's the body or data part, used to retrieve your data. I am going to cover how to change this part in this post.</div>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/10/101117_0935_HTTPDataCol2.png" /></li>
 	<li>
<div>In the bottom part, you see the area containing the functions used to sign in and submit the data. I am going to refer to this part as the "fixed part"</div>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/10/101117_0935_HTTPDataCol3.png" /></li>
</ol>
Because I need to query my data to create records with different dynamic values (coming from the query results) and it is not possible to use variables with the syntax used in the sample script (which is using fixed values),<strong><em> how do I convert into Json something that is using variables?</em></strong>

The solution I implemented, which consist in a small change of the original sample script, is using the following methods (<a href="https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/add-member?view=powershell-5.1">add members</a>, <a href="https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/convertto-json?view=powershell-5.1">ConvertTo-Json</a>) and is made of the following steps:
<ol>
 	<li>Create the data structure</li>
 	<li>Populate the data structure as needed</li>
 	<li>Convert the data structure to Json</li>
</ol>
So, in the sample script below (attachments link in the bottom), you can see my script doing the following:
<ol>
 	<li>Setting the <em>Workspace ID </em>and <em>Primary Key</em></li>
 	<li>Setting the <em>LogType </em>with my own type (see "My body part" green arrow)</li>
 	<li>Retrieving the data to be sent to OMS (see "My body part" green arrow)</li>
 	<li>Creating and setting the PowerShell object containing the data (see "My body part" green arrow)</li>
 	<li>Converting the PowerShell Object to Json (see "My body part" green arrow)</li>
 	<li>Sending the data (using the <strong><em>Build-Signature</em></strong> and <strong><em>Post-OMSData</em></strong> functions and the <strong><em>Post-OMSData</em></strong> call from the "fixed part")</li>
</ol>
<p style="margin-left: 36pt"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/10/101117_0935_HTTPDataCol4.png" /></p>
<p style="margin-left: 18pt">Running the above script manually, will upload a record with the following format:</p>
<p style="margin-left: 36pt"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/10/101117_0935_HTTPDataCol5.png" /></p>
<p style="margin-left: 18pt">This is just a prototype of the script I left to the customer. Hence, it must be considered as an example to explain how to retrieve a registry key to be used as part of a Computer Group Log Search Query like this one:</p>
<p style="margin-left: 36pt"><em>RegistryKey_CL | where (Value_s == "BR1-Role") | distinct Computer
</em></p>
<p style="margin-left: 18pt"><span style="text-decoration: underline"><strong>Lesson learned:
</strong></span></p>

<ol style="margin-left: 54pt">
 	<li><span style="text-decoration: underline">LogType</span>: It represents the information type used in the query. Just remind that OMS will add the "_CL" suffix to it.</li>
 	<li><span style="text-decoration: underline">TimeGenerated</span>: This one is not mandatory the default value is the data ingestion timestamp (the timestamp when the data get uploaded).</li>
 	<li><span style="text-decoration: underline">Body part</span>: by appropriately changing the body part you can create a script that uploads different information such as ActiveDirectory attributes (Description, EmployeeID, etc), Active Directory OU location, number of files in a given path and so on.</li>
 	<li><span style="text-decoration: underline">Key fields in the record</span>: Use it if you like to have a more detailed result from your query. Here's why, in this example, I included the computer name.</li>
</ol>
Just for the purpose of demonstrating that you can really change just the body part, I am also attaching another sample script which gets the OU Attribute for the local computer (if joined to AD).
<p style="margin-left: 18pt">That's all folks, for now. I will cover how to make the data submission automatic in another post.</p>
<p style="margin-left: 18pt">Thanks,</p>
<p style="margin-left: 18pt">Bruno.</p>
<p style="margin-left: 18pt"><a href="https://msdnshared.blob.core.windows.net/media/2017/10/HTTPApiCollectorActiveDirectoryOU.zip">HTTPApiCollectorActiveDirectoryOU.zip</a></p>
<p style="margin-left: 18pt"><a href="https://msdnshared.blob.core.windows.net/media/2017/10/HTTPApiCollectorRegKey.zip">HTTPApiCollectorRegKey.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>NativeCountersCollection.ps1 – The story of the long running script</title>
      <link>https://docs.microsoft.com/archive/blogs/hybridcloud360/nativecounterscollection-ps1-the-story-of-long-running-script</link>
      <pubDate>Tue, 05 Sep 2017 13:38:32 GMT</pubDate>
      <dc:creator><![CDATA[Bruno Gabrielli]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/hybridcloud360/?p=355</guid>
      <description><![CDATA[Hi SCOM guys and IT Guys,
I want to share something interesting about the Performance Collection...]]></description>
      <content:encoded><![CDATA[<p>Hi SCOM guys and IT Guys,
</p><p>I want to share something interesting about the Performance Collection done by the <a href="https://www.microsoft.com/en-us/download/details.aspx?id=39039">Microsoft Exchange Server 2013 Management Pack</a>.
</p><p>On one of my customers, we had lots of "<em>Operations Manager failed to start a process</em>" alerts randomly coming from different Exchange Servers. This is a generic alert, indicating that a given script was killed by SCOM itself because it runs over the allowed configured timeout. Even if it is not an issue as per se, a high recurrence of this alert or a high <em>Repeat Count</em> value must not be underestimated since it denotes that the monitoring is not carried on as it should.
</p><p>As you can see from the screenshot, the failing script was the "<em>NativeCountersCollection.ps1</em>" (which is used by nearly 46 different rules that collects performance data for reporting purpose) that went over the <strong>600</strong> seconds.
</p><p><img src="https://msdnshared.blob.core.windows.net/media/2017/09/090617_0828_NativeCount1.png" alt="" />
	</p><p>For those of you which are not familiar with the Exchange Management Pack, and in particular with this script, it retrieves the configured Exchange counters (for all roles and all instances based on the installed culture) and perform a point-in-time collection using the <a href="https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.diagnostics/get-counter?view=powershell-5.1">Get-Counter</a> PowerShell cmdlet. It is normally configured to run every <strong>900</strong> seconds and with a timeout value of <strong>300</strong> seconds.
</p><p>Since my customer' environment is a medium one with roughly 30 servers and more than 200 mailbox databases, it could have been reasonable to have the script running for more than 300 seconds. As you can imagine there are several instances for each counter, in function of the environment size. So, I started the troubleshooting by increasing the timeout value to <strong>400</strong>, then <strong>500</strong> and then <strong>600</strong>. At that point, even considering the environment size, I thought that it was not acceptable, in this environment, to have a script that collects point-in-time performance counter values, running for more than 10 minutes. 
</p><p>I went ahead with the troubleshooting by running the script manually (and outside of SCOM) on the impacted servers, taking note of the starting and finishing time. No doubt; the script took around <span style="color:red"><strong>10</strong></span> minutes and sometimes even more. Together with the customer, with the assumption that it was not a capacity problem or Exchange related problem since there were neither clear symptoms of CPU, Memory or Disk sufferings nor evident leaks, we decided to investigate the server configuration. We did some basic checks and, surprisingly, we found out that the Power Plan was configured to "<strong><em>Balanced (recommended)</em></strong>"
</p><p><img src="https://msdnshared.blob.core.windows.net/media/2017/09/090617_0828_NativeCount2.png" alt="" />
	</p><p>To prove that this setting could have been the root cause, we changed it to "<strong><em>High Performance</em></strong>" on one server, tested the script once again and <a href="https://www.google.it/imgres?imgurl=https://cdn.shopify.com/s/files/1/0817/1837/products/8_BOOOM_grande.jpg?v%3D1502096595&amp;imgrefurl=https://www.culturelabel.com/products/booom-johnny-egg&amp;docid=RXFpW31qIIZwxM&amp;tbnid=LSRfVchNAyG4HM:&amp;vet=10ahUKEwicq7Gu7o3WAhWCRBoKHQ8_BKU4ZBAzCBQoEjAS..i&amp;w=600&amp;h=400&amp;bih=932&amp;biw=1920&amp;q=booom&amp;ved=0ahUKEwicq7Gu7o3WAhWCRBoKHQ8_BKU4ZBAzCBQoEjAS&amp;iact=mrc&amp;uact=8"><img src="https://msdnshared.blob.core.windows.net/media/2017/09/090617_0828_NativeCount3.jpg" alt="" border="0" /></a>. The script execution time went down from the previous <span style="color:red">9-10</span> minutes to roughly <span style="color:#00b050"><strong>3-4</strong></span>. Yes, you got it right: <span style="color:#00b050"><strong>60-70%</strong></span> faster. We repeated the test on 3 other servers and same result, so the decision was made: we must change the Power Option setting to use the "<strong><em>High Performance</em></strong>" power plan.
</p><p>Setting the power plan to High Performance is not negatively impacting the overall system performance, so you can set it on every server. More information about performance issue related to the "<strong><em>Balanced (recommended)</em></strong>" power plan can be found in the article <em>Slow Performance on Windows Server when using the "Balanced" Power Plan</em> at <a href="https://support.microsoft.com/en-us/help/2207548/slow-performance-on-windows-server-when-using-the-balanced-power-plan">https://support.microsoft.com/en-us/help/2207548/slow-performance-on-windows-server-when-using-the-balanced-power-plan</a>
	</p><p>How can you do it? Well, there are different options:
</p><ol><li>Manually on selected servers only
</li><li>Using a PowerShell script (find a sample for Exchange servers attached below) on selected servers
</li><li>On all server using a Group Policy
</li></ol><p>I leave the decision on how to change this setting up to you. Nobody knows your infrastructure better than you 
</p><p>Hope that helps.
</p><p>Thanks!
</p><p><a href="https://msdnshared.blob.core.windows.net/media/2017/09/SettingPowerPlanToHighPerf.zip">SettingPowerPlanToHighPerf.ps1.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Active Directory Federation Service Management Pack – Addendum</title>
      <link>https://docs.microsoft.com/archive/blogs/hybridcloud360/active-directory-federation-service-management-pack-addendum</link>
      <pubDate>Mon, 04 Sep 2017 09:36:55 GMT</pubDate>
      <dc:creator><![CDATA[Bruno Gabrielli]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/hybridcloud360/?p=186</guid>
      <description><![CDATA[Hello, it's me again.
Following the idea of my other post on Active Directory Management Pack –...]]></description>
      <content:encoded><![CDATA[<p>Hello, it's me again.
</p><p>Following the idea of my other post on <a href="https://blogs.technet.microsoft.com/hybridcloud360/2017/08/28/active-directory-management-pack-addendum-for-trust-monitoring/">Active Directory Management Pack – Addendum for Trust Monitoring</a>, I went ahead with the troubleshooting and resolved an issue with the Active Directory Federation Services 2012 R2 that one of my customers is having.
</p><p>Basically, the issue is that the current MP version, that you can download from <a href="https://www.microsoft.com/en-us/download/details.aspx?id=41184">HERE</a>, raise an alert saying that the <strong>"MEX Endpoint Is Unreachable"</strong> even when it is fully OK.
</p><p>The issue for this false positive seems to be that the script does not exclude from the check, those servers whose role is not "PrimaryComputer". Having that said, I created a modified version of the script (and of whatever is needed to run it) and put it into a simple addendum MP that contains the following:
</p><ul><li>A DataSource module which contains the fixes script used to perform the check only on PrimaryServer role
</li><li>A UnitMonitorType which parses the output from the DataSource module
</li><li>A UnitMonitor which contains the script body and reports on the MEX health by creating an alert in case the status is not good.
</li><li>A pre-defined override to disable the original monitor.
</li></ul><p>This addendum MP, only works with the MP version released by Microsoft for Active Directory Federation Services 2012 R2. To use it, just import it. No need for additional overrides or configuration.
</p><p>If you want to give it a try, download the Zip file from the link below and import it.
</p><p>I hope this addendum will relieve your pain, a bit.
</p><p>Thanks 
</p><p>
 </p><p><a href="https://msdnshared.blob.core.windows.net/media/2017/08/Microsoft.ActiveDirectoryFederationServices.2012.R2.Addendum.xml_.zip">Microsoft.ActiveDirectoryFederationServices.2012.R2.Addendum.xml</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Installing prerequisites for System Center Operations Manager 2016 Web Console</title>
      <link>https://docs.microsoft.com/archive/blogs/hybridcloud360/installing-prerequisites-for-system-center-operations-manager-2016-web-console</link>
      <pubDate>Wed, 30 Aug 2017 21:04:33 GMT</pubDate>
      <dc:creator><![CDATA[Bruno Gabrielli]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/hybridcloud360/?p=226</guid>
      <description><![CDATA[20170919 – Thanks to my colleague' suggestion, the post and the attached script were changed to...]]></description>
      <content:encoded><![CDATA[<p><span style="color:red"><strong>20170919 – Thanks to my colleague' suggestion, the post and the attached script were changed to remove IIS components which are not necessary to the Web Console installation. Thanks Tyson.
</strong></span></p><p>Hi all,
</p><p>Maybe this has been already blogged, but in the attempt to make IT guys' life easier I want to share a small Power Shell script which I Used to install the necessary Web Console prerequisites for System Center Operations Manager 2016 on <span style="text-decoration:underline"><strong>Windows Server 2016</strong></span>.
</p><p>Instead of going back and forth with the System Center Operations Manager prerequisite checker and install the required components one by one, you can use the script in attach which is also screenshotted below:
</p><p><img src="https://msdnshared.blob.core.windows.net/media/2017/09/091917_0851_Installingp1.png" alt="" />
	</p><p>You can simply launch it from an elevated Windows Power Shell prompt. 
</p><p>The script will ask for an optional parameter, the Source, that will allow the user to specify the path to feature files if the files are not available in the local feature store of the target computer. 
</p><p><img src="https://msdnshared.blob.core.windows.net/media/2017/09/091917_0851_Installingp2.png" alt="" />
	</p><p>This parameter can be left blank or null, hence should you not need to enter any source path, just hit <em>Enter</em> and the script will move forward.
</p><p><img src="https://msdnshared.blob.core.windows.net/media/2017/09/091917_0851_Installingp3.png" alt="" />
	</p><p>If you want to test it before running in Prod, you can add the <strong><em>-Whatif</em></strong> switch at the end of the <strong><em>Add-WindowsFeature</em></strong> command line and you will get something similar to the screenshot below wit some nice info at the end:
</p><p><img src="https://msdnshared.blob.core.windows.net/media/2017/09/091917_0851_Installingp4.png" alt="" />
	</p><p>The script will automatically restart the server <strong><em>ONLY</em></strong> if needed (thanks to the restart switch).
</p><p>My 0.02 :-)
</p><p><a href="https://msdnshared.blob.core.windows.net/media/2017/09/BR1_SCOM2016_IIS_Prerequisites.ps1_.zip">BR1_SCOM2016_IIS_Prerequisites.ps1.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Active Directory Management Pack – Addendum for Trust Monitoring</title>
      <link>https://docs.microsoft.com/archive/blogs/hybridcloud360/active-directory-management-pack-addendum-for-trust-monitoring</link>
      <pubDate>Mon, 28 Aug 2017 16:33:12 GMT</pubDate>
      <dc:creator><![CDATA[Bruno Gabrielli]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/hybridcloud360/?p=76</guid>
      <description><![CDATA[UPDATE: October 2017 the 3rd – Added an example of the trust list format.


Hi there,

After...]]></description>
      <content:encoded><![CDATA[<span style="color: #00b050"><strong>UPDATE: October 2017 the 3<sup>rd</sup> – Added an example of the trust list format.
</strong></span>

Hi there,

After long time I came back on an issue that some of my customers were facing. They were struggling with the Trust Monitoring scenario included in the Active Directory Management Pack for SCOM.

The problem they had, was pretty simple (as well as its solution). They "just" wanted to monitor trust status, but only for some Trusts. This sounded like: "Hey, I want to monitor my Trusts, but I want to exclude those I know as not working and that I cannot fix. I really do not want to renounce to the entire Trust Monitoring just because I cannot exclude some of them".

Well, that sentence made me thinking about how to delight my customers and do something interesting for other customers as well. So, I came up with the idea of an addendum MP which gives the possibility to specify a trust or a list of trusts to be excluded.

<span style="text-decoration: underline"><strong>Let's start with a bit of explanation.
</strong></span>

The Trust Monitor coming with the Active Directory Management Pack, is using basically 3 components:
<ul>
 	<li>A DataSource module which contains the script used to query and return the status of <span style="text-decoration: underline"><strong>all existing trusts.</strong></span></li>
 	<li>A UnitMonitorType which parses the output from the DataSource module</li>
 	<li>A UnitMonitor which basically reports on the Trust health by creating an alert in case the status is not good.</li>
</ul>
I will not go deeper, just to not annoy you but if you are interested in the theory you can ping me at my email address or a leave a comment and I will follow up. The small issue inside this mechanism is that, as I wrote in the description of the DataSource task, it checks for all trusts and there's no way to create an override based on a single Trust or list of Trusts. You got it right: You can only disable the monitor that turns into <span style="text-decoration: underline"><strong>completely shutting down the Trust Monitoring scenario</strong></span>.

What I did is:
<ol>
 	<li>
<div>I created a new DataSource that takes another input parameter: the single trust or the comma separated list of trusts</div>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/10/100317_0838_ActiveDirec1.png" />

And which is using a modified version of the script with the exclusion logic

<img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/10/100317_0838_ActiveDirec2.png" /></li>
 	<li>
<div>Then, because of the new parameter, I had to create a new UnitMonitorType and a new UnitMonitor in order to expose and to pass the new overridable parameter</div>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/10/100317_0838_ActiveDirec3.png" />

<img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/10/100317_0838_ActiveDirec4.png" /></li>
 	<li>
<div>Include some pre-defined overrides to disable the original monitor</div>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/10/100317_0838_ActiveDirec5.png" /></li>
</ol>
Of course, I am giving here the simple version of the story since I had to consider some different possibility for the override value (single trust, Trust list, no value) but luckily, I got it done and working. Using this addendum, you can continue using the Trust Monitoring scenario and bend it to your needs by configuring the necessary override.

<span style="text-decoration: underline"><strong>Now that you have clear in mind what I have done, let's discuss how to use it.
</strong></span>

First of all, it works every version of System Center Operations Manager that the original management pack is working on. Second, I created this solution for all Active Directory Management Pack version, including the completely brand new one.

And now: how do I use it? Simple answer: You just download the file for the management pack version you are using from this post, import it and that's all. As said, the addendum MP contains an override that disables the original monitor since the new one comes enabled. Now you can go ahead with the necessary overrides.

Like other Management Packs, overrides can be created for different targets. For every target you choose, you have the possibility to create one override per trust or a single override with a trust list. <span style="color: #333333;font-family: Segoe UI;font-size: 10pt">The trust list can be passed as a comma separated value list. For instance you can enter "DomainA.Com, DomainB.Local, DomainC.my" without double quotes, and so on.</span>

I intentionally left the management pack files (yes more than one since this solution is available for all Active Directory Management Pack version know so far) unsealed so you can store your overrides in the same file. Should you need this solution any longer, all you have to do is to remove it from your System Center Operations Manager management group.

If you want to give it a try, download the Zip file and import the version you need.

I hope this solution will make your life easier and will make you appreciating Microsoft solution more and more.

Thanks

<a href="https://msdnshared.blob.core.windows.net/media/2017/08/ActiveDirectory-Addendum.zip">ActiveDirectory Addendum MP files.zip</a>]]></content:encoded>
    </item>
  </channel>
</rss>