<?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>Denis Rougeau’s System Center &amp; Azure Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/denisrougeau/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/denisrougeau/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:46:01 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Understanding VM Availability in Azure</title>
      <link>https://docs.microsoft.com/archive/blogs/denisrougeau/understanding-vm-availability-in-azure</link>
      <pubDate>Sat, 11 Jun 2016 15:45:12 GMT</pubDate>
      <dc:creator><![CDATA[DRougeau]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/denisrougeau/?p=116</guid>
      <description><![CDATA[When discussing Azure Virtual Machine (VM) resiliency with customers, they typically assume it is...]]></description>
      <content:encoded><![CDATA[When discussing Azure Virtual Machine (VM) resiliency with customers, they typically assume it is comparable to their on-prem VM architecture and as such, features from on-prem is expected in Azure.  Well, it is not the case, thus I wanted to put this together to provide more clarity on the VM construct in Azure to better understand how VM availability in Azure is typically more resilient then most on-prem configuration.

A VM has 3 main components: Compute, Storage and Networking.  For this discussion I will only target the Compute(VM) and Storage components.

A few important concepts to understand first:
<p style="padding-left: 30px"><span style="text-decoration: underline">Fabric Controller (FC)</span></p>

<ul>
 	<li>The FC is the kernel of the Microsoft Azure cloud operating system.  It monitors and manages most Azure resources.  It also detects and responds to both software and hardware failure automatically.</li>
</ul>
<p style="padding-left: 30px"><span style="text-decoration: underline">Partitioning</span></p>
<p style="padding-left: 30px">Azure's Fabric Controller uses two types of partitions: Update Domains(UDs) and Fault Domains(FDs).</p>

<ul>
 	<li>An <em>Update Domain</em> is used to upgrade a service’s role instances in groups. Azure deploys service instances into multiple update domains. For an in-place update, the FC brings down all the instances in one update domain, updates them, and then restarts them before moving to the next update domain. This approach prevents the entire service from being unavailable during the update process.</li>
 	<li>A <em>Fault Domain</em> defines potential points of hardware or network failure. For any role with more than one instance, the FC ensures that the instances are distributed across multiple fault domains, in order to prevent isolated hardware failures from disrupting service. All exposure to server and cluster failure in Azure is governed by fault domains.</li>
</ul>
&nbsp;

<b>Azure Blob Storage</b>

Architecture Overview:

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/AzureStorageStampsLayer.png"><img width="472" height="261" class="alignnone wp-image-375" alt="AzureStorageStampsLayer" src="https://msdnshared.blob.core.windows.net/media/2016/06/AzureStorageStampsLayer-300x166.png" /></a>

As per the above slide from <a href="https://channel9.msdn.com/Events/Build/2013/3-541">Brad Calder at Build 2013</a>, a Stamp is a cluster of servers hosted in Azure Datacenter. Each Datacenter have multiple Stamps. It is composed of 3 layers with built-in redundancy to provide High Availability. For the purpose of this discussion, I will only target the lower level layer. At the Distributed File System layers, 3 replicas of each file, referred as Extent, are maintained on 3 different servers partitioned between <em>Update Domains</em> and <em>Fault Domains</em>. Each write operations are performed <em>Synchronously</em> and control is returned only after the 3 copies completed the write, thus ensuring consistency.

&nbsp;

<b>Virtual Machine </b>

Architecture Overview:

<img width="481" height="77" class="alignnone wp-image-385" alt="AzureFCOverview" src="https://msdnshared.blob.core.windows.net/media/2016/06/AzureFCOverview-300x48.png" />

In Azure, Virtual Machines and the Hypervisor physical hosts are monitored and managed by the Fabric Controller(FC). The FC has the ability to detect failures in 2 modes: Reactive and Proactive. If the FC detects failures in reactive mode (Heartbeats missing) or proactive mode (known situations leading to a failure) from a VM or a hypervisor host, it will initiate a recovery by either redeploying the VM on a healthy host (same host or another host) and mark the failed resource as unhealthy and remove it from the rotation for further diagnosis. This process is also known as <em>Self-Healing</em> or <em>Auto Recovery.</em>

&nbsp;

<b>Summary:</b>

With the approach Microsoft took when designing the Azure platform, Microsoft has built an Enterprise ready Cloud which provides a high level of resiliency. With this detailed concept of VM construct in mind, the discussion around HA workload might be slightly different for an Azure architecture compare to an on-prem architecture.

For example:
<ul>
 	<li>Why and what type of availability is required for a specific workload within the Datacenter?</li>
 	<li>How fast can the workload recover from a SAN storage outage?</li>
 	<li>Can a workload recover automatically from a host failure?</li>
 	<li>How many identical copies of my VM disks is maintained?</li>
</ul>
&nbsp;

<b>Note:</b>
<ol>
 	<li>This blog IS NOT a recommendation for managing your workloads High Availability(HA) in Azure.  Guidance is provided here <a href="https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-manage-availability/">Manage the availability of virtual machines </a></li>
 	<li>[Update] Microsoft does offer SLA for single instance VM with very specific requirements.  Please visit the <a href="https://azure.microsoft.com/en-us/support/legal/sla/virtual-machines">SLA for Virtual Machines</a> webpage for more info.</li>
</ol>
&nbsp;

<b>References:</b>
<ul>
 	<li>Azure Resiliency Technical Guidance
<a href="https://azure.microsoft.com/en-us/documentation/articles/resiliency-technical-guidance/">https://azure.microsoft.com/en-us/documentation/articles/resiliency-technical-guidance/</a></li>
 	<li>Windows Azure Storage: What’s Coming, Best Practices, and Internals
<a href="https://channel9.msdn.com/Events/Build/2013/3-541">https://channel9.msdn.com/Events/Build/2013/3-541</a></li>
 	<li>Service Healing - Auto-recovery of Virtual Machines
<a href="https://azure.microsoft.com/en-us/blog/service-healing-auto-recovery-of-virtual-machines/">https://azure.microsoft.com/en-us/blog/service-healing-auto-recovery-of-virtual-machines/</a></li>
 	<li>Windows Azure Storage: A Highly Available Cloud Storage Service with Strong Consistency
<a href="https://www-bcf.usc.edu/~minlanyu/teach/csci599-fall12/papers/11-calder.pdf">https://www-bcf.usc.edu/~minlanyu/teach/csci599-fall12/papers/11-calder.pdf </a></li>
</ul>
&nbsp;

<em>This posting is provided "AS IS" with no warranties and confers no rights.</em>]]></content:encoded>
    </item>
    <item>
      <title>Enabling Registration of DNS Reverse (PTR) record for Azure IaaS VMs</title>
      <link>https://docs.microsoft.com/archive/blogs/denisrougeau/enabling-dns-reverse-lookup-in-azure-iaas</link>
      <pubDate>Sat, 18 Apr 2015 05:40:00 GMT</pubDate>
      <dc:creator><![CDATA[DRougeau]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/denisrougeau/2014/02/27/enabling-dns-reverse-lookup-in-azure-iaas/</guid>
      <description><![CDATA[2018-06-25 - Quick Update

The information below applies to Azure Classic VMs.  It appears their...]]></description>
      <content:encoded><![CDATA[<strong>2018-06-25 - Quick Update</strong>

The information below applies to Azure Classic VMs.  It appears their is a solution for ARM VMs on <a href="https://github.com/Azure/azure-quickstart-templates/tree/master/custom-private-dns">GitHub</a>.

P.S.:  I have NOT tested the solution on GitHub myself.

<hr />

I was asked to setup an infrastructure in Azure IaaS for a legacy application that requires IPv4 reverse DNS lookup (Limited to the IaaS environment).  So, I setup VMs in Azure, promoted a VM as an Active Directory Domain Controller (Single forest/domain), installed DNS and configured a Reverse DNS zone.  For those who have tried, they probably noticed that none of the computers did dynamically register the reverse lookup (PTR) records in DNS.  So what need to be done for each Azure VMs to register their PTR record dynamically?

Quite simple, the DNS Dynamic Registration setting under<em> Network Adapter properties / Internet Protocol Version 4 properties / Advanced / DNS must have the </em>"<em>Use this connection's DNS suffix in DNS registration</em>" check.  <span style="text-decoration: underline"><strong>BUT WAIT!</strong></span>  manual configuration of NIC properties in Azure are not persistent, so it must be automated.

The solution provided below is a suggested solution to automate the process using a PowerShell startup script in Active Directory Group Policy (GPO)

<span style="text-decoration: underline"><span style="color: #993300;text-decoration: underline"><strong>UPDATE 4/22/2015</strong></span></span><span style="color: #993300"><strong>:</strong></span>  <strong>PowerShell v3.0</strong> is required for the script to complete work on <strong>Win2008R2</strong>.  I also attached a VBScript version for those who would rather use VBScript then update all the Win2008R2 systems to PowerShell V3.<span style="text-decoration: underline">
</span>

<span style="text-decoration: underline">Pre-Requisites:</span>
<ol>
 	<li>First, a reverse lookup zone must exist.  To create a IPv4 DNS Reverse lookup zone consult: <a href="https://technet.microsoft.com/en-us/library/cc816676(v=ws.10).aspx">https://technet.microsoft.com/en-us/library/cc816676(v=ws.10).aspx</a></li>
</ol>
<span style="text-decoration: underline">Create a GPO:</span>
<ol>
 	<li>Create a new Group Policy using <em>GPEdit.msc</em> and browse to:  <em>Computer configuration / Policies / Windows Settings / Scripts (Startup/Shutdown) </em></li>
 	<li>In the Details pane, double-click on Startup</li>
 	<li>In the Startup properties window, click on the <em>PowerShell Scripts</em> tab</li>
 	<li>Then click on <em>Show Files</em> button, and paste the attached NICConfigPS.ps1 PowerShell script.</li>
 	<li>In the Startup properties window, click on <em>Add</em>, then <em>Browse</em> and select the file <em>NICConfigPS.ps1</em>, then <em>OK</em> to Close
<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/63/8156.ReverseDNS-Startupscript1.JPG"></a><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/63/ReverseDNS-Startupscript2.JPG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/63/ReverseDNS-Startupscript2.JPG" border="0" /></a></li>
 	<li>Click OK to complete the <em>Startup</em> script</li>
</ol>
<span style="text-decoration: underline">Apply the GPO:</span>
<ol>
 	<li>Once the GPO is created, it needs to be applied.  I would suggest to apply at an Active Directory Site level which defines the virtual network(s) hosted in Azure</li>
</ol>
<span style="text-decoration: underline">Validation:</span>
<ol>
 	<li><span style="color: #ff0000">*** IMPORTANT *** </span> A reboot is necessary for the changes to take effect once the GPO is applied.</li>
 	<li>In DNS Manager, under the reverse DNS Zone, you should see a PTR record for your computer fully qualified domain name (FQDN).</li>
 	<li>Also, from a command prompt: <em><strong>PING -a &lt;IP Address of your server&gt;</strong></em>.  Now, it should return the FQDN of your server</li>
</ol>
<p style="padding: 0;margin: 0"></p>
.

<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/telligent.evolution.components.attachments/01/10163/00/00/03/62/38/11/NICconfig.zip">NICconfig.zip</a>]]></content:encoded>
    </item>
    <item>
      <title>Operations Manager - Certificates from Concept to Deployment</title>
      <link>https://docs.microsoft.com/archive/blogs/denisrougeau/operations-manager-certificates-from-concept-to-deployment</link>
      <pubDate>Tue, 02 Sep 2014 11:10:00 GMT</pubDate>
      <dc:creator><![CDATA[DRougeau]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/denisrougeau/2014/09/02/operations-manager-certificates-from-concept-to-deployment/</guid>
      <description><![CDATA[The following is a &quot;mini-guide&quot; I developed to help understand, obtain and troubleshoot...]]></description>
      <content:encoded><![CDATA[<p><span style="color:#1f4e79;font-family:Calibri;font-size:medium;">The following is a &quot;mini-guide&quot; I developed to help understand, obtain and troubleshoot OpsMgr communication using certificates.&nbsp;&nbsp;This information is based on my experience(+struggle!)&nbsp;and understanding of the use of certificates to authenticate and process data flow for OpsMgr 2007 and 2012.&nbsp; This guide contains information about:<br /></span></p>
<ul>
<li><span style="color:#1f4e79;font-family:Calibri;font-size:medium;">OpsMgr Certificates Overview and Concepts</span></li>
<li><span style="color:#1f4e79;font-family:Calibri;font-size:medium;">How to obtain an OpsMgr certificate from Win2008 Enterprise CA<br /></span></li>
<li><span style="color:#1f4e79;font-family:Calibri;font-size:medium;">Gateway approval process to initiate communication from MS to Gateway (OpsMgr 2012 only)<br /></span></li>
<li><span style="color:#1f4e79;font-family:Calibri;font-size:medium;">Sample screenshot of a valid OpsMgr certificate<br /></span></li>
</ul>
<p></p>
<h1><span style="color:#1f4e79;font-family:Calibri;font-size:medium;">-------------------------------------------------------------------------------------------------------------------<br /></span></h1>
<hr style="width:5px;" />
<p><strong><span style="color:#1f4e79;font-family:Calibri;font-size:x-large;">OpsMgr Communication using Certificate Overview</span></strong></p>
<p><span style="color:#2e74b5;font-family:Calibri Light;font-size:large;">Overview</span></p>
<p><span style="font-family:Calibri;font-size:medium;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/63/OpsMgr-Certificates-Overview.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-63/OpsMgr_2D00_Certificates_2D00_Overview.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/63/OpsMgr-Certificates-Overview.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-63/OpsMgr_2D00_Certificates_2D00_Overview.jpg" border="0" /></a><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/63/5126.OpsMgr-Certificates-Overview.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-63/5126.OpsMgr_2D00_Certificates_2D00_Overview.jpg"></a><br /></span></p>
<p><span style="font-family:Calibri;font-size:medium;">Communication between OpsMgr servers (MS, GTW, Agents) in untrusted domains is done through certificates. So computers need its own OpsMgr certificates.&nbsp; OpsMgr uses 2 certificates on each computer, only one <span style="text-decoration:underline;"><strong>must be</strong></span> provided by a trusted authority</span></p>
<p></p>
<ul>
<li>
<p><em><span style="font-size:medium;">OpsMgr Certificate X.509 (generated by a trusted authority)</span></em></p>
<p><i>&nbsp;&nbsp; This certificate is located in the<b> Local Computer / Personal / Certificates</b> Container</i></p>
</li>
<li>
<p><em><span style="font-size:medium;">OpsMgr Self-Signed Certificate (auto-generated by MOMCertImport or agent restart)</span></em></p>
<p><i>&nbsp;&nbsp; This certificate is located in the <b>Local Computer / Operations Manager / Certificates</b> Container</i></p>
<p>&nbsp;</p>
</li>
</ul>
<p><span style="color:#2e74b5;font-family:Calibri Light;font-size:large;">OpsMgr Certificate Requirements</span></p>
<ol>
<li>
<p>All servers involve in the authentication using a certificate must trust the certificate authority where the certificate originate. &nbsp;They must have the CA root chain of the CA in their trusted root authorities.&nbsp; (Does not have to be same Root CA, but Root CA must be trusted by source and target)</p>
</li>
<li>
<p>Each computer must have its own certificate loaded in the Local Computer Personal store.&nbsp; (See sample screenshot in Appendix)</p>
<ol>
<li>
<p>Must include the Private Key</p>
</li>
<li>
<p>Subject Name must match computer FQDN (<i>CN=&lt;ServerName&gt;</i>)</p>
</li>
<li>
<p>Must be trusted all the way to the root (Chain)</p>
</li>
</ol></li>
<li>
<p>Certificates configuration options:</p>
<ol>
<li>
<p>Hash Algorithm does not need to be same between source and target.&nbsp; (Ex. SHA1 on MS and SHA256 on GTW works)</p>
</li>
<li>
<p>Key size can be 2048 and 4096</p>
</li>
<li>
<p>Does not appear to validate with CRL.&nbsp; Even if CRL distribution point is not available, Cert load successfully.&nbsp; (Also tried Clearing CRL Cert Cache)</p>
<p>&nbsp;</p>
</li>
</ol></li>
</ol>
<p><span style="color:#2e74b5;font-family:Calibri Light;font-size:large;">OpsMgr Self-Signed Certificate Requirements</span></p>
<ol>
<li>
<p>If OpsMgr Self-Signed Cert (MOMCertImport) is not there, data flow is not being process</p>
<ol>
<li>
<p>OpsMgr Self-Signed certificate is not used for authentication.</p>
</li>
<li>
<p><b><i>MOMCerImport</i></b> seems to be an optional task as restarting the agent also does generate the OpsMgr self-signed certificate</p>
<p>&nbsp;</p>
</li>
</ol></li>
</ol>
<p><span style="color:#2e74b5;font-family:Calibri Light;"><span style="color:#1f4e79;font-family:Calibri;font-size:x-large;"><strong>Obtaining a Certificate from Win2008 Enterprise CA</strong></span></span></p>
<p><span style="font-family:Calibri;font-size:medium;">This section is based on the following TechNet article with some additional details to&nbsp;help simplify the process</span></p>
<p><span style="font-family:Calibri;"><span style="font-size:medium;">How to Obtain a Certificate Using Windows Server 2008 Enterprise CA<br /> <a href="https://technet.microsoft.com/en-us/library/hh467900.aspx"><span style="color:#0563c1;">https://technet.microsoft.com/en-us/library/hh467900.aspx</span></a> </span></span></p>
<ul>
<li>
<p><span style="font-size:small;">Create an OpsMgr Certificate Template (Enterprise CA)</span></p>
</li>
<li>
<p><span style="font-size:small;">Download and Import Trusted Root (CA) Certificate (and Sub CA)</span></p>
</li>
<li>
<p><span style="font-size:small;">Request OpsMgr Certificate</span></p>
</li>
<li>
<p><span style="font-size:small;">Import OpsMgr Certificate </span></p>
</li>
</ul>
<p></p>
<p><span style="color:#2e74b5;font-family:Calibri Light;font-size:large;">Create an OpsMgr Certificate Template</span><span style="color:#2e74b5;font-family:Calibri Light;font-size:large;"> (Enterprise CA)</span></p>
<p><span style="font-family:Calibri;font-size:medium;"> <b>Note</b>: A PKI Administrator privileges is required to perform the following steps.</span></p>
<p><span style="text-decoration:underline;"><span style="font-family:Calibri;font-size:medium;">To create a certificate template</span></span></p>
<ol>
<li>
<p>On the computer that is hosting your enterprise CA, on the Windows desktop, click <b>Start</b>, point to <b>Programs</b>, point to <b>Administrative&nbsp;&nbsp; Tools</b>, and then click <b>Certification Authority</b>.</p>
</li>
<li>
<p>In the navigation pane, expand the CA name, right-click <b>Certificate Templates</b>, and then click <b>Manage</b>.</p>
</li>
<li>
<p>In the Certificate Templates console, in the results pane, right-click <b>IPsec (Offline request)</b>, and then click <b>Duplicate Template</b>.</p>
</li>
<li>
<p>In the&nbsp; Duplicate Template&nbsp; dialog box, select</p>
<ol>
<li>
<p><b>Windows Server 2008 Enterprise Edition </b></p>
</li>
</ol></li>
<li>
<p>In the Properties of New Template dialog box, on the General tab, in the Template display name text box, type a new name for this template; for example, <b>&lt;OpsMgrCert&gt;</b>.</p>
</li>
<li>
<p>On the <b>Request Handling</b> tab, select <b>Allow private key to be exported</b>.</p>
</li>
<li>
<p>Click the <b>Extensions</b> tab, and in Extensions included in this template, click <b>Application Policies</b>, and then click <b>Edit</b>.</p>
</li>
<li>
<p>In the Edit Application Policies Extension dialog box, click <b>IP security IKE intermediate</b>, and then click <b>Remove</b>.</p>
</li>
<li>
<p>Click <b>Add</b>, and in the Application policies list, hold down the CTRL key to multi-select items from the list, click <b>Client Authentication</b> and <b>Server Authentication</b>, and then click <b>OK</b>.</p>
</li>
<li>
<p>In the Edit Application Policies Extension dialog box, click <b>OK</b>.</p>
</li>
<li>
<p>Click the Security tab and ensure that the <b>Authenticated Users</b> group has <b>Read</b> and <b>Enroll</b> permissions, and then click <b>OK</b>.</p>
</li>
<li>
<p>Close the Certificate Templates console.</p>
</li>
</ol>
<p></p>
<p><span style="text-decoration:underline;"><span style="font-family:Calibri;font-size:medium;">To add the template to the Certificate Templates folder</span></span></p>
<ol>
<li>
<p>On the computer that is hosting your Enterprise CA, in the Certification Authority snap-in, right-click the <b>Certificate Templates</b> folder, point to <b>New</b>, and then click <b><em>Certification Template to Issue</em></b><em>.</em></p>
</li>
<li>
<p>In the Enable Certificate Templates box, select the certificate template that you created</p>
<p>Ex: <em><span style="color:#000000;"><b>OpsMgrCert</b></span></em></p>
</li>
<li>
<p>Click <b>OK</b>.</p>
</li>
</ol>
<p></p>
<p><span style="color:#2e74b5;font-family:Calibri Light;font-size:large;">Download and Import Trusted Root (CA) Certificate</span><span style="color:#2e74b5;font-family:Calibri Light;font-size:large;"> (and Sub CA)</span></p>
<p><span style="font-family:Calibri;"><span style="font-size:medium;"> <span style="text-decoration:underline;">To download the Trusted Root (CA) certificate</span></span></span></p>
<ol>
<li>
<p>Log on to a host in the domain. (Any)</p>
</li>
<li>
<p>Start Internet Explorer, and connect to the computer hosting Certificate Services.</p>
<p>Ex.: <b><i>https://&lt;PKIServerName&gt;/CertSrv</i></b></p>
</li>
<li>
<p>On the Welcome page, click <b>Download a CA Certificate, certificate chain, or CRL</b>.</p>
</li>
<li>
<p>On the Download a CA Certificate, Certificate Chain, or CRL page, click <b>Encoding method</b>, click <b>Base 64</b>, and then click <b>Download CA certificate chain</b>.</p>
</li>
<li>
<p>In the File Download dialog box, click <b>Save</b> and save the certificate</p>
<p>Ex.: <em><b>TrustedRootCert.p7b</b></em></p>
</li>
<li>
<p>When the download has finished, close Internet Explorer.</p>
</li>
</ol>
<p></p>
<p><span style="text-decoration:underline;"><span style="font-family:Calibri;font-size:medium;">To&nbsp;import the Trusted Root (CA) certificate</span></span></p>
<ol>
<li>
<p>Logon to the host you want to import the Root CA.&nbsp;</p>
</li>
<li>
<p>Click <b>Start</b>, and then click <b>Run</b>.</p>
</li>
<li>
<p>In the Run dialog box, type <b>mmc</b>, and then click <b>OK</b>.</p>
</li>
<li>
<p>In the Console1 window, click <b>File</b>, and then click <b>Add/Remove Snap-in</b>.</p>
</li>
<li>
<p>In the Add/Remove Snap-in dialog box, click <b>Add</b>.</p>
</li>
<li>
<p>In the Add Standalone Snap-in dialog box, click <b>Certificates</b>, and then click <b>Add</b>.</p>
</li>
<li>
<p>In the Certificates snap-in dialog box, select <b>Computer account</b>, and then click <b>Next</b>.</p>
</li>
<li>
<p>In the Select Computer dialog box, ensure that <b>Local computer</b>: (the computer this console is running on) is selected, and then click <b>Finish</b>.</p>
</li>
<li>
<p>In the Add Standalone Snap-in dialog box, click <b>Close</b>.</p>
</li>
<li>
<p>In the Add/Remove Snap-in dialog box, click <b>OK</b>.</p>
</li>
<li>
<p>In the Console1 window, expand <b>Certificates (Local Computer)</b>, expand <b>Trusted Root Certification Authorities</b>, and then click <b>Certificates</b>.</p>
</li>
<li>
<p>Right-click <b>Certificates</b>, select <b>All Tasks</b>, and then click <b>Import</b>.</p>
</li>
<li>
<p>In the Certificate Import Wizard, click <b>Next</b>.</p>
</li>
<li>
<p>On the File to Import page, click Browse and select the location where you downloaded the CA certificate file, for example: <b><i>TrustedRootCA.p7b</i></b>, select the file, and then click <b>Open</b>.</p>
</li>
<li>
<p>On the File to Import page, select Place all certificates in the following store and ensure that Trusted Root Certification Authorities appears in the Certificate store box, and then click <b>Next</b>.</p>
</li>
<li>
<p>On the Completing the Certificate Import Wizard page, click <b>Finish</b>.<br /><br /></p>
</li>
</ol>
<p><b><span style="text-decoration:underline;">Note:</span></b> Perform for each computer that needs a certificate</p>
<p>&nbsp;</p>
<p><span style="color:#2e74b5;font-family:Calibri Light;font-size:large;">Request OpsMgr Certificate</span></p>
<p><br /><span style="font-family:Calibri;"><span style="font-size:medium;"> <span style="text-decoration:underline;">To create a setup information (.inf) file</span></span></span></p>
<ol>
<li>
<p>Click <b>Start</b>, and then click <b>Run</b>.</p>
</li>
<li>
<p>In the Run dialog box, type <b>Notepad</b>, and then click <b>OK</b>.</p>
</li>
<li>
<p>Create a text file containing the following content: (Modify bold text)</p>
</li>
</ol>
<p style="margin-left:60px;"><span style="font-size:small;">[NewRequest] <br /></span><span style="font-size:small;">Subject=<b><i>&quot;</i></b>CN=<span style="background-color:#ffff00;"><b><i>&lt;FQDN of computer you are creating the certificate, for example, the gateway server or management server.&gt;</i></b></span>&quot; <br /></span><span style="font-size:small;">Exportable=TRUE <br /></span><span style="font-size:small;">KeyLength=2048 <br /></span><span style="font-size:small;">KeySpec=1 <br /></span><span style="font-size:small;">KeyUsage=0xf0 <br /></span><span style="font-size:small;">MachineKeySet=TRUE <br /></span><span style="font-size:small;">[EnhancedKeyUsageExtension] <br /></span><span style="font-size:small;">OID=1.3.6.1.5.5.7.3.1 <br /></span><span style="font-size:small;">OID=1.3.6.1.5.5.7.3.2 </span></p>
<p></p>
<ol>
<li>
<p>Save the file with an .inf file name extension.&nbsp; Ex.: <em><strong>OpsMgrTemplate.inf</strong></em></p>
</li>
<li>
<p>Close <b>Notepad</b>.</p>
</li>
</ol>
<p></p>
<p><span style="text-decoration:underline;"><span style="font-family:Calibri;font-size:medium;">To create a request file to use with an enterprise CA</span></span></p>
<p><span style="font-family:Calibri;"><span style="font-size:medium;"><b><span style="text-decoration:underline;">Note:</span></b> &nbsp; The <span style="background-color:#ffff00;">CertReq command</span><span><span style="background-color:#ffff00;"> <b><span style="text-decoration:underline;">MUST BE PERFORMED</span></b> on the computer the certificate needs to be installed</span>.</span> (Each computer must have its own certificate (MS, GTW, Agent)<br /></span></span><span style="font-family:Calibri;font-size:medium;">&nbsp;</span></p>
<ol>
<li>
<p>On the host you need a certificate for, copy the .inf file created in the previous section and update the subject.</p>
</li>
<li>
<p>In a <span style="font-size:small;"><b>command window</b>, type:</span></p>
<p><span style="font-size:small;">CertReq &ndash;New &ndash;f OpsMgrTemplate.inf Server1.req</span></p>
<p>&nbsp;</p>
</li>
</ol>
<p><span style="text-decoration:underline;"><span style="font-family:Calibri;font-size:medium;">To submit a request to an enterprise CA</span></span></p>
<p><span style="font-family:Calibri;"><span style="font-size:medium;"><b><span style="text-decoration:underline;"><br />Note:</span></b> Request can be submitted <em><span style="text-decoration:underline;">manually <strong>or</strong> using the Web Interface</span></em>, choose the one you prefer from any host in the domain.<br /></span></span><span style="text-decoration:underline;"><span style="font-family:Calibri;font-size:medium;"><br />Manually submitting a request:</span></span></p>
<p style="margin-left:30px;"><span style="font-size:small;"><span style="font-family:Calibri;">C</span>ertReq -submit -attrib certificatetemplate:OpsMgrCert Server1.req</span><span style="font-family:Calibri;font-size:medium;">&nbsp;</span></p>
<p><span style="text-decoration:underline;"><span style="font-family:Calibri;font-size:medium;"><br />Submitting a request using the Web interface:</span></span></p>
<ol>
<li>
<p>Log on to a host in the domain. (Any)</p>
</li>
<li>
<p>Start Internet Explorer, and connect to the computer hosting Certificate Services.</p>
<p>Ex.: <b><i>https://&lt;PKI&gt;/CertSrv</i></b></p>
</li>
<li>
<p>On the Microsoft Active Directory Certificate Services Welcome screen, click <b>Request a certificate</b>.</p>
</li>
<li>
<p>On the Request a Certificate page, click <b>advanced certificate request</b>.</p>
</li>
<li>
<p>On the Advanced Certificate Request page, <b>click Submit a certificate request by using a base-64-encoded CMC or PKCS #10 file, or submit a renewal request by using a base-64-encoded PKCS #7 file</b>.</p>
</li>
<li>
<p>On the Submit a Certificate Request or Renewal Request page, in the Saved Request text box, paste the contents of the request file from the previous procedure. Ex.: Server1.req</p>
</li>
<li>
<p>In the Certificate Template select the certificate template that you created</p>
<p>Ex.: <em><b>OpsMgrCert</b></em></p>
</li>
<li>
<p>Then click <b>Submit</b>.</p>
</li>
<li>
<p>On the Certificate Issued page, select <b>Base 64 encoded</b>, and then click <b>Download certificate</b>.</p>
</li>
<li>
<p>In the File Download &ndash; Security Warning dialog box, click <b>Save</b>, and save the certificate</p>
<p>Ex.: <em><strong>Server1.cer</strong></em></p>
</li>
<li>
<p>Close Internet Explorer.<br /><br /></p>
</li>
</ol>
<p><b><span style="text-decoration:underline;">Note:</span></b> Request a certificate for each MS, GTW &nbsp;and Agents(Untrusted) servers</p>
<p>&nbsp;</p>
<p><span style="color:#2e74b5;font-family:Calibri Light;font-size:large;">Import OpsMgr Certificate </span></p>
<p><br /><span style="font-family:Calibri;"><span style="font-size:medium;"> <span style="text-decoration:underline;">To import the certificate into the certificate store</span></span></span></p>
<ol>
<li>
<p>On the computer hosting the Operations Manager role for which you are configuring the certificate, click <b>Start</b>, and then click <b>Run</b>.</p>
</li>
<li>
<p>In the Run dialog box, type <b>mmc</b>, and then click <b>OK</b>.</p>
</li>
<li>
<p>In the Console1 window, click <b>File</b>, and then click <b>Add/Remove Snap-in </b>.In the Add/Remove Snap-in dialog box, click <b>Add</b>.</p>
</li>
<li>
<p>In the Add Standalone Snap-in dialog box, click <b>Certificates</b>, and then click <b>Add</b>.</p>
</li>
<li>
<p>In the Certificates snap-in dialog box, select <b>Computer account</b>, and then click <b>Next</b>.</p>
</li>
<li>
<p>In the Select Computer dialog box, ensure that <b>Local computer</b>: (the computer this console is running on) is selected, and then click <b>Finish</b>.</p>
</li>
<li>
<p>In the Add Standalone Snap-in dialog box, click <b>Close</b>.</p>
</li>
<li>
<p>In the Add/Remove Snap-in dialog box, click <b>OK</b>.</p>
</li>
<li>
<p>In the Console1 window, expand <b>Certificates (Local Computer)</b>, expand <b>Personal</b>, and then click <b>Certificates</b>.</p>
</li>
<li>
<p>Right-click <b>Certificates</b>, select <b>All Tasks</b>, and then click <b>Import</b>.</p>
</li>
<li>
<p>In the Certificate Import Wizard, click <b>Next</b>.</p>
</li>
<li>
<p>On the File to Import page, click Browse and select the location where you downloaded the CA certificate file, for example: <b><i>Server1.cer</i></b>, select the file, and then click <b>Open</b>.</p>
</li>
<li>
<p>On the File to Import page, select Place all certificates in the following store and ensure that Personal appears in the Certificate store box, and then click <b>Next</b>.</p>
</li>
<li>
<p>On the Completing the Certificate Import Wizard page, click <b>Finish</b>.</p>
</li>
</ol>
<p><span style="text-decoration:underline;"><span style="font-family:Calibri;"><span style="font-size:medium;">Create the self-signed certificate into Operations Managers container using <b>MOMCertImport</b></span></span></span></p>
<ol>
<li>
<p>Log on to the computer where you installed the certificate with an account that is a member of the Administrators group.</p>
</li>
<li>
<p>Double-click on the <b><i>MOMCertImport.exe</i></b> tool</p>
</li>
<li>
<p>Select the Certificate imported earlier</p>
</li>
<li>
<p>Click <b>OK</b>.</p>
</li>
<li>
<p>Restart System Center Management Service.</p>
</li>
</ol>
<p><span style="font-family:Calibri;font-size:medium;">&nbsp;</span></p>
<p><span style="color:#2e74b5;font-family:Calibri Light;font-size:large;">Sample Validation of a Certificate on a Gateway server</span></p>
<ol>
<li>
<p>Confirm an event 20053 in Operations Manager event log exist which says the certificate is loaded successfully.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/63/5518.OpsMgr-Certificates-Event20053.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-63/5518.OpsMgr_2D00_Certificates_2D00_Event20053.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/63/5518.OpsMgr-Certificates-Event20053.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-63/5518.OpsMgr_2D00_Certificates_2D00_Event20053.jpg" border="0" /></a></p>
</li>
</ol>
<p><span style="font-family:Calibri;font-size:medium;">&nbsp;</span></p>
<p><span style="font-family:Calibri;font-size:medium;">&nbsp;</span></p>
<p><span style="font-family:Calibri;font-size:medium;"><span style="color:#2e74b5;font-family:Calibri Light;"><span style="color:#1f4e79;font-family:Calibri;font-size:x-large;"><strong>Gateway Approval process to initiate communication from MS to Gateway Server</strong></span></span></span></p>
<p><span style="color:#ff0000;font-family:Calibri;font-size:medium;">IMPORTANT:&nbsp;&nbsp; New in Operations Manager 2012, Management Server can initiate communication to the Gateway server, so no need to open port TCP 5723 in the Firewall from GTW to MS.</span></p>
<p><span style="font-family:Calibri;"><span style="font-size:medium;">Follow the steps outline in the section <a href="https://microsoft.sharepoint.com/teams/EYCyberTeam/SitePages/Home.aspx?RootFolder=%2Fteams%2FEYCyberTeam%2FShared%20Documents%2FEY%20SCOM&amp;FolderCTID=0x012000B1CD9568C868E84287DDED21E0B17CE0&amp;View=%7B8E830F5C%2D4934%2D4E59%2DBE7E%2D10FD4CE0BDBA%7D"><span style="color:#0563c1;">How to Deploy a Gateway Server</span></a> on TechNet,&nbsp;except during the gateway approval process, follow the step below.</span></span></p>
<p><span style="text-decoration:underline;"><span style="font-family:Calibri;font-size:medium;">To run the gateway approval tool</span></span></p>
<ol>
<li>
<p>On the management server that was targeted during the gateway server installation, log on with the Operations Manager Administrator account.</p>
</li>
<li>
<p>Open a command prompt, and navigate to the Operations Manager installation directory or to the directory that you copied the Microsoft.EnterpriseManagement.gatewayApprovalTool.exe to.</p>
</li>
<li>
<p>At the command prompt, run:&nbsp;</p>
<p><em><strong><span style="font-size:small;">Microsoft.EnterpriseManagement.gatewayApprovalTool.exe <br />&nbsp;&nbsp;&nbsp; /ManagementServerName=&lt;managementserverFQDN&gt; <br /></span><span style="font-size:small;">&nbsp;&nbsp;&nbsp; /GatewayName=&lt;GatewayFQDN&gt; <br />&nbsp;&nbsp;&nbsp; /Action=Create&nbsp;<br />&nbsp;&nbsp;&nbsp; <span style="background-color:#ffff00;">/ManagementServerInitiatesConnection=True</span></span></strong></em></p>
</li>
<li>
<p>If the approval is successful, you will see the approval of server &lt;GatewayFQDN&gt; completed successfully.</p>
</li>
<li>
<p>If you need to remove the gateway server from the management group, run the same command, but substitute the /Action=Delete flag for the /Action=Create flag.</p>
</li>
<li>
<p>Open the Operations console to the Monitoring view. Select the Discovered Inventory view to see that the gateway server is present.</p>
</li>
</ol>
<p><span style="font-family:Calibri;"><span style="font-size:medium;">&nbsp;<br clear="all" /> </span></span></p>
<h1><span style="font-family:Calibri;font-size:medium;"><span style="font-family:Calibri;font-size:medium;"><span style="color:#2e74b5;font-family:Calibri Light;"><span style="color:#1f4e79;font-family:Calibri;font-size:x-large;"><strong>Sample Screenshot of a valid Operations Manager Certificate </strong></span></span></span></span></h1>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/63/7802.OpsMgr-Certificates-PersonalContainer.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-63/7802.OpsMgr_2D00_Certificates_2D00_PersonalContainer.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/63/7802.OpsMgr-Certificates-PersonalContainer.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-63/7802.OpsMgr_2D00_Certificates_2D00_PersonalContainer.jpg" border="0" /></a></p>
<p><span style="font-family:Calibri;font-size:medium;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/63/8802.OpsMgr-Certificates-Sample-General-Tab.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-63/8802.OpsMgr_2D00_Certificates_2D00_Sample_2D00_General_2D00_Tab.jpg"><img width="327" height="408" style="width:275px;height:415px;" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/63/8802.OpsMgr-Certificates-Sample-General-Tab.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-63/8802.OpsMgr_2D00_Certificates_2D00_Sample_2D00_General_2D00_Tab.jpg" 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/01/01/63/3107.OpsMgr-Certificates-Sample-Details-Tab.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-63/3107.OpsMgr_2D00_Certificates_2D00_Sample_2D00_Details_2D00_Tab.jpg"><img width="323" height="408" style="width:309px;height:415px;" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/63/3107.OpsMgr-Certificates-Sample-Details-Tab.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-63/3107.OpsMgr_2D00_Certificates_2D00_Sample_2D00_Details_2D00_Tab.jpg" 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/01/01/63/7610.OpsMgr-Certificates-Sample-CertPath-Tab.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-63/7610.OpsMgr_2D00_Certificates_2D00_Sample_2D00_CertPath_2D00_Tab.jpg"><img width="326" height="408" style="width:286px;height:412px;" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/63/7610.OpsMgr-Certificates-Sample-CertPath-Tab.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-63/7610.OpsMgr_2D00_Certificates_2D00_Sample_2D00_CertPath_2D00_Tab.jpg" border="0" /></a></span></p>
<p><span style="font-family:Calibri;font-size:medium;">&nbsp;</span><span style="font-family:Calibri;font-size:medium;"><br /></span></p>
<p><span style="font-family:Calibri;font-size:medium;"><em>This posting is provided &quot;AS IS&quot; with no warranties and confers no rights.</em></span></p>
<p></p>]]></content:encoded>
    </item>
    <item>
      <title>Operations Manager - Get Company Knowledge using PowerShell and Operations Manager SDK</title>
      <link>https://docs.microsoft.com/archive/blogs/denisrougeau/operations-manager-get-company-knowledge-using-powershell-and-operations-manager-sdk</link>
      <pubDate>Fri, 01 Aug 2014 18:09:52 GMT</pubDate>
      <dc:creator><![CDATA[DRougeau]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/denisrougeau/2014/08/01/operations-manager-get-company-knowledge-using-powershell-and-operations-manager-sdk/</guid>
      <description><![CDATA[When I was asked by a customer to provide the Company Knowledge associated to an alert, as part...]]></description>
      <content:encoded><![CDATA[When I was asked by a customer to provide the Company Knowledge associated to an alert, as part of an alert forwarding process, I was a little surprise that it wasn't as obvious as I thought it would be using the Operations Manager PowerShell cmdlets.  So, I started to search for a solution.  I've seen some blog post out there which export the MPs or do some other tricks that requires external dependencies, but couldn't find a way to retrieve the Company Knowledge associated to an alert from Operations Manager using a simple PowerShell script, so here what I came up with using the SDK.

The sample below is interesting and quite useful as it uses PowerShell and the Operations Manager SDK assemblies.  It provides an easy way to gather info that are not available using the Operations Manager cmdlets (as far as I know!) without querying the DB directly.

One thing to know id Product and Company knowledge are both defined as KnowledgeArticle in a Management Pack and they both reference the same Rule or monitor ID.  So the XML definition is exactly the same.  So how do you determine which one is which?
<ol>
	<li>Product knowledge must be in the same MP as the Rule/Monitor</li>
	<li>Company knowledge only applies to Rule/Monitor that are in a selead MP.  Therefore have to be saved in a different MP.</li>
</ol>
Here a snippet of the code that gathers Knowledge Articles for all New Alerts.
<p style="margin-left: 30px"><span style="color: #008000"><em># Load Operations Manager SDK assemblies (Installed with the Operations Manager console)
</em></span><span style="color: #0000ff"><em>$assembly1 = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.EnterpriseManagement.Core")
</em><em>$assembly2 = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.EnterpriseManagement.OperationsManager")</em></span></p>
<p style="margin-left: 30px"><em><span style="color: #008000"># Connect to Management Server (Use Credentials from user calling the script) </span>
</em><span style="color: #0000ff"><em>$mg = New-Object Microsoft.EnterpriseManagement.ManagementGroup("MyServer")</em></span></p>
<p style="margin-left: 30px"><em># Define Criteria for All New Alerts  (Should provide the alert ID instead, but just to demo, all active alerts...)
</em><span style="color: #0000ff"><em>$Criteria = New-Object Microsoft.EnterpriseManagement.Monitoring.MonitoringAlertCriteria("ResolutionState = 0")</em></span></p>
<p style="margin-left: 30px"><em><span style="color: #008000"># Return all Alerts matching the criteria</span>
</em><span style="color: #0000ff"><em><span style="color: #0000ff">$AllNewAlerts</span> = $mg.GetMonitoringAlerts($Criteria)</em></span></p>
<p style="margin-left: 30px"><span style="color: #0000ff"><em>foreach($NewAlert in $AllNewAlerts)
</em><em>{
</em></span><span style="color: #0000ff"><em><span style="color: #339966">  # For a Rule</span>
</em></span><span style="color: #0000ff"><em>$AlertRule = $mg.GetMonitoringRule((<span style="color: #0000ff">$NewAlert.MonitoringRuleId)</span>)
</em></span><span style="color: #0000ff">  <span style="color: #0000ff"><em><span style="color: #339966"># For a Monitor
<span style="color: #0000ff">  $AlertRule = $mg.GetMonitor(<em>($NewAlert.MonitoringRuleId)</em>)</span>
</span>
</em></span><span style="color: #0000ff">  <span style="color: #0000ff"><em><span style="color: #339966"># Retrieve all knowledge Articles associated to the rule/monitor (Product and Company)
</span></em></span></span>  $KnowledgeArticles = $mg.GetMonitoringKnowledgeArticles(($AlertRule.Id))
</span><span style="color: #0000ff">
<span style="color: #0000ff">  <span style="color: #0000ff"><em><span style="color: #339966"># Determine if Product or Company Knowledge.  The basic idea is if it is in the same MP, it is Product, if not it's Company (Company knowledge can only be in a separate MP, therefore can only apply to rule/monitor from a sealed MP
</span></em></span></span>   …</span>
<span style="color: #0000ff">}</span></p>
<em>
I included a sample code that includes check and validation, also transform the MAML format of the knowledgeArticles content to text (removing all tags). </em>Download sample source code <a title="here" href="https://msdnshared.blob.core.windows.net/media/2016/06/GetSCOMKnowledgeArticles.zip">here</a>.

<em>This posting is provided "AS IS" with no warranties and confers no rights.</em>

&nbsp;

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Operations Manager - How to create a Dynamic Distributed Application using Seed Discovery and PowerShell</title>
      <link>https://docs.microsoft.com/archive/blogs/denisrougeau/operations-manager-how-to-create-a-dynamic-distributed-application-using-seed-discovery-and-powershell</link>
      <pubDate>Sat, 19 Jul 2014 11:16:00 GMT</pubDate>
      <dc:creator><![CDATA[DRougeau]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/denisrougeau/2014/07/19/operations-manager-how-to-create-a-dynamic-distributed-application-using-seed-discovery-and-powershell/</guid>
      <description><![CDATA[This is a sample SC Operations Manager Management Pack (MP) that builds a Distributed Application...]]></description>
      <content:encoded><![CDATA[<p>This is a sample SC Operations Manager Management Pack (MP) that builds a Distributed Application (DA) dynamically based on a seed (registry key) discovery.&nbsp; This sample builds a DA based on SC Orchestrator.&nbsp; In this blog, I&nbsp;will detailed the discovery process on how&nbsp;to dynamically populate&nbsp;the DA Components group&nbsp;&quot;All Web Sites&quot; using a PowerShell script.</p>
<p>Overview of the components of my 3-tier LOB distributed application:</p>
<ul>
<li>Database(s)</li>
<li>Website(s)</li>
<li>Windows Service(s)</li>
</ul>
<p>&nbsp;&nbsp;<img width="570" height="338" style="width:470px;height:318px;" alt=" MyDynamicDA-Orchestrator" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/63/MyDynamicDA-Orchestrator.JPG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-63/MyDynamicDA_2D00_Orchestrator.JPG" /></p>
<p></p>
<p>So, how do I populate a DA Component group for the All Web Sites DA using PowerShell?&nbsp;</p>
<p><span style="text-decoration:underline;"><span style="font-size:small;"><strong><em>Type Definitions required</em></strong></span></span></p>
<p>1- Class definition needed.&nbsp;</p>
<p><em>&nbsp;&nbsp; &nbsp;<span style="color:#339966;">&lt;!-- Seed class --&gt;</span></em><br /><span style="color:#0000ff;"><em>&nbsp;&nbsp;&nbsp; &lt;ClassType ID=&quot;MyDynamicAppDA.Computers.Seed.Class&quot; Accessibility=&quot;Internal&quot; Abstract=&quot;false&quot; Base=&quot;Windows!Microsoft.Windows.LocalApplication&quot; Hosted=&quot;true&quot; Singleton=&quot;false&quot; /&gt;</em></span></p>
<p>&nbsp;&nbsp;&nbsp; <span style="color:#339966;font-style:italic;">&lt;!-- All Web Sites DA component group class --&gt;</span><br /><span style="color:#0000ff;">&nbsp;&nbsp;&nbsp;&nbsp;<em>&lt;ClassType ID=&quot;MyDynamicAppDA.AllWebSites.DA&quot; Accessibility=&quot;Public&quot; Abstract=&quot;false&quot; Base=&quot;MicrosoftSystemCenterServiceDesignerLibrary7084320!Microsoft.SystemCenter.ServiceDesigner.ServiceComponentGroup&quot; Hosted=&quot;false&quot; Singleton=&quot;true&quot; /&gt;</em></span></p>
<p style="margin-left:30px;"><span style="text-decoration:underline;"><strong>Note:</strong></span>&nbsp; I don&#39;t need a class for my Web Sites as I want to re-use the IIS web site class (see below)</p>
<p>2- Relationship definition needed.&nbsp; In here, I specify the class that can be member of my DA component group</p>
<p><span style="color:#0000ff;">&nbsp;<em>&nbsp;&nbsp;&nbsp;&nbsp;&lt;RelationshipType ID=&quot;MyDynamicAppDA.AllWebSitesDAContainsWebSite2008&quot; Accessibility=&quot;Public&quot; Abstract=&quot;false&quot; Base=&quot;System!System.Containment&quot;&gt;</em></span><br /><span style="color:#0000ff;"><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Source&gt;MyDynamicAppDA.AllWebSites.DA&lt;/Source&gt;</em></span><br /><span style="color:#0000ff;"><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Target&gt;IIS2008!Microsoft.Windows.InternetInformationServices.2008.WebSite&lt;/Target&gt;</em></span><br /><span style="color:#0000ff;"><em>&nbsp;&nbsp;&nbsp;&nbsp; &lt;/RelationshipType&gt;</em></span></p>
<p><em><strong><span style="text-decoration:underline;"><span style="font-size:small;">PowerShell Script for Web Site discovery</span></span></strong><br /></em></p>
<p>1- My discovery must target my seed class&nbsp;</p>
<p><span style="color:#339966;"><em>&nbsp;&nbsp;&nbsp; &lt;!-- Sample discovery script for specific Web Sites targeted at instances of myDynamicAppDa Seed Servers&nbsp; --&gt;</em></span><br /><span style="color:#339966;"><em>&nbsp;&nbsp;&nbsp; &lt;!-- This script populate the DA component and build the relationship --&gt;</em></span><br /><span style="color:#0000ff;"><em>&nbsp;&nbsp;&nbsp; &lt;Discovery ID=&quot;MyDynamicAppDA.AllWebSites.DA.Discovery&quot; Enabled=&quot;true&quot; <strong>Target=&quot;MyDynamicAppDA.Computers.Seed.Class&quot;</strong> ConfirmDelivery=&quot;false&quot; Remotable=&quot;true&quot; Priority=&quot;Normal&quot;&gt;</em></span><br /><span style="color:#0000ff;"><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Category&gt;Discovery&lt;/Category&gt;</em></span><br /><span style="color:#0000ff;"><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;DiscoveryTypes&gt;</em></span><br /><span style="color:#0000ff;"><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;DiscoveryClass TypeID=&quot;MyDynamicAppDA.DA&quot; /&gt;</em></span><br /><span style="color:#0000ff;"><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;DiscoveryClass TypeID=&quot;MyDynamicAppDA.AllWebSites.DA&quot; /&gt;</em></span><br /><span style="color:#0000ff;"><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;DiscoveryRelationship TypeID=&quot;MyDynamicAppDA.DAContainsAllWebSitesDA&quot; /&gt;</em></span><br /><span style="color:#0000ff;"><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;DiscoveryRelationship TypeID=&quot;MyDynamicAppDA.AllWebSitesDAContainsWebSite2008&quot; /&gt;</em></span><br /><span style="color:#0000ff;"><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;DiscoveryRelationship TypeID=&quot;MyDynamicAppDA.AllWebSitesDAContainsWebSite2012&quot; /&gt;</em></span><br /><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &hellip;</em></p>
<p><em>2- </em>I use WMI to query local Websites for a specific name and return the Name and SiteID</p>
<p><strong>&nbsp;&nbsp;&nbsp;</strong><strong> </strong><span style="text-decoration:underline;"><strong>IMPORTANT</strong></span>: You must have installed the &#39;IIS Management Scripts and Tools&#39; for the &#39;IIS Role&#39; for populating the All WebSites DA on the Server where the discovery will be executed.</p>
<p><span style="color:#339966;"><em>&nbsp;&nbsp;&nbsp; #&nbsp; Using IIS7 Management Scripts and Tools.<br /></em></span><span style="color:#ff6600;"><em>&nbsp; &nbsp; $sites = Get-WmiObject -Namespace &quot;root/webadministration&quot; -Class Site | ? {$_.Name -match &#39;Microsoft System Center 2012 Orchestrator&#39;} | Select Name, ID</em></span></p>
<p>3-&nbsp;When a web site that should be part of my DA component group is found, then I create an instance of each class for my DA Component Group</p>
<p><span style="color:#339966;"><em>&nbsp;&nbsp;&nbsp; # Add Instance for the WebSites DA class&nbsp;</em></span><br /><span style="color:#ff6600;"><em>&nbsp;&nbsp;&nbsp; $Instance1 = $DiscoveryData.CreateClassInstance(&quot;$MPElement[Name=&#39;MyDynamicAppDA.AllWebSites.DA&#39;]$&quot;)</em></span><br /><span style="color:#ff6600;"><em>&nbsp;&nbsp;&nbsp; $Instance1.AddProperty(&quot;$MPElement[Name=&#39;System!System.Entity&#39;]/DisplayName$&quot;, &quot;All Web Sites&quot;)</em></span><br /><span style="color:#ff6600;"><em>&nbsp;&nbsp;&nbsp; $DiscoveryData.AddInstance($Instance1)&nbsp;</em></span></p>
<p><em>&nbsp;<span style="color:#339966;">&nbsp;&nbsp; # Add Instance for the WebSites class</span></em><br /><span style="color:#ff6600;"><em>&nbsp;&nbsp;&nbsp; $Instance2 = $DiscoveryData.CreateClassInstance(&quot;$MPElement[Name=&#39;IIS2008!Microsoft.Windows.InternetInformationServices.2008.WebSite&#39;]$&quot;)</em></span><br /><span style="color:#ff6600;"><em>&nbsp;&nbsp;&nbsp; $Instance2.AddProperty(&quot;$MPElement[Name=&#39;Windows!Microsoft.Windows.Computer&#39;]/PrincipalName$&quot;, $oTarget)</em></span><br /><span style="color:#ff6600;"><em>&nbsp;&nbsp;&nbsp; $Instance2.AddProperty(&quot;$MPElement[Name=&#39;IISCommonLibrary!Microsoft.Windows.InternetInformationServices.WebSite&#39;]/SiteID$&quot;, &quot;W3SVC/$($Site.ID)&quot;)</em></span><br /><span style="color:#ff6600;"><em>&nbsp;&nbsp;&nbsp; $DiscoveryData.AddInstance($Instance2)</em></span></p>
<p style="margin-left:30px;"><span style="text-decoration:underline;"><strong>Note:</strong></span>&nbsp; <br />The WebSite Instance should have already been discovered by the IIS MP, so to insure&nbsp;OpsMgr will&nbsp;not create a new web site instance for this discovery, we have to match the index of the web site class.&nbsp; In this case, the index of the IIS Web Site class&nbsp;is the Site ID as follow: <em>&quot;W3SVC/$($Site.ID)&quot;</em></p>
<p>4-&nbsp;Once I have the instance of each class, then I create an instance for the relationship:</p>
<p><em>&nbsp;&nbsp;<span style="color:#339966;">&nbsp; # Add Relationship class WebSites contains WebSite</span></em><br /><span style="color:#ff6600;"><em>&nbsp;&nbsp;&nbsp; $Relation1 = $DiscoveryData.CreateRelationshipInstance(&quot;$MPElement[Name=&#39;MyDynamicAppDA.AllWebSitesDAContainsWebSite2008&#39;]$&quot;)</em></span><br /><span style="color:#ff6600;"><em>&nbsp;&nbsp;&nbsp; $Relation1.Source = $Instance1</em></span><br /><span style="color:#ff6600;"><em>&nbsp;&nbsp;&nbsp; $Relation1.Target = $Instance2</em></span><br /><span style="color:#ff9900;"><em><span style="color:#ff6600;">&nbsp;&nbsp;&nbsp; $DiscoveryData.AddInstance($Relation1)&nbsp;</span><br /></em><em><br /></em></span></p>
<p><em><br /></em><em>The above detailed is a quick overview for advanced MP authors and there is definitely more to it.&nbsp; Included in this blog post, is a fully functional&nbsp;sample MP with detailed comments in it.&nbsp; I would highly recommend anyone interested to open the MP using a text editor to review all the comments.<br /></em><br /><a title="MyDynamicApp Sample MP" href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/63/MyDynamicAppDA.zip" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-63/MyDynamicAppDA.zip">MyDynamicApp Sample MP</a></p>
<p><span style="text-decoration:underline;"><strong><br /></strong></span><span style="text-decoration:underline;"><strong><br />Notes:</strong></span>&nbsp;</p>
<ol>
<li>You <span style="text-decoration:underline;"><em>cannot</em></span>&nbsp;edit this DA using the DA User Interface from the Authoring tab of the OpsMgr console.&nbsp; It is suggested to seal the MP to avoid making any unwanted modifications</li>
<li>It may take some time for the distributed application to roll up health.</li>
</ol>
<p><em>This posting is provided &quot;AS IS&quot; with no warranties and confers no rights.</em></p>]]></content:encoded>
    </item>
    <item>
      <title>Orchestrator - Get Runbook GUIDs using PowerShell</title>
      <link>https://docs.microsoft.com/archive/blogs/denisrougeau/orchestrator-get-runbook-guids-using-powershell</link>
      <pubDate>Tue, 21 Jan 2014 09:08:47 GMT</pubDate>
      <dc:creator><![CDATA[DRougeau]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/denisrougeau/2014/01/21/orchestrator-get-runbook-guids-using-powershell/</guid>
      <description><![CDATA[So how do you start a Runbook using PowerShell?&nbsp; This seems easy as Microsoft already provide...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family:Calibri;font-size:medium;">So how do you start a Runbook using PowerShell?&nbsp; This seems easy as Microsoft already provide some code </span><a href="https://msdn.microsoft.com/en-us/library/hh921685.aspx"><span style="color:#0563c1;font-family:Calibri;font-size:medium;">Start a Runbook using PowerShell</span></a><span style="font-family:Calibri;font-size:medium;">, but there is a catch.&nbsp; To use the code, you must know the GUID of the Runbook and the parameters (if any).&nbsp; So how do you get the <span style="text-decoration:underline;">MUST HAVE</span> GUIDs?&nbsp; I found multiple blogs that shows SQL query, Excel PowerPivot or else, but how to do it using PowerShell?&nbsp;</span></p>
<p><span style="font-family:Calibri;font-size:medium;">I have created&nbsp; 2 simple PowerShell scripts:&nbsp;<br />&nbsp; - GetRunbookGUIDs.ps1<br />&nbsp; - ListAllRunbookGUIDs.ps1</span><span style="font-family:Calibri;font-size:medium;"><br /></span></p>
<p><span style="font-size:medium;"><span style="font-family:Calibri;">Download the script from the Script Center Repository </span><a href="https://gallery.technet.microsoft.com/Orchestrator-Get-Runbook-824c9e3e"><span style="color:#0563c1;font-family:Calibri;">here</span></a><span style="font-family:Calibri;"> </span></span></p>
<p><span style="font-size:medium;"><i><span style="font-family:Calibri;">This posting is provided &quot;AS IS&quot; with no warranties and confers no rights.</span></i><span class="TextRun SCX6064741" lang="EN-US" style="color:windowtext;line-height:18px;font-family:Calibri,Sans-Serif;font-style:normal;font-weight:normal;text-decoration:none;background-color:transparent;"><span class="NormalTextRun SCX6064741" style="background-color:inherit;"><br /></span></span></span></p>
<p><span class="TextRun SCX6064741" lang="EN-US" style="color:windowtext;line-height:18px;font-family:Calibri,Sans-Serif;font-size:11pt;font-style:normal;font-weight:normal;text-decoration:none;background-color:transparent;"><span class="NormalTextRun SCX6064741" style="background-color:inherit;">&nbsp;</span></span></p>
<p><span class="TextRun SCX6064741" lang="EN-US" style="color:windowtext;line-height:18px;font-family:Calibri,Sans-Serif;font-size:11pt;font-style:normal;font-weight:normal;text-decoration:none;background-color:transparent;"><span class="NormalTextRun SCX6064741" style="background-color:inherit;">&nbsp;</span></span></p>]]></content:encoded>
    </item>
  </channel>
</rss>