<?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>@nepeters</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/neilp/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/neilp/feed.xml</link>
    <description>Azure, Containers, Automation</description>
    <lastBuildDate>Thu, 28 Apr 2016 05:25:01 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Windows Azure Pack: Renaming VM Computer Names with a Service Management Automation Runbook</title>
      <link>https://docs.microsoft.com/archive/blogs/neilp/windows-azure-pack-renaming-vm-computer-names-with-a-service-management-automation-runbook</link>
      <pubDate>Sun, 16 Aug 2015 20:42:00 GMT</pubDate>
      <dc:creator><![CDATA[Neil Peterson]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/neilp/2013/12/19/windows-azure-pack-renaming-vm-computer-names-with-a-service-management-automation-runbook/</guid>
      <description><![CDATA[&nbsp;Update Sunday August 16th 2015 - URL in script has changed. I have updated the script here...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size:small;"><span style="font-family:Calibri;"><span style="font-family:Times New Roman;font-size:medium;"> </span></span></span></p>
<p style="margin:0in 0in 8pt;"><span style="font-family:arial,helvetica,sans-serif;font-size:small;"><span><span style="font-family:Calibri;font-size:small;">&nbsp;Update Sunday August 16th 2015 - URL in script has changed. I have updated the script here leaving the legacy URL in place but commented out.</span></span></span></p>
<p style="margin:0in 0in 8pt;"><span style="font-family:arial,helvetica,sans-serif;font-size:small;"><span><span style="font-family:Calibri;font-size:small;"></span></span></span></p>
<hr style="height:1px;width:100%;" />
<p style="margin:0in 0in 8pt;"><span style="font-size:small;"><span style="font-family:Calibri;">Windows Azure Pack and Service Management Automation are on fire. Having spent a little bit of time working with WAP, one of the first items that I found needing my own personal adjustment was to&nbsp;the Computer Names given to my VM&rsquo;s after a Stand Alone Virtual Machine deployment. More to the point, if you deploy a Standalone VM, giving it a VM Name of <strong>VM001</strong>, you will end up with a Computer Name more like <b>ZB0NLHY74MPYW0</b>. However, I want my VM&rsquo;s to have a common VM Name and Computer Name. That is if I name my VM <strong>VM001</strong>, I want my computer name to also be <strong>VM001</strong>. </span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">Fortunately with the tight integration between Service Management Automation and Windows Azure Pack we are provided with a platform on which to automate post VM deployment tasks such as renaming a computer. In this blog I will be sharing a sample solution that demonstrates how to use an SMA Runbook to dynamically rename the computer to match the name chosen for the VM.</span></span></p>
<p><span style="font-size:small;"><b><span style="font-family:Calibri;">So to recap my intent here:</span></b></span></p>
<p style="margin-left:30px;"><span style="font-size:small;"><span style="font-family:Calibri;"><b>Issue:</b> When deploying a standalone VM using the Windows Azure Pack a random computer name is given to the VM regardless of the VM name. </span></span></p>
<p style="margin-left:30px;"><span style="font-size:small;"><span style="font-family:Calibri;"><b>Desired Outcome:</b> to have the VM Name and the Computer Name of the VM match after deployment with no manual intervention. I also want to ensure that this name is not currently is use, and adjust accordingly if it is.</span></span></p>
<p style="margin-left:30px;"><span style="font-size:small;"><span style="font-family:Calibri;"><b>Solution:</b> Create a SMA Runbook that will consume the given VM Name, and once deployed, rename the VM&rsquo;s Computer Name to match the VM Name.</span></span></p>
<p><span style="font-size:small;"><b><span style="font-family:Calibri;">Before We Get Started:</span></b></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">There are several core items to WAP VM automation that I will not be covering (like how to &lsquo;link&rsquo; the automation to the VM creation process). Below is some content that can be used for ramp up on those core components.</span></span></p>
<p style="margin-left:30px;"><span style="font-size:small;"><span style="font-family:Calibri;"><strong>Blog:</strong> <a href="/b/orchestrator/archive/2013/12/09/sma-capabilities-in-depth-runbook-tasks-library-configuration-starting-scheduling-creation-and-tagging.aspx" target="_blank">SMA Capabilities in Depth</a></span>.</span></p>
<p style="font-family:Calibri;margin-left:30px;"><span style="font-size:small;"><span style="font-family:Calibri;"><strong>Blog:</strong> </span><a href="/b/privatecloud/archive/2013/12/11/calling-an-orchestrator-runbook-from-sma-part-2.aspx" target="_blank">Calling an Orchestrator Runbook using SMA (Good example of using SMA parameter data).</a></span></p>
<p style="font-family:Calibri;margin-left:30px;"><span style="font-size:small;"><span style="font-family:Calibri;"><strong>TechNet:</strong> </span><a href="https://technet.microsoft.com/en-us/library/dn457800.aspx" target="_blank">Using Automation with Virtual Machine Clouds.</a></span></p>
<p style="font-family:Calibri;margin-left:30px;"><span style="font-size:small;"><strong>TechNet</strong>: <a href="https://technet.microsoft.com/en-us/library/dn457809.aspx" target="_blank">Global Resource or Assets.</a></span></p>
<p style="font-family:Calibri;margin-left:30px;"><span style="font-size:small;"><span style="font-family:Calibri;"><strong>Sample Runbook:</strong> I&#39;ve used the </span><strong>Sample-Using-VMCloud-Automation </strong>which is included with SMA as a starting point for this Runbook. Be sure to examine this Runbook as it is very helpful reference for this post VM deployment type activities.</span></p>
<p><span style="font-size:small;"><b><span style="font-family:Calibri;">The Runbook:</span></b></span></p>
<p><span style="font-size:small;font-family:Calibri;">The sample Runbook in this post rely on a few SMA Assets. The following have been created and configured in support of the Runbook.</span></p>
<p style="margin-left:30px;"><span style="font-size:small;font-family:Calibri;"><strong>ADCred:</strong></span> this contains the credentials of an account with access to rename a computer.</p>
<p style="font-size:small;font-family:Calibri;margin-left:30px;"><span style="font-size:small;font-family:Calibri;"><strong>spfUrl</strong></span>: Variable that contains the SPF endpoint URL. This URL should be similar to https://spf_end_point:8090/SC2012R2/VMM/Microsoft.Management.Odata.svc/ .</p>
<p style="font-size:small;font-family:Calibri;margin-left:30px;"><span style="font-size:small;font-family:Calibri;"><strong>spfCredentials</strong>: this contains the credentials of an account with access to the SPF Endpoint.</span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">A copy of this Runbook can be found here - <a href="https://gallery.technet.microsoft.com/SMA-Runbook-for-Renaming-b71715c2" target="_blank">Runbook</a> .</span></span></p>
<div style="overflow:auto;font-size:8pt;font-family:Consolas,Lucida Console;width:600;border:black 1px solid;padding:2px;">
<table border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top">
<div style="font-size:8pt;font-family:Consolas,Lucida Console;background:#cecece;padding:5px;">01<br />002<br />003<br />004<br />005<br />006<br />007<br />008<br />009<br />010<br />011<br />012<br />013<br />014<br />015<br />016<br />017<br />018<br />019<br />020<br />021<br />022<br />023<br />024<br />025<br />026<br />027<br />028<br />029<br />030<br />031<br />032<br />033<br />034<br />035<br />036<br />037<br />038<br />039<br />040<br />041<br />042<br />043<br />044<br />045<br />046<br />047<br />048<br />049<br />050<br />051<br />052<br />053<br />054<br />055<br />056<br />057<br />058<br />059<br />060<br />061<br />062<br />063<br />064<br />065<br />066<br />067<br />068<br />069<br />070<br />071<br />072<br />073<br />074<br />075<br />076<br />077<br />078<br />079<br />080<br />081<br />082<br />083<br />084<br />085<br />086<br />087<br />088<br />089<br />090<br />091<br />092<br />093</div>
</td>
<td nowrap="nowrap" valign="top">
<div style="font-size:8pt;font-family:Consolas,Lucida Console;background:#fcfcfc;padding:5px;"><span style="color:#00008b;">workflow</span><span style="color:#000000;">&nbsp;</span><span style="color:#8a2be2;">RenameVM</span><br /><span style="color:#000000;">{</span><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#00008b;">param</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#000000;">(</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#a9a9a9;">[</span><span style="color:#add8e6;">Parameter</span><span style="color:#000000;">(</span><span style="color:#000000;">Mandatory</span><span style="color:#a9a9a9;">=</span><span style="color:#ff4500;">$true</span><span style="color:#000000;">)</span><span style="color:#a9a9a9;">]</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#008080;">[string]</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$vmmJobId</span><span style="color:#a9a9a9;">,</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#a9a9a9;">[</span><span style="color:#add8e6;">Parameter</span><span style="color:#000000;">(</span><span style="color:#000000;">Mandatory</span><span style="color:#a9a9a9;">=</span><span style="color:#ff4500;">$true</span><span style="color:#000000;">)</span><span style="color:#a9a9a9;">]</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#008080;">&nbsp;&nbsp;&nbsp; [object]</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$params</span><span style="color:#a9a9a9;">,</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#a9a9a9;">[</span><span style="color:#add8e6;">Parameter</span><span style="color:#000000;">(</span><span style="color:#000000;">Mandatory</span><span style="color:#a9a9a9;">=</span><span style="color:#ff4500;">$true</span><span style="color:#000000;">)</span><span style="color:#a9a9a9;">]</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#008080;">[object]</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$resourceObject</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#000000;">)</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#006400;">#Prepare Environment</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#ff4500;">$spfUrl</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#0000ff;">Get-AutomationVariable</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-Name</span><span style="color:#000000;">&nbsp;</span><span style="color:#8b0000;">&quot;spfUrl&quot;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#ff4500;">$spfCredentials</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#0000ff;">Get-AutomationPSCredential</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-Name</span><span style="color:#000000;">&nbsp;</span><span style="color:#8b0000;">&quot;spfCredentials&quot;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#ff4500;">$ADCred</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#0000ff;">Get-AutomationPSCredential</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-Name</span><span style="color:#000000;">&nbsp;</span><span style="color:#8b0000;">&quot;ADCred&quot;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#ff4500;">$stampId</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$params</span><span style="color:#a9a9a9;">.</span><span style="color:#000000;">StampId</span><br /><span style="color:#000000;"><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
<p></p>
<p><span style="color:#006400;font-family:Lucida Console;font-size:xx-small;"><span style="color:#006400;font-family:Lucida Console;font-size:xx-small;"><span style="color:#006400;font-family:Lucida Console;font-size:xx-small;">#Legacy URL</span></span></span></p>
<p><span style="color:#006400;font-family:Lucida Console;font-size:xx-small;"><span style="color:#006400;font-family:Lucida Console;font-size:xx-small;"><span style="color:#006400;font-family:Lucida Console;font-size:xx-small;"><span style="color:#006400;font-family:Lucida Console;font-size:xx-small;"><span style="color:#006400;font-family:Lucida Console;font-size:xx-small;"><span style="color:#006400;font-family:Lucida Console;font-size:xx-small;">#$fullUrl = $spfUrl + &quot;Jobs?`$filter=ID eq guid&#39;&quot; + $vmmJobId + &quot;&#39; and StampId eq guid&#39;&quot; + $stampId + &quot;&#39;&quot; </span></span></span> </span></span></span></p>
<p><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$fullUrl</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">=</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$spfUrl</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">+</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;">&#39;/Jobs(ID=guid&#39;</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">+</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;">&quot;&#39;{&quot;</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">+</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$vmmJobId</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">+</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;">&#39;}&#39;</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">+</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;">&quot;&#39;,StampId=guid&#39;&quot;</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">+</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;">&#39;{&#39;</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">+</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$stampId</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">+</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;">&#39;}&#39;</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">+</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;">&quot;&#39;)&quot; </span></span></span></p>
<span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#006400;">#Gather and Prepare Computer Name Information</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#ff4500;">$VMName</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$resourceObject</span><span style="color:#a9a9a9;">.</span><span style="color:#000000;">Name</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#ff4500;">$initComputerName</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$resourceObject</span><span style="color:#a9a9a9;">.</span><span style="color:#000000;">ComputerName</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#ff4500;">$compNameSplit</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$initComputerName</span><span style="color:#a9a9a9;">.</span><span style="color:#000000;">split</span><span style="color:#000000;">(</span><span style="color:#8b0000;">&#39;.&#39;</span><span style="color:#000000;">)</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#ff4500;">$ComputerName</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$compNameSplit</span><span style="color:#a9a9a9;">[</span><span style="color:#800080;">0</span><span style="color:#a9a9a9;">]</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#006400;">#Sample Logging</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#0000ff;">Write-Output</span><span style="color:#000000;">&nbsp;</span><span style="color:#8b0000;">&quot; &quot;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#0000ff;">Write-Output</span><span style="color:#000000;">&nbsp;</span><span style="color:#8b0000;">&quot;SPF URL: $fullUrl&quot;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#0000ff;">Write-Output</span><span style="color:#000000;">&nbsp;</span><span style="color:#8b0000;">&quot; &quot;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#0000ff;">Write-Output</span><span style="color:#000000;">&nbsp;</span><span style="color:#8b0000;">&quot;Computer Name Initially Set To: $ComputerName&quot;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#0000ff;">Write-Output</span><span style="color:#000000;">&nbsp;</span><span style="color:#8b0000;">&quot;Computer Name Will Be Reset To: $VMName&quot;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#0000ff;">Write-Output</span><span style="color:#000000;">&nbsp;</span><span style="color:#8b0000;">&quot; &quot;</span><br /><span style="color:#000000;">&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;</span><span style="color:#00008b;">do</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">{</span><br /><span style="color:#000000;"></span><span style="color:#0000ff;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Start-Sleep</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-s</span><span style="color:#000000;">&nbsp;</span><span style="color:#800080;">30</span><br /><span style="color:#000000;"></span><span style="color:#ff4500;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $Output</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#0000ff;">InlineScript</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">{</span><br /><br /><span style="color:#000000;"></span><span style="color:#006400;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Construct response to SPF.</span><br /><span style="color:#000000;"></span><span style="color:#008080;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [System.Net.ServicePointManager]</span><span style="color:#a9a9a9;">::</span><span style="color:#000000;">ServerCertificateValidationCallback</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">{</span><span style="color:#ff4500;">$true</span><span style="color:#000000;">}</span><br /><span style="color:#000000;"></span><span style="color:#ff4500;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $request</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#008080;">[System.Net.HttpWebRequest]</span><span style="color:#a9a9a9;">::</span><span style="color:#000000;">Create</span><span style="color:#000000;">(</span><span style="color:#ff4500;">$Using:fullUrl</span><span style="color:#000000;">)</span><br /><span style="color:#000000;"></span><span style="color:#ff4500;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $request</span><span style="color:#a9a9a9;">.</span><span style="color:#000000;">Credentials</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$Using:spfCredentials</span><br /><span style="color:#000000;"></span><span style="color:#ff4500;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $request</span><span style="color:#a9a9a9;">.</span><span style="color:#000000;">Accept</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#8b0000;">&quot;application/json&quot;</span><br /><span style="color:#000000;"></span><span style="color:#ff4500;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $request</span><span style="color:#a9a9a9;">.</span><span style="color:#000000;">Headers</span><span style="color:#a9a9a9;">.</span><span style="color:#000000;">Add</span><span style="color:#000000;">(</span><span style="color:#8b0000;">&quot;Accept-Charset&quot;</span><span style="color:#a9a9a9;">,</span><span style="color:#000000;">&nbsp;</span><span style="color:#8b0000;">&quot;UTF-8&quot;</span><span style="color:#000000;">)</span><br /><span style="color:#000000;"></span><span style="color:#ff4500;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $request</span><span style="color:#a9a9a9;">.</span><span style="color:#000000;">ContentType</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#8b0000;">&quot;application/json&quot;</span><br /><span style="color:#000000;"></span><span style="color:#ff4500;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $request</span><span style="color:#a9a9a9;">.</span><span style="color:#000000;">Method</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#8b0000;">&quot;GET&quot;</span><br /><span style="color:#000000;"></span><span style="color:#ff4500;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $response</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$request</span><span style="color:#a9a9a9;">.</span><span style="color:#000000;">GetResponse</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span><br /><span style="color:#000000;"></span><span style="color:#ff4500;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $requestStream</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$response</span><span style="color:#a9a9a9;">.</span><span style="color:#000000;">GetResponseStream</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span><br /><span style="color:#000000;"></span><span style="color:#ff4500;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $readStream</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#0000ff;">new-object</span><span style="color:#000000;">&nbsp;</span><span style="color:#8a2be2;">System.IO.StreamReader</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$requestStream</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#ff4500;">$outputJson</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$readStream</span><span style="color:#a9a9a9;">.</span><span style="color:#000000;">ReadToEnd</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#ff4500;">$output</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#0000ff;">ConvertFrom-Json</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$outputJson</span><br /><span style="color:#000000;"></span><span style="color:#ff4500;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $readStream</span><span style="color:#a9a9a9;">.</span><span style="color:#000000;">Close</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span><br /><span style="color:#000000;"></span><span style="color:#ff4500;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $response</span><span style="color:#a9a9a9;">.</span><span style="color:#000000;">Close</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span><br /><span style="color:#000000;"></span><span style="color:#ff4500;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $output</span><br /><span style="color:#000000;"></span><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><br /><br /><span style="color:#000000;"></span><span style="color:#0000ff;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Write-Output</span><span style="color:#000000;">&nbsp;</span><span style="color:#8b0000;">&quot;Current Progress: $($output.value.Progress)&quot;</span><br /><span style="color:#000000;">&nbsp;&nbsp; }</span><span style="color:#000000;">&nbsp;</span></div>
<div style="font-size:8pt;font-family:Consolas,Lucida Console;background:#fcfcfc;padding:5px;"><span style="color:#00008b;">&nbsp;&nbsp; while</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">(</span><span style="color:#a9a9a9;">!</span><span style="color:#ff4500;">$output</span><span style="color:#a9a9a9;">.</span><span style="color:#000000;">value</span><span style="color:#a9a9a9;">.</span><span style="color:#000000;">IsCompleted</span><span style="color:#000000;">)</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></div>
<div style="font-size:8pt;font-family:Consolas,Lucida Console;background:#fcfcfc;padding:5px;"><span style="color:#0000ff;">&nbsp;&nbsp; Write-Output</span><span style="color:#000000;">&nbsp;</span><span style="color:#8b0000;">&quot;Final Status: $($output.value.Status)&quot;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;</span><span style="color:#006400;">#Rename Routine</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;</span><span style="color:#00008b;">If</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">(</span><span style="color:#a9a9a9;">!</span><span style="color:#ff4500;">$ComputerName</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">-or</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">!</span><span style="color:#ff4500;">$VMName</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">)</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">{</span><br /><br /><span style="color:#0000ff;"><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Write-Output</span><span style="color:#000000;">&nbsp;</span><span style="color:#8b0000;">&quot;Computer Name Not Defined, No Change Will Occur.&quot;</span><br /><br /><span style="color:#000000;">&nbsp;&nbsp; }</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;</span><span style="color:#00008b;">else</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">{</span><br /><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#0000ff;">Inlinescript</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">{</span><br /><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#ff4500;">$i</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#800080;">1</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#ff4500;">$newComputerName</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$Using:VMName</span><span style="color:#000000;">&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#00008b;">Do</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">{</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#ff4500;">$checkComp</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#0000ff;">Get-ADComputer</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-LDAPFilter</span><span style="color:#000000;">&nbsp;</span><span style="color:#8b0000;">&quot;(Name=$newComputerName)&quot;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#00008b;">if</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">(</span><span style="color:#a9a9a9;">!</span><span style="color:#ff4500;">$checkComp</span><span style="color:#000000;">)</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">{</span><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#0000ff;">Rename-Computer</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-ComputerName</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$Using:ComputerName</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-NewName</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$newComputerName</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-DomainCredential</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$Using:ADCred</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-Restart</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#000000;">}</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#00008b;">else</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">{</span><span style="color:#000000;">&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#ff4500;">$newComputerName</span><span style="color:#000000;">&nbsp;&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$newComputerName</span><span style="color:#000000;">&nbsp;&nbsp;</span><span style="color:#a9a9a9;">+</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$i</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#ff4500;">$i</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">++</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#000000;">}</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#000000;">}</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#00008b;">until</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">(</span><span style="color:#000000;">(</span><span style="color:#a9a9a9;">!</span><span style="color:#ff4500;">$checkComp</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span><br /><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#000000;">}</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#000000;">}</span><br /><span style="color:#000000;">}</span></div>
</td>
</tr>
</tbody>
</table>
</div>
<p><span style="font-size:small;"><b><span style="font-family:Calibri;">The Breakdown:</span></b></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;"><strong>Line&nbsp;6 and 13</strong> &ndash;&nbsp;initializing data. Note that in initializing <strong>$resourceObject</strong> we are consuming or loading several pieces of valuable data from the VM creation process such as the current <strong>VM Name </strong>($resourceObject.Name)&nbsp;and <strong>Computer Name </strong>($resourceObject.ComputerName).</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;"><strong>Line 19&nbsp;</strong></span>- </span>Here I am consuming an SMA Credential asset ($ADCred)&nbsp;that is populated with credentials with the appropriate access to perform a computer rename.</p>
<p style="font-family:Calibri;"><span style="font-size:small;"><span style="font-family:Calibri;"><strong>Line 24 - 27</strong> - when retrieving <strong>$resourceObject.ComputerName</strong> the value is returned as C<strong>omputerName.Domain</strong></span>. Here I am splitting off the&nbsp; &#39;Dot-Domain Name&#39; and placing only the Computer Name into a new variable.</span></p>
<p style="font-family:Calibri;"><span style="font-size:small;"><span style="font-family:Calibri;"><strong>Line 30 - 35</strong></span> - Sample logging. This is visible on the job output in Windows Azure Pack Admin Portal.</span></p>
<p style="font-family:Calibri;"><span style="font-size:small;font-family:Calibri;"><strong>Line 37 - 64</strong> - This chunk was taken from the <strong>Sample-Using-VMCloud-Automation </strong>Runbook that is included with SMA. The code is retrieving the current state of the VM deployment, looping until the VM deployment has completed, outputting progress during each loop. This code allows us to hold off on any post deployment routines (such as a computer rename) until the VM has been successfully deployed.</span></p>
<p style="font-family:Calibri;"><span style="font-size:small;font-family:Calibri;"><strong>Line 67 - 68</strong> - validating that values have been populated for the VMName and Computer Name.</span></p>
<p style="font-family:Calibri;"><span style="font-size:small;font-family:Calibri;"><strong>Line&nbsp;72 - 89</strong> - Rename routine, note here that I am using straight PowerShell encapsulated in an Inlinescript. In order to ensure that a computer does not already exist with the intended name, this routine checks AD for any matches to that of $resourceObject.Name (or the VM Name). If none exist the computer is then renamed. If the intended name is in use, the variable&nbsp;is incremented with a numeric value, and AD is checked again. This occurs in a Do / Until loop until&nbsp;no match is found at which time&nbsp;the computer is renamed..</span></p>
<p style="font-family:Calibri;"><span style="font-size:small;font-family:Calibri;"><strong>Line 77 and 82</strong>&nbsp;- note that because I am working from within an inlineScript I am referring to the variables here&nbsp;using a $Using variable. More information can be found at <a href="/b/privatecloud/archive/2013/08/27/automation-service-management-automation-tip-trick-leveraging-inlinescript-and-using-variable-with-powershell-workflow.aspx" target="_blank">this blog by Jim Britt</a> .</span></p>
<p style="font-family:Calibri;"><span style="font-size:small;">The Runbook is configured to execute anytime a Standalone VM is created as seen below.</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/3.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/3.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/3.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/3.jpg" border="0" /></a></p>
<p style="font-family:Calibri;"><span style="font-size:small;"><span style="font-family:Calibri;"><strong>NOTE</strong>: In this configuration only Stand Alone VM deployments are effected.&nbsp;The Runbook will not execute when deploying&nbsp;a VM Role. These will inherit Computer Name&#39;s from the Gallery Item pattern. This is a good thing..</span></span></p>
<p style="font-family:Calibri;"><span style="font-size:small;"><span style="font-family:Calibri;">Finally once completed not only will your new VM have a Computer Name that matches the VM Name, we can also observe the logging in the job output.</span></span></p>
<p style="font-family:Calibri;"><span style="font-size:small;"><span style="font-family:Calibri;"><span style="font-size:x-small;"><em>Click Image For Better View:</em></span><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/0042.2.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/0042.2.jpg"><br /><img width="647" height="231" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/0042.2.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/0042.2.jpg" border="0" /></a></span></span></p>
<p style="font-family:Calibri;"><span style="font-size:small;"><b><span style="font-family:Calibri;">Conclusion:</span></b></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">While this was a simple project demonstrating the integration between Windows Azure Pack and Service Management Automation, I found it to be very helpful in terms of understanding the integration, understanding how to work with SMA, and really just a simple yet practical introduction to the two products. I am looking forward to a continuing my ramp up on these products and will continue to share significant examples here. Subscribe to my twitter feed using the button found on this page for up to date notification as these posts occur.</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">Thanks for reading.</span></span></p>]]></content:encoded>
    </item>
    <item>
      <title>Runbook Commander: A System Center Companion Application</title>
      <link>https://docs.microsoft.com/archive/blogs/neilp/runbook-commander-a-system-center-companion-application</link>
      <pubDate>Fri, 26 Sep 2014 06:26:00 GMT</pubDate>
      <dc:creator><![CDATA[Neil Peterson]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/neilp/2014/09/26/runbook-commander-a-system-center-companion-application/</guid>
      <description><![CDATA[Runbook Commander: A System Center Companion Application
Quite some time back I built and made...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family:Calibri;font-size:small;">Runbook Commander: A System Center Companion Application</span></p>
<p><span style="font-family:Calibri;font-size:small;">Quite some time back I built and made available Runbook Commander: A System Center Companion Application. RBC is essentially a dynamic console extension for System Center Configuration Manager&nbsp;which can execute a System Center Orchestrator Runbook, passing to this Runbook information about the selected Configuration Manager object. I&rsquo;ve not made any changes to the application however have decided to make the source code available.</span></p>
<p><span style="font-family:Calibri;font-size:small;">Below is the locations of the Runbook Commander documentation, download, and source code.</span><span style="font-family:Calibri;font-size:small;"><br /></span></p>
<ul>
<li><span style="font-family:Calibri;font-size:small;">Runbook Commander Documentation &ndash; <a href="/b/neilp/archive/2012/10/23/runbook-commander-2-0-deployment-and-administration-guide.aspx" target="_blank">TechNet Blog</a></span></li>
<li><span style="font-family:Calibri;font-size:small;">Runbook Commander Download &ndash; <a href="https://gallery.technet.microsoft.com/Runbook-Commander-20-116ec91c" target="_blank">TechNet Gallery</a></span></li>
<li><span style="font-family:Calibri;font-size:small;">Runbook Commander Source Code &ndash; <a href="https://github.com/xneilpetersonx/Public-RBC" target="_blank">GitHub Project</a></span></li>
</ul>
<p><span style="font-family:Calibri;font-size:small;">Enjoy - neilp</span></p>]]></content:encoded>
    </item>
    <item>
      <title>Configuration Manager Application Approval Engine</title>
      <link>https://docs.microsoft.com/archive/blogs/neilp/configuration-manager-application-approval-engine</link>
      <pubDate>Wed, 10 Sep 2014 13:06:59 GMT</pubDate>
      <dc:creator><![CDATA[Neil Peterson]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/neilp/2014/09/10/configuration-manager-application-approval-engine/</guid>
      <description><![CDATA[Quite some time ago I demonstrated a solution for automating the notification and approval process...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family:Calibri;font-size:small;">Quite some time ago I demonstrated a solution for automating the notification and approval process for System Center Configuration Manager Application requests. I&rsquo;ve received numerous requests since that time to make the program demonstrated in the demo available for public consumption. Today I will be making the application, the source code, and documentation available for download. I will also be including here links to several very short videos that demonstrate functionally, configuration and extension. I hope that this samples provides value to you and inspires additional automation around the Configuration Management process.</span></p>
<p><span style="font-family:Calibri;font-size:small;">Rather the include all information in one single document or blog post, this will serve as a jump off point to separate items related to CMAEE. I suggest you start with the demonstration videos, each of these are shot and walk through configuration and use of CMAAE. As you work with CMAAE you may want to refer to the documentation when is pretty extensive and detailed. This documentation has an active index that will hyperlink you to the specific items you may need to dig in on. Finally if you are up to the challenge, the source code for CMAAE can be found linked below as well, feel free to grab a copy and modify to fit you liking.<br /></span></p>
<p><span style="font-family:Calibri;font-size:small;"><span style="font-family:Calibri;font-size:small;"><span style="font-size:large;"><b><span style="font-family:Calibri;">Disclaimer:</span></b></span></span></span><span style="font-family:Calibri;font-size:small;"><span style="font-family:Calibri;font-size:small;"><span style="font-size:large;"><b><span style="font-family:Calibri;"><br /></span></b></span></span></span></p>
<p><span style="font-family:Calibri;font-size:small;"><span style="font-family:Calibri;font-size:small;">The Configuration Manager Application Approval Engine is designed as a sample solution and is not intended for &lsquo;out of the box&rsquo; use. Ensure that if using the CMAAE you have fully tested for compatibility and functionality within your environment. All source code is available for examination, use, and extension. No support is provided with the CMAAE sample.&nbsp;This sample solution is provide &quot;as is&quot; with no warrantees and confers no rights.</span></span></p>
<p><span style="font-size:large;"><b><span style="font-family:Calibri;">Configuration Manager Application Approval Engine Introduction:</span></b></span></p>
<p><span style="font-family:Calibri;font-size:small;">My initial vision for the Configuration Manager Application Approval engine was just that of a simple portal which would broker data between Configuration Manager and System Center Orchestrator facilitating the dynamical approval of CM Application Requests. After much consideration I decided that the solution should not rely on any one automation system rather be completely flexible in integration, operation, and extensibility.</span></p>
<p><span style="font-family:Calibri;font-size:small;">The current iteration of CMAAE is a flexible and dynamic portal that facilitates the approval process of CM Application requests and can optionally trigger post approval automation. The CMAAE Process or experience can be broken down into three phases:</span></p>
<p style="margin-left:30px;"><span style="font-family:Calibri;font-size:small;"><b>CMAAE Detection and Notification</b> &ndash; any automation process (Orchestrator, PowerShell, and even managed code) monitors Configuration Manager for new application requests. When detected this automation creates a notification email with a specially crafted URL linking to the dynamic CMAAE portal. The CMAAE installer includes several sample automations to complete detection and notification.</span></p>
<p style="margin-left:30px;"><span style="font-family:Calibri;font-size:small;"><b>CMAAE Approval</b> &ndash; once the specially crafted URL has been engaged, the CMAAE portal is displayed allowing for the approval or denial of an application request.</span></p>
<p style="margin-left:30px;"><span style="font-family:Calibri;font-size:small;"><b>CMAAE Post Approval Automation</b> &ndash; this phase is optional. If post approval automation is desirable (such as delivering an email to the application requestor with the approval decision), the CMAAE portal can be configured to execute a post approval System Center Orchestrator Runbook, or a signed PowerShell script. </span></p>
<p><span style="font-size:large;"><strong><span style="font-family:Calibri;">CMAAE Documentation, Links, and Other Information:</span></strong></span></p>
<p style="margin-left:30px;"><span style="font-size:large;"><strong><span style="font-family:Calibri;"><span style="font-family:Calibri;font-size:small;"><b>Short Demonstration Videos: </b></span></span></strong><span style="font-family:Calibri;"><span style="font-family:Calibri;font-size:small;"><a href="/b/neilp/archive/2014/09/10/cmaaevideos.aspx" target="_blank">TechNet Blog</a></span></span></span></p>
<p style="margin-left:30px;"><span style="font-size:large;"><strong><span style="font-family:Calibri;"><span style="font-family:Calibri;font-size:small;"><b>Detailed Documentation: </b></span></span></strong><span style="font-family:Calibri;"><span style="font-family:Calibri;font-size:small;"><a href="/b/neilp/archive/2014/09/10/cmaaedocs.aspx" target="_blank">TechNet Blog</a></span></span><strong><span style="font-family:Calibri;"><span style="font-family:Calibri;font-size:small;"><b><br /></b></span></span></strong></span></p>
<p style="margin-left:30px;"><span style="font-size:large;"><strong><span style="font-family:Calibri;"><span style="font-family:Calibri;font-size:small;"><b>CMAAE Installer Download: </b></span></span></strong><span style="font-family:Calibri;"><span style="font-family:Calibri;font-size:small;"><a href="https://gallery.technet.microsoft.com/Configuration-Manager-29883c56" target="_blank">TechNet Gallery</a></span></span><strong><span style="font-family:Calibri;"><span style="font-family:Calibri;font-size:small;"><b><br /></b></span></span></strong></span></p>
<p style="margin-left:30px;"><span style="font-size:large;"><strong><span style="font-family:Calibri;"><span style="font-family:Calibri;font-size:small;"><b>CMAAE Source Code: </b></span></span></strong><span style="font-family:Calibri;"><span style="font-family:Calibri;font-size:small;"><a href="https://github.com/xneilpetersonx/Public-CMAAE" target="_blank">GitHub Project</a></span></span><strong><span style="font-family:Calibri;"><span style="font-family:Calibri;font-size:small;"><b><br /></b></span></span></strong></span></p>
<p style="margin-left:30px;"><span style="font-size:large;"><strong><span style="font-family:Calibri;"><span style="font-family:Calibri;font-size:small;"><b>Original Blog Posts Discussing&nbsp;CM Application Approval Internals: </b></span></span></strong><span style="font-family:Calibri;"><span style="font-family:Calibri;font-size:small;"><a href="/b/neilp/archive/2012/09/18/system-center-2012-configuration-application-approval-deep-dive-and-automation-part-1.aspx" target="_blank">TechNet Blog</a></span></span><strong><span style="font-family:Calibri;"><span style="font-family:Calibri;font-size:small;"><b><br /></b></span></span></strong></span></p>
<p><span style="font-family:Calibri;font-size:small;"><span style="font-family:Calibri;font-size:small;">&nbsp;</span></span></p>]]></content:encoded>
    </item>
    <item>
      <title>Configuration Manager Application Approval Engine - Demonstration Videos</title>
      <link>https://docs.microsoft.com/archive/blogs/neilp/configuration-manager-application-approval-engine-demonstration-videos</link>
      <pubDate>Wed, 10 Sep 2014 13:01:11 GMT</pubDate>
      <dc:creator><![CDATA[Neil Peterson]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/neilp/2014/09/10/configuration-manager-application-approval-engine-demonstration-videos/</guid>
      <description><![CDATA[Short Introduction Videos: 
I will be adding videos to this section as they are created.
Simple...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size:small;"><b><span style="font-family:Calibri;"><span style="font-size:large;">Short Introduction Videos:</span> </span></b></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;"><span style="font-size:large;"><span style="font-family:Calibri;font-size:small;">I will be adding videos to this section as they are created.</span></span></span></span></p>
<p><strong><span style="font-family:Calibri;font-size:small;">Simple Functionality - </span></strong><span style="font-family:Calibri;font-size:small;">demonstration of CMAAE in action.</span></p>
<p>[View:https://youtu.be/OX0ZG_--3rw:0:0]</p>
<p><span style="font-family:Calibri;font-size:small;"><strong>Configuration:</strong> - Simple configuration.</span></p>
<p><span style="font-family:Calibri;font-size:small;">[View:https://youtu.be/1Smc-OMtflQ:0:0]</span></p>
<p><span style="font-family:Calibri;font-size:small;"><strong>Delegation&nbsp;(This is Important)&nbsp;- </strong></span><span style="font-family:Calibri;font-size:small;">demonstration of delegation configuration.</span></p>
<p><span style="font-family:Calibri;font-size:small;">[View:https://youtu.be/4ECqYXxhpPQ:0:0]</span></p>
<p><span style="font-family:Calibri;font-size:small;"><strong>Detection and Notification&nbsp;Runbook&nbsp;- C</strong>onfiguration of the included detection and notification sample Runbook</span><span style="font-family:Calibri;font-size:small;">.</span></p>
<p><span style="font-family:Calibri;font-size:small;">[View:https://youtu.be/0jQByEToOgM:0:0]</span></p>]]></content:encoded>
    </item>
    <item>
      <title>Configuration Manager Application Approval Engine - Detailed Documentation</title>
      <link>https://docs.microsoft.com/archive/blogs/neilp/configuration-manager-application-approval-engine-detailed-documentation</link>
      <pubDate>Wed, 10 Sep 2014 12:58:00 GMT</pubDate>
      <dc:creator><![CDATA[Neil Peterson]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/neilp/2014/09/10/configuration-manager-application-approval-engine-detailed-documentation/</guid>
      <description><![CDATA[&nbsp;Index:
Introduction:Configuration Manager Application Approval Engine Overview:CMAAE Portal...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family:Calibri;font-size:small;"><span style="font-family:Times New Roman;font-size:medium;">&nbsp;</span></span><span style="font-size:large;"><b><span style="font-family:Calibri;">Index:</span></b></span></p>
<p><span style="font-family:Calibri;font-size:small;"><a href="#Introduction">Introduction:</a><br /></span><span style="font-family:Calibri;font-size:small;"><a href="#AnchoeOne">Configuration Manager Application Approval Engine Overview:</a></span><span style="font-family:Calibri;font-size:small;"><br /><a href="#AnchorTwo">CMAAE Portal Installation and Core Configuration:</a></span><span style="font-family:Calibri;font-size:small;"><br /><a href="#AnchorThree">Delegation:</a></span><span style="font-family:Calibri;font-size:small;"><br /><a href="#AnchorFour">Detection and Notification Overview:</a></span><span style="font-family:Calibri;font-size:small;"><br /><a href="#AnchorFive">Sample Detection and Notification Runbook:</a></span><span style="font-family:Calibri;font-size:small;"><br /><a href="#AnchorSix">Sample Detection and Notification PowerShell Script:</a></span><span style="font-family:Calibri;font-size:small;"><br /><a href="#AnchorSeven">Post Approval Automaton Overview:</a></span><span style="font-family:Calibri;font-size:small;"><br /><a href="#AnchorEight">Sample Post Approval Automation Runbook:</a></span><span style="font-size:small;"><span style="font-family:Calibri;"><br /><a href="#AnchorTen">Sample Post Approval Automation PowerShell Script:</a></span><span style="font-family:Calibri;"></span></span></p>
<p><span style="font-size:large;"><b><span style="font-family:Calibri;">Disclaimer:</span></b><b><br /><span style="font-family:Calibri;"></span></b></span><br /><span style="font-family:Calibri;font-size:small;"> The Configuration Manager Application Approval Engine is designed as a sample solution and is not intended for &lsquo;out of the box&rsquo; use. Ensure that if using the CMAAE you have fully tested for compatibility and functionality within your environment. All source code is available for examination, use, and extension. No support is provided with the CMAAE sample.&nbsp;This sample solution is provide &quot;as is&quot; with no warrantees and confers no rights.</span></p>
<p><span style="font-family:Calibri;font-size:small;"><span style="font-size:large;"><b><span style="font-family:Calibri;"><a id="Introduction"></a></span></b><b>Introduction:<br /><span style="font-family:Calibri;"></span></b></span><span style="font-family:Times New Roman;font-size:medium;"> </span></span></p>
<p><span style="font-family:Calibri;font-size:small;">The following document contains detailed documentation for deploying and administering the Configuration Manager Application Approval Engine. In addition to this detailed documentation see the following items:</span></p>
<ul>
<li><span style="font-family:Calibri;font-size:small;">Quick overview including demonstration and configuration videos &ndash; <a href="/b/neilp/archive/2014/09/10/cmaaevideos.aspx" target="_blank">Link</a></span></li>
<li><span style="font-family:Calibri;font-size:small;">Download the CMAAE Sample Installer &ndash; <a href="https://gallery.technet.microsoft.com/Configuration-Manager-29883c56" target="_blank">Link</a></span></li>
<li><span style="font-family:Calibri;font-size:small;">View and Download the CMAAE Source code - <a href="https://github.com/xneilpetersonx/Public-CMAAE" target="_blank">Link</a></span><span style="font-size:small;"><span style="font-family:Calibri;"><br style="font-family:Times New Roman;font-size:medium;" /></span></span></li>
</ul>
<p><span style="font-size:large;"><b><span style="font-family:Calibri;"><a id="AnchoeOne"></a>Configuration Manager Application Approval Engine Overview:</span></b></span></p>
<p><b><span style="font-family:Calibri;font-size:small;">Problem: </span></b><span style="font-family:Calibri;font-size:small;">System Center Configuration Manager 2012 includes the ability to configure requested software to require an approval before being installed on the requesting user&rsquo;s computer. This system however does not include an engine for providing notification of new or pending approvals, nor does the system allow for a streamlined approval process.</span></p>
<p><span style="font-family:Calibri;font-size:small;"><span><b>Solution</b>: CMAAE Provide a simple and flexible solution for automating the Configuration Manager Application request notification and approval process. This solution has been created such that any automation tool can be used to drive the application approval process (PowerShell, System Center Orchestrator, or even VBScript / Managed code). Once implemented and configured, as new application requests are submitted through System Center Configuration Manager, notification emails are delivered which link to a very simple approval portal. This solution is fully extensible using common datacenter automation tools such as System Center Orchestrator or PowerShell.</span></span></p>
<p><span style="font-family:Calibri;font-size:small;">The Configuration Manager Application Approval Engine process consists of three stages.</span></p>
<p><span style="font-size:small;"><b><span style="font-family:Calibri;">Stage 1 - Request Discovery and Notification: </span></b></span></p>
<p><span style="font-family:Calibri;font-size:small;">During this stage Configuration Manager is monitored for new application requests. This monitoring is done via. a simple WMI query against a Configuration Manager provider and can be performed by any automation tool. Once a new application request has been discovered an email message is created with a specially crafted URL which links back to the Application Approval Portal. Included with the CMAAE download is a sample PowerShell script and Orchestrator Runbook that can be used for this purpose.</span></p>
<p><span style="font-size:small;"><b><span style="font-family:Calibri;">Stage 2 &ndash; Application Approval: </span></b></span></p>
<p><span style="font-family:Calibri;font-size:small;">Once the application request email has arrived at the intended recipient, the URL is engaged which navigates to the Application Approval Engine portal. Here the recipient can approve or deny the specific request.</span></p>
<p><span style="font-family:Calibri;font-size:small;"><span><b>Stage 3 &ndash; Post Approval Automation</b>: </span></span></p>
<p><span style="font-family:Calibri;font-size:small;">CMAAE can be configured to execute post approval automation using either a System Center Orchestrator Runbook or a PowerShell script. This allows for flexible post approval automation such as delivering additional notifications or interacting with associated service requests. The CMAAE solution includes both a sample post approval Orchestrator Runbook and PowerShell script.</span></p>
<p><span style="font-size:large;"><b><span style="font-family:Calibri;"><a id="AnchorTwo"></a>CMAAE Portal Installation and Core Configuration:</span></b><b><br /></b></span><span style="font-family:Calibri;"><span style="font-size:medium;"><b></b></span></span></p>
<p><span style="font-family:Calibri;font-size:small;"><span><b>Prerequisites</b>: </span></span></p>
<ul>
<li><span style="font-family:Calibri;font-size:small;">Configuration Manager 2012 SP1 or R2</span></li>
<li><span style="font-family:Calibri;font-size:small;">IIS Instance to host Application Approval Engine (Detailed Below)</span></li>
<li><span style="font-family:Calibri;font-size:small;">Proper Delegation for Application Approval Engine (Detailed Below)</span></li>
<li><span style="font-family:Calibri;font-size:small;">Method for discovering new application requests (PowerShell and Orchestrator sample solution provided)</span></li>
<li><span style="font-family:Calibri;font-size:small;">Optional Post Approval automation (PowerShell and Orchestrator sample solution provided)</span></li>
</ul>
<p><span style="font-family:Calibri;font-size:small;"><span><b>Prepare the Windows environment</b>:</span></span></p>
<ul>
<li><span style="font-family:Calibri;font-size:small;">Add the Web Server (IIS) Role.</span></li>
<li><span style="font-family:Calibri;font-size:small;">Add Security - <b>Windows Authentication</b>.</span></li>
<li><span style="font-family:Calibri;font-size:small;"><span>Add Application Development &ndash; <b>ASP.NET 4.5</b></span></span></li>
<li><span style="font-family:Calibri;font-size:small;">Add Management Tools &ndash; <b>IIS 6 Management Compatibility</b> and <b>IIS 6 WMI Compatibility</b>.</span></li>
</ul>
<p><span style="font-size:small;"><b><span style="font-family:Calibri;">Install the Application Approval Engine:</span></b></span></p>
<ul>
<li><span style="font-family:Calibri;font-size:small;">Execute the CMAAE setup MSI &ndash; this may require elevated privileges to execute</span></li>
<li><span style="font-family:Calibri;font-size:small;">During the installation, name the application virtual directory, CMAAE is selected by default</span></li>
<li><span style="font-family:Calibri;font-size:small;">Once Completed the CMAAE Portal is installed</span></li>
<li><span style="font-family:Calibri;font-size:small;">Support files and sample automations are found under the application installation directory</span></li>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/5023.1.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/5023.1.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/5023.1.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/5023.1.jpg" border="0" /></a><span style="font-family:Calibri;font-size:small;"><br /></span></p>
<p><span style="font-size:small;"><b><span style="font-family:Calibri;">Post Deployment Configuration:</span></b></span></p>
<ul>
<li><span style="font-family:Calibri;font-size:small;">Within the IIS management tool, navigate to the CMAAE application and then Authentication.</span></li>
<li><span style="font-family:Calibri;font-size:small;"><span>Ensure that ASP.NET Impersonation and Windows Authentication are enabled and the remaining authentication methods are disabled (</span><i>Figure 1</i><span>)</span></span></li>
<li><span style="font-family:Calibri;font-size:small;"><span>Navigate to the Application Settings for the CMAAE application and configure the following settings (</span><i>Figure 2 and figure 3</i><span>)</span></span>
<ul>
<li><span style="font-family:Calibri;font-size:small;"><strong>SiteCode</strong> = CM Site Code</span></li>
<li><span style="font-family:Calibri;font-size:small;"><strong>SiteServer</strong> = CM Site Server or CM Provider</span></li>
<li><span style="font-family:Calibri;font-size:small;"><strong>siteTitle</strong> = the title you would like to appear on the CMAAE approval application</span></li>
</ul>
</li>
</ul>
<p><em><span style="font-size:x-small;">Figure 1:</span></em></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/6740.2.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/6740.2.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/6740.2.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/6740.2.jpg" border="0" /></a><span style="font-family:Calibri;font-size:small;"><br /></span></p>
<p><em><span style="font-size:x-small;">Figure 2:</span></em></p>
<p><em><span style="font-size:x-small;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/5123.3.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/5123.3.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/5123.3.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/5123.3.jpg" border="0" /></a><br /></span></em></p>
<p><em><span style="font-size:x-small;">Figure 3:<br /></span></em></p>
<p><em><span style="font-size:x-small;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/6165.4.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/6165.4.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/6165.4.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/6165.4.jpg" border="0" /></a><br /></span></em></p>
<p><span style="font-family:Calibri;font-size:small;">This completes the core application configuration.</span></p>
<p><span style="font-size:large;"><b><span style="font-family:Calibri;"><a id="AnchorThree"></a>Delegation:</span></b></span></p>
<p><span style="font-family:Calibri;font-size:small;">When the CMAAE application is installed on a server separate from a CM provider, a double hop / authentication issue will occur.</span></p>
<p><span style="font-family:Calibri;font-size:small;">There are two methods for mitigating this occurrence.</span></p>
<p><span style="font-family:Calibri;font-size:small;"><span><b>Active Directory Delegation</b>: Enable delegation for the computer hosting the CMAAE web application such as seen in the below image. The trusted computer in this case is the CM Site Server or other CM Provider.</span></span></p>
<p><em><span style="font-size:x-small;"><span style="font-family:Times New Roman;font-size:medium;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/0272.5.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/0272.5.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/0272.5.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/0272.5.jpg" border="0" /></a></span></span></em></p>
<p><span style="font-family:Calibri;font-size:small;"><b>Collocate the CMAAE Portal with a CM Provider</b>: If configuring delegation for the web server is not an acceptable configuration, the CMAAE Portal can be collocated on a system with the Configuration Manager provider. In this configuration a second Configuration Provider would need to be deployed. <b>Do not collocate the CMAAE portal on a Configuration Manager Site Server.</b></span></p>
<p><span style="color:#000000;font-size:large;"><b><span style="font-family:Calibri;"><a id="AnchorFour"></a>Detection and Notification Overview:</span></b></span></p>
<p><span style="font-family:Calibri;font-size:small;">Before using the CMAAE portal a method must be engaged that will detect new application requests and provide notification of these requests. This can completed be any method, the only requirement being that the notification include a specially crafted URL specific to the detected application request.</span></p>
<p><span style="font-size:small;"><b><span style="font-family:Calibri;">URL Sample: </span></b><a href="https://cmaaeserver/VDir/?UID=%3cinsert"><span style="color:#0563c1;font-family:Calibri;">https://CMAAEServer/VDir/?UID=&lt;insert</span></a><span style="font-family:Calibri;"> id&gt;</span></span></p>
<p><span style="font-family:Calibri;font-size:small;">Where UID = the application request unique id.</span></p>
<p><span style="font-family:Calibri;font-size:small;">Included with the CMAAE sample automation is an Orchestrator Runbook and a PowerShell script which both provided detection and notification services.</span></p>
<p><span style="font-size:large;"><b><span style="font-family:Calibri;"><a id="AnchorFive"></a>Sample Detection and Notification Runbook:</span></b></span></p>
<p><span style="font-size:small;"><b><span style="font-family:Calibri;">Overview: </span></b></span></p>
<p><span style="font-family:Calibri;font-size:small;">A sample detection and notification Runbook is delivered with the CMAAE installation package and can be found under the installation directory / Automation Samples. </span></p>
<p><span style="font-family:Calibri;font-size:small;">The CMAAE Detection and Notification Sample Runbook runs on a configurable schedule (15 minutes by default) and checks the specified Configuration Manager Provider for new application requests. When a new application request is detected a notification email is sent which contains a link to the CMAAE approval portal. After a configurable amount of time if the application request has not been approved or denied, a second notification is sent. Finally after a second configurable amount of time if not approved or denied, the application request is auto denied and an email stating thus is delivered.</span></p>
<p><span style="font-family:Calibri;font-size:small;">This sample Runbook is to be used as a guide and can be adjusted and or extended to fit any particular pre approval automation needs.</span></p>
<p><span style="font-size:small;"><b><span style="font-family:Calibri;">Configuration:</span></b></span></p>
<ul>
<li><span style="font-family:Calibri;font-size:small;">Import CMAAE_DetectionAndNotification.ois_export into a System Center Orchestrator (no Orchestrator integration packs are necessary)</span></li>
<li><span style="font-family:Calibri;font-size:small;">Configure the Variables found under the App Approval Folder as per the provided descriptions.</span></li>
<li><span style="font-family:Calibri;font-size:small;">Start the Runbook</span></li>
</ul>
<p><em><span style="font-size:x-small;"><span style="font-family:Times New Roman;font-size:medium;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/4403.6.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/4403.6.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/4403.6.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/4403.6.jpg" border="0" /></a></span></span></em></p>
<p><span style="font-size:large;"><b><span style="font-family:Calibri;"><a id="AnchorSix"></a>Sample Detection and Notification PowerShell Script:</span></b></span></p>
<p><span style="font-size:small;"><b><span style="font-family:Calibri;">Overview:</span></b></span></p>
<p><span style="font-family:Calibri;font-size:small;">A sample detection and notification PowerShell script is delivered with the CMAAE installation package and can be found under the installation directory / Automation Samples. </span></p>
<p><span style="font-family:Calibri;font-size:small;">The CMAAE_DetectionAndNotification.ps1 PowerShell script performs the exact same functions as the CMAAE Runbooks.</span></p>
<p><span style="font-family:Calibri;font-size:small;">This sample PowerShell script is to be used as a guide and can be adjusted and or extended to fit any particular post approval automation needs.</span></p>
<p><span style="font-size:small;"><b><span style="font-family:Calibri;">Configuration:</span></b></span></p>
<ul>
<li><span style="font-family:Calibri;font-size:small;">Modify script parameters to match environment</span></li>
<li><span style="font-family:Calibri;font-size:small;">Sign Script if necessary</span></li>
<li><span style="font-family:Calibri;font-size:small;">Configure Scheduled Task to execute script every 15 minutes (adjust if necessary)</span></li>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/1614.7.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/1614.7.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/1614.7.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/1614.7.jpg" border="0" /></a><span style="font-family:Calibri;font-size:small;"><br /></span></p>
<p><span style="font-size:large;"><b><span style="font-family:Calibri;"><a id="AnchorSeven"></a>Post Approval Automation Overview:</span></b></span></p>
<p><span style="font-family:Calibri;font-size:small;">Optionally CMAAE can be configured to execute a post approval System Center Orchestrator Runbook or PowerShell script. These can be used to include post approval automation such as sending additional notifications, modifying related service requests, or validating successful application installation.</span></p>
<p><span style="font-family:Calibri;"><span style="font-size:medium;"><span style="font-size:small;">Both the post approval Runbook and PowerShell automation solutions have been configured such that it is simple to provide data output from the application approval process to required Runbook or script parameters.&nbsp;&nbsp;</span> </span></span></p>
<p><span style="font-size:large;"><b><span style="font-family:Calibri;"><a id="AnchorEight"></a>Sample Post Approval Automation Runbook:</span></b></span></p>
<p><span style="font-size:small;"><b><span style="font-family:Calibri;">Overview:</span></b></span></p>
<p><span style="font-family:Calibri;font-size:small;">A sample post approval automation Runbook is delivered with the CMAAE installation package and can be found under the installation directory / Automation Samples. </span></p>
<p><span style="font-family:Calibri;font-size:small;">The CMAAE post approval sample automation Runbook<b> </b>is executed once the Approve / Deny decision has been submitted in the CMAAE portal. The Runbook consumes the following data from the application request:</span></p>
<ul>
<li><span style="font-family:Calibri;font-size:small;">Requesting User</span></li>
<li><span style="font-family:Calibri;font-size:small;">Application Name</span></li>
<li><span style="font-family:Calibri;font-size:small;">Approval Decision</span></li>
<li><span style="font-family:Calibri;font-size:small;">Approvers Comments</span></li>
</ul>
<p><span style="font-family:Calibri;font-size:small;">The post approval Runbook automation then discovers the requesting users email address from an Active Directory and delivers an email with the approval details.</span></p>
<p><span style="font-family:Calibri;font-size:small;">This sample Runbook is to be used as a guide and can be adjusted and or extended to fit any particular post approval automation needs.</span></p>
<p><span style="font-size:small;"><b><span style="font-family:Calibri;">Configuration:</span></b></span></p>
<ul>
<li><span style="font-family:Calibri;font-size:small;">Ensure that the Active Directory Integration Pack has been imported into the Orchestrator environment</span></li>
<li><span style="font-family:Calibri;font-size:small;">Import the CMAAE_PostExecutionSampleAutomation.ois_export into System Center Orchestrator</span></li>
<li><span style="font-family:Calibri;font-size:small;"><span>Configure the necessary Orchestrator variables </span><i>(Figure 1)</i></span></li>
<li><span style="font-family:Calibri;font-size:small;">Reconfigure the Get User Active Directory activity with environmental specific global configuration</span></li>
<li><span style="font-family:Calibri;font-size:small;">Gather the Unique ID of the Runbook from the Orchestrator database or Orchestrator Web Service</span></li>
<li><span style="font-family:Calibri;font-size:small;"><span>Configure the CMAAE Portal Application settings as detailed below </span><i>(Figure 2)</i></span></li>
</ul>
<p><span style="font-size:x-small;">Figure 1:</span></p>
<p><span style="font-family:Calibri;font-size:small;"><i><span style="font-size:x-small;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/3365.8.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/3365.8.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/3365.8.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/3365.8.jpg" border="0" /></a><br /></span></i></span></p>
<p><span style="font-size:small;"><b><span style="font-family:Calibri;">Application Portal Settings:</span></b></span></p>
<p><span style="font-family:Calibri;font-size:small;">Note: it is not required to specify a value for each possible post approval data output. Only those marked as required must be completed.</span></p>
<ul>
<li><span style="font-family:Calibri;font-size:small;"><span><b>RB</b>: False or True - this enables or disables post approval Orchestrator Runbook automation (required)</span></span></li>
<li><span style="font-family:Calibri;font-size:small;"><span><b>RB_SCOWS</b>: Address to the Orchestrator Web Service (required if RB = True)</span></span></li>
<li><span style="font-family:Calibri;font-size:small;"><span><b>RB_UID</b>: Unique ID of the Post Approval Runbook (required if RB = True)</span></span></li>
<li><span style="font-family:Calibri;font-size:small;"><span><b>RB_User</b>: Parameter to which you would like to provide the requesting users user name</span></span></li>
<li><span style="font-family:Calibri;font-size:small;"><span><b>RBAppAproveDeny</b>: Parameter to which you would like to provide the approval decision</span></span></li>
<li><span style="font-family:Calibri;font-size:small;"><span><b>RBAppComments</b>: Parameter to which you would like to provide the approvers comments</span></span></li>
<li><span style="font-family:Calibri;font-size:small;"><span><b>RBApplication</b>: Parameter to which you would like to provide the name of the requested application</span></span></li>
<li><span style="font-family:Calibri;font-size:small;"><span><b>RBUserComments</b>: Parameter to which you would like to provide the requesting users comments</span></span></li>
</ul>
<p><span style="font-size:x-small;"><i><span style="font-family:Calibri;">Figure 2 &ndash; notice here that Approval: Application, User:, and Comments: are the names of Runbook parameters defined in the post approval sample Runbook.</span></i></span></p>
<p><span style="font-family:Calibri;font-size:small;"><span><span style="font-family:Times New Roman;font-size:medium;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/8037.9.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/8037.9.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/8037.9.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/8037.9.jpg" border="0" /></a></span></span></span></p>
<p><span style="font-size:large;"><b><span style="font-family:Calibri;"><a id="AnchorTen"></a>Post Approval Automation PowerShell Script:</span></b></span></p>
<p><span style="font-size:small;"><b><span style="font-family:Calibri;">Overview:</span></b></span></p>
<p><span style="font-family:Calibri;font-size:small;">A sample post approval automation PowerShell script is delivered with the CMAAE installation package and can be found under the installation directory / Automation Samples. </span></p>
<p><span style="font-family:Calibri;font-size:small;">The CMAAE_PostExecutionSampleAutomation.ps1 PowerShell script performs the same function as the previously discussed Orchestrator Runbook.</span></p>
<p><span style="font-family:Calibri;font-size:small;">This sample PowerShell script is to be used as a guide and can be adjusted and or extended to fit any particular post approval automation needs.</span></p>
<p><span style="font-size:small;"><b><span style="font-family:Calibri;">Configuration:</span></b></span></p>
<ul>
<li><span style="font-family:Calibri;font-size:small;">Modify script parameters to match environment</span></li>
<li><span style="font-family:Calibri;font-size:small;">Store the script on an accessible file share</span></li>
<li><span style="font-family:Calibri;font-size:small;">Sign Script and ensure that the associated certificate is available on the CMAAE portal computer</span></li>
<li><span style="font-family:Calibri;font-size:small;">Ensure that the Active Directory PowerShell module has been installed on the hosting computer</span></li>
<li><span style="font-family:Calibri;font-size:small;">Configure the CMAAE Portal Application settings as detailed below</span></li>
</ul>
<p><span style="font-size:small;"><b><span style="font-family:Calibri;">Application Portal Settings:</span></b></span></p>
<p><span style="font-family:Calibri;font-size:small;">Note: it is not required to specify a value for each possible post approval data output. Only those marked as required must be completed.</span></p>
<ul>
<li><span style="font-family:Calibri;font-size:small;"><span><b>PS: </b>False or True &ndash; this enables or disables post approval PowerShell automation (required)</span></span></li>
<li><span style="font-family:Calibri;font-size:small;"><span><b>PSScriptPath</b>: Path to Script (required if PS = True)</span></span></li>
<li><span style="font-family:Calibri;font-size:small;"><span><b>PSAppApproveDeny</b>: Parameter to which you would like to provide the approval decision</span></span></li>
<li><span style="font-family:Calibri;font-size:small;"><span><b>PSAppComments</b>: Parameter to which you would like to provide the approvers comments</span></span></li>
<li><span style="font-family:Calibri;font-size:small;"><span><b>PSApplication</b>: Parameter to which you would like to provide the name of the requested application</span></span></li>
<li><span style="font-family:Calibri;font-size:small;"><span><b>PSUser</b>: Parameter to which you would like to provide the requesting users user name</span></span></li>
<li><span style="font-family:Calibri;font-size:small;"><span><b>PSUserComments</b>: Parameter to which you would like to provide the requesting users comments</span></span></li>
</ul>
<p><span style="font-size:x-small;"><i><span style="font-family:Calibri;">Notice that approval, comments, application, and userFromCM are the names of parameters defined in the post approval sample PS script.</span></i></span></p>
<p><span style="font-family:Calibri;font-size:small;"><span><span style="font-family:Times New Roman;font-size:medium;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/1464.10.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/1464.10.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/1464.10.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/1464.10.jpg" border="0" /></a></span></span></span></p>]]></content:encoded>
    </item>
    <item>
      <title>SMA Runbook Sample: Monitoring SCOM and Reacting to SCOM Alerts</title>
      <link>https://docs.microsoft.com/archive/blogs/neilp/sma-runbook-sample-monitoring-scom-and-reacting-to-scom-alerts</link>
      <pubDate>Tue, 04 Feb 2014 07:58:00 GMT</pubDate>
      <dc:creator><![CDATA[Neil Peterson]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/neilp/2014/02/04/sma-runbook-sample-monitoring-scom-and-reacting-to-scom-alerts/</guid>
      <description><![CDATA[Update: Ryan Andorfer has posted some good information over at the Building Clouds blog on his...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family:Calibri;font-size:small;"><b>Update: </b>Ryan Andorfer has posted some good information over at the Building Clouds blog on his experience with continuous running SMA&nbsp;monitors, some issues encountered, and how he has mitigated these issues. Check it out here - <a href="/b/privatecloud/archive/2014/05/14/automation-mvp-spotlight-series-sma-dfs-share-creation-request-walkthrough-in-depth.aspx" target="_blank">Automation - MVP Spotloght Series - SMA: DFS Share Creation Request Walkthrough In Depth</a><b> .<br /></b></span></p>
<p></p>
<hr style="width:100%;" />
<p><span style="font-family:Calibri;font-size:small;"><b>Introduction:</b> One of the more popular use cases I&rsquo;ve encountered with System Center Orchestrator is the scenario where in a Monitor Alert (SCOM) activity is used to&nbsp;trigger automation as the result of a detected alert. A simplified yet practical example as seen in System Center Orchestrator may look like the following:</span></p>
<p><span style="font-family:Calibri;font-size:small;">Parent Runbook monitors for alert. Once the alert is detected a child or component Runbook is invoked to perform some automated inspection / remediation. In the case of this example, the received alert indicates that the Print Spooler service has stopped on at least one monitored computer.</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/00/91/07/5141.1.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/5141.1.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/5141.1.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/5141.1.jpg" border="0" /></a><br /></span></p>
<p><span style="font-family:Calibri;font-size:small;">During the component or child Runbook the SCOM&nbsp;alert may be updated (resolution stated set to acknowledged), the print spooler examined, and an attempt made to start said service. Finally if the service cannot be started, an incident is raised in System Center Service Manager.</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/00/91/07/2474.2.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/2474.2.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/2474.2.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/2474.2.jpg" border="0" /></a><br /></span></p>
<p><span style="font-family:Calibri;font-size:small;">Again, this is an overly simplified example but will serve well conceptually for this post.</span></p>
<p><span style="font-family:Calibri;font-size:small;"><strong>How then can we replicate this type of monitoring in System Center Orchestrator: Service Management Automation (SMA)?</strong> </span></p>
<p><span style="font-family:Calibri;font-size:small;">You may have noticed that there is no native SMA activity for SCOM monitoring. Further more, because we need to write SMA automations using PowerShell workflows, the moitoring&nbsp;solution may not be obvious (at&nbsp;least&nbsp;is was not for myself).&nbsp;</span></p>
<p><span style="font-family:Calibri;font-size:small;">During this blog posting I will be detailing how to replicate the behavior of the above&nbsp;Orchestrator Runbooks with Orchestrator SMA.</span></p>
<p><span style="font-family:Calibri;font-size:small;"><b>SMA and Monitoring:</b> </span></p>
<p><span style="font-family:Calibri;font-size:small;">Simply said, at this point, in order to achieve this type of monitoring in Orchestrator SMA&nbsp;we need to craft the monitor using an SMA Runbook / PowerShell workflow. As it turns out, the solution I will be showing here (one of potentially many) was very simple to create. What I have done is to use a simple Do-While loop to craft the Monitor. The following can be used as a template for a SCORCH SMA Monitoring Runbook.</span></p>
<div style="padding:5px;border:1px solid black;width:450px;overflow:auto;font-family:Consolas,Lucida Console;font-size:10pt;">
<table border="0" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td valign="Top">
<div style="background:#cecece;padding:5px;font-family:Consolas,Lucida Console;font-size:10pt;">001<br />002<br />003<br />004<br />005<br />006<br />007<br />008<br />009<br />010<br />011<br />012<br />013<br />014<br />015<br />016</div>
</td>
<td nowrap="nowrap" valign="Top">
<div style="background:#fcfcfc;padding:5px;font-family:Consolas,Lucida Console;font-size:10pt;"><span style="color:#00008b;">workflow</span><span style="color:#000000;">&nbsp;</span><span style="color:#8a2be2;">Alert_Template</span><br /><span style="color:#000000;">{</span><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#00008b;">While</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">(</span><span style="color:#ff4500;">$True</span><span style="color:#000000;">)</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">{</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#006400;">#Monitoring Interval</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#0000ff;">Start-Sleep</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-s</span><span style="color:#000000;">&nbsp;</span><span style="color:#800080;">10</span><span style="color:#000000;">&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#ff4500;">$monitorResults</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#0000ff;">InlineScript</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">{</span><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#006400;">#Monitor Logic Here</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#000000;">}</span><span style="color:#000000;">&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#00008b;">If</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">(</span><span style="color:#ff4500;">$monitorResults</span><span style="color:#000000;">)</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">{</span><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#006400;">#React to Monitor Here </span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#000000;">}</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#000000;">}</span><br /><span style="color:#000000;">}</span></div>
</td>
</tr>
</tbody>
</table>
</div>
<p><span style="font-size:small;"><span style="font-family:Calibri;">&nbsp;</span></span><span style="font-size:small;"><span style="font-family:Calibri;">Take note of the following items:</span></span></p>
<ul>
<li><span style="font-family:Calibri;font-size:small;"><strong>Line 003</strong> &ndash; here I am setting <strong>while ($True) </strong>which will create an infinite while loop, which is core to a monitoring activity</span></li>
<li><span style="font-family:Calibri;font-size:small;"><strong>Line 006</strong> &ndash; Defines the monitoring interval (how often to check for the monitored condition)</span></li>
<li><span style="font-family:Calibri;font-size:small;"><strong>Line 008</strong> &ndash; Here I am using an inline script which will hold all monitoring logic. This could be any monitoring condition such as checking SCOM for new alerts, checking a service, or checking a mailbox for a new email. I am placing the results of the monitor into a variable <b>$monitorResults</b>. To note, you may not need the inlinescript depending on the logic placed here.</span></li>
<li><span style="font-family:Calibri;font-size:small;"><strong>Line 012</strong> &ndash; If the <b>$monitorResults</b> variable has been populated or in other words the monitoring check resulted in positive detection, we can react here. This reaction may be to execute a second Runbook such as in my initial Orchestrator Spooler example.</span></li>
</ul>
<p><span style="font-family:Calibri;font-size:small;"><b>Practical Example:</b> </span></p>
<p><span style="font-family:Calibri;font-size:small;">In the following full featured example I am using&nbsp;a Runbook to monitor SCOM for any new alerts that match specific criteria. The Runbook completes the following:</span></p>
<ul>
<li><span style="font-family:Calibri;font-size:small;">Checks SCOM every 30 seconds for a new alert with a MonitorObjectName of Spooler</span></li>
<li><span style="font-family:Calibri;font-size:small;">If an alert is detected, invokes a second Runbook that sets the alert state to 249 (Acknowledged)</span></li>
<li><span style="font-family:Calibri;font-size:small;">Then invokes a third Runbbok to check the state of the service. If the service is stopped, attempts to start it, and then &#39;returns&#39; the service state to the parent Runbook</span></li>
<li><span style="font-family:Calibri;font-size:small;">If the service could not be started, a Runbook is invoked to create a Service Manager Incident.</span></li>
<li><span style="font-family:Calibri;font-size:small;">If the service could be started, or was running after first check, a Runbook is invoked to set the Resolution stat of the alert to &lsquo;Resolved&rsquo;.</span></li>
</ul>
<p><span style="font-family:Calibri;font-size:small;">This solution includes many different Runbooks to perform all of these automated checks and remediation&#39;s, I will only be detailing the monitor itself. A copy of the complete solution can be found here for further investigation - <a href="https://gallery.technet.microsoft.com/Orchestrator-SMA-SCOM-b0b567e0" target="_blank">TechNet Gallery</a> .</span><span style="font-family:Calibri;font-size:small;"><br /></span></p>
<div style="padding:5px;border:1px solid black;width:570px;overflow:auto;font-family:Consolas,Lucida Console;font-size:10pt;">
<table border="0" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td valign="Top">
<div style="background:#cecece;padding:5px;font-family:Consolas,Lucida Console;font-size:10pt;">001<br />002<br />003<br />004<br />005<br />006<br />007<br />008<br />009<br />010<br />011<br />012<br />013<br />014<br />015<br />016<br />017<br />018<br />019<br />020<br />021<br />022<br />023<br />024<br />025<br />026<br />027<br />028<br />029<br />030<br />031<br />032<br />033<br />034<br />035<br />036<br />037<br />038<br />039<br />040</div>
</td>
<td nowrap="nowrap" valign="Top">
<div style="background:#fcfcfc;padding:5px;font-family:Consolas,Lucida Console;font-size:10pt;"><span style="color:#00008b;">workflow</span><span style="color:#000000;">&nbsp;</span><span style="color:#8a2be2;">B101_Monitor-Spooler</span><br /><span style="color:#000000;">{</span><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#ff4500;">$con</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#0000ff;">Get-AutomationConnection</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-Name</span><span style="color:#000000;">&nbsp;</span><span style="color:#8b0000;">&#39;SCOM_Connection&#39;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#ff4500;">$securepassword</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#0000ff;">ConvertTo-SecureString</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-AsPlainText</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-String</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$con</span><span style="color:#a9a9a9;">.</span><span style="color:#000000;">Password</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-Force</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#ff4500;">$cred</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#0000ff;">New-Object</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-TypeName</span><span style="color:#000000;">&nbsp;</span><span style="color:#8a2be2;">System.Management.Automation.PSCredential</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-ArgumentList</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$con</span><span style="color:#a9a9a9;">.</span><span style="color:#000000;">Username</span><span style="color:#a9a9a9;">,</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$securepassword</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#ff4500;">$scommp</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#0000ff;">Get-AutomationVariable</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-Name</span><span style="color:#000000;">&nbsp;</span><span style="color:#8b0000;">&#39;SCOM MP Path&#39;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#00008b;">While</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">(</span><span style="color:#ff4500;">$True</span><span style="color:#000000;">)</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">{</span><br /><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#0000ff;">Start-Sleep</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-s</span><span style="color:#000000;">&nbsp;</span><span style="color:#800080;">30</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#ff4500;">$alerts</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#0000ff;">InlineScript</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">{</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#0000ff;">Import-module</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$Using:scommp</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#0000ff;">Get-SCOMManagementServer</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-Name</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$Using:con</span><span style="color:#a9a9a9;">.</span><span style="color:#000000;">ComputerName</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#0000ff;">Get-SCOMAlert</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-ResolutionState</span><span style="color:#000000;">&nbsp;</span><span style="color:#800080;">0</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">|</span><span style="color:#000000;">&nbsp;</span><span style="color:#0000ff;">where</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">{</span><span style="color:#ff4500;">$_</span><span style="color:#a9a9a9;">.</span><span style="color:#000000;">MonitoringObjectName</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">-contains</span><span style="color:#000000;">&nbsp;</span><span style="color:#8b0000;">&#39;Spooler&#39;</span><span style="color:#000000;">}</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#000000;">}</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-PSComputerName</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$con</span><span style="color:#a9a9a9;">.</span><span style="color:#000000;">ComputerName</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-PSCredential</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$cred</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#00008b;">If</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">(</span><span style="color:#ff4500;">$alerts</span><span style="color:#000000;">)</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">{</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#00008b;">Foreach</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-Parallel</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">(</span><span style="color:#ff4500;">$alert</span><span style="color:#000000;">&nbsp;</span><span style="color:#00008b;">in</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$alerts</span><span style="color:#000000;">)</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">{</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#0000ff;">B102_Update-Alert</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-alertId</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$alert</span><span style="color:#a9a9a9;">.</span><span style="color:#000000;">Id</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-resState</span><span style="color:#000000;">&nbsp;</span><span style="color:#800080;">249</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#ff4500;">$checkResults</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">=</span><span style="color:#000000;">&nbsp;</span><span style="color:#0000ff;">B103_Check-Service</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-netBiosComputerName</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$alert</span><span style="color:#a9a9a9;">.</span><span style="color:#000000;">NetBiosComputerName</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#00008b;">If</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">(</span><span style="color:#ff4500;">$checkResults</span><span style="color:#000000;">&nbsp;</span><span style="color:#a9a9a9;">-eq</span><span style="color:#000000;">&nbsp;</span><span style="color:#8b0000;">&quot;Running&quot;</span><span style="color:#000000;">)</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">{</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#0000ff;">B102_Update-Alert</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-alertId</span><span style="color:#000000;">&nbsp;</span><span style="color:#ff4500;">$alert</span><span style="color:#a9a9a9;">.</span><span style="color:#000000;">Id</span><span style="color:#000000;">&nbsp;</span><span style="color:#000080;">-resState</span><span style="color:#000000;">&nbsp;</span><span style="color:#800080;">255</span><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#000000;">}</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#00008b;">else</span><span style="color:#000000;">&nbsp;</span><span style="color:#000000;">{</span><br /><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#0000ff;">B104_Submit-Incident</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#000000;">}</span><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#000000;">}</span><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#000000;">}</span><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:#000000;">}</span><br /><span style="color:#000000;">}</span></div>
</td>
</tr>
</tbody>
</table>
</div>
<p><span style="font-family:Calibri;font-size:small;">&nbsp;</span><span style="font-family:Calibri;font-size:small;">Items to Note:</span></p>
<ul>
<li><span style="font-family:Calibri;font-size:small;"><strong>003 &ndash; 005</strong>: Establish SCOM Connection Information (see SMA provided SCOM sample for more info)</span></li>
<li><span style="font-family:Calibri;font-size:small;"><strong>006</strong>: Variable holding the location of the SCOM PS Module</span></li>
<li><span style="font-family:Calibri;font-size:small;"><strong>008</strong>: Establishing an infinite loop</span></li>
<li><span style="font-family:Calibri;font-size:small;"><strong>012 &ndash; 018</strong>: This is the Monitor. The SCOM PS Module is being imported and the Get-SCOMAlert CMDLET used to gather alerts. Notice that </span></li>
<li><span style="font-family:Calibri;font-size:small;"><strong>020 &ndash; 038</strong>: This is the reaction to a positive Monitor (individual details below)</span></li>
<li><span style="font-family:Calibri;font-size:small;"><strong>022</strong>: Notice the Foreach &ndash;Parallel. When multiple alerts are detected this will allow all of them to be process in parallel</span></li>
<li><span style="font-family:Calibri;font-size:small;"><strong>023</strong>: Child Runbook call to set the alert state to acknowledged</span></li>
<li><span style="font-family:Calibri;font-size:small;"><strong>026</strong>: Child Runbook call to check service and attempt start. Notice here that the results of the child Runbook are stored in variable $checResults.</span></li>
<li><span style="font-family:Calibri;font-size:small;"><strong>028 &ndash; 031</strong>: If service can be started call to child Runbook to resolve the alert</span></li>
<li><span style="font-family:Calibri;font-size:small;"><strong>033 &ndash; 036</strong>: if service cannot be started call to child Runbook to submit incident.</span></li>
</ul>
<p><span style="font-family:Calibri;font-size:small;"><span><b>Wrap Up</b>: As seen here, while we do not have a native SCOM monitoring activity in SMA, crafting our own is not difficult and&nbsp;provides some neat flexibility. A little bit of PowerShell, some fundamental automation logic, and a bit of SMA / PowerShell workflow specific concepts and I&rsquo;ve almost identically replicated what was being performed with SCOM monitoring in my original SCORCH Rubook solution.</span></span></p>
<p><span style="font-family:Calibri;font-size:small;">Happy Automating - neilp</span><span style="font-family:Calibri;font-size:small;">&nbsp;</span></p>]]></content:encoded>
    </item>
    <item>
      <title>VMM Service Deployments in Depth: Deploying System Center Orchestrator as a Service Part 4 – Service Template Configuration and Deployment</title>
      <link>https://docs.microsoft.com/archive/blogs/neilp/vmm-service-deployments-in-depth-deploying-system-center-orchestrator-as-a-service-part-4-service-template-configuration-and-deployment</link>
      <pubDate>Tue, 28 Jan 2014 09:48:10 GMT</pubDate>
      <dc:creator><![CDATA[Neil Peterson]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/neilp/2014/01/28/vmm-service-deployments-in-depth-deploying-system-center-orchestrator-as-a-service-part-4-service-template-configuration-and-deployment/</guid>
      <description><![CDATA[During this post, I will be wrapping up this in-depth look at VMM service deployments. Over the last...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size:small;"><span style="font-family:Calibri;">During this post, I will be wrapping up this in-depth look at VMM service deployments. Over the last three postings we have examined the following items:</span></span></p>
<ul>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Post 1 &ndash; <a href="/b/neilp/archive/2014/01/15/scvmmservicetemplates.aspx" target="_blank">Introduction to service deployments</a></span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Post 2 &ndash; <a href="/b/neilp/archive/2014/01/16/scvmmservicetemplatespart2.aspx" target="_blank">Prerequisites for creating a multi-tier instance of Orchestrator Service</a></span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Post 3 &ndash; <a href="/b/neilp/archive/2014/01/18/scvmm3.aspx" target="_blank">Creation of SQL and Application Profiles for use in this service deployment</a></span></span></li>
</ul>
<p><span style="font-size:small;"><span style="font-family:Calibri;">In this post I will be using all previously discussed topics, prerequisites and the detailed SQL Server / Application profiles to create and deploy a multi-tiered instance of System Center Orchestrator R2.</span></span></p>
<p><span style="font-size:small;"><b><span><span style="font-family:Calibri;">Create the Service Template:</span></span></b></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">To create the service template, right click on the appropriate node in the VMM Library node and select &lsquo;Create Service Template&rsquo;.</span></span></p>
<p><span style="font-size:small;font-family:Calibri;">Give your service template a name, a release name or version, and select the service pattern. I generally leave the version at &lsquo;new&rsquo;, modifying this once completed and tested. I also generally start by selecting the blank pattern. As we will see, with all of the prep work completed across the previous few posts in this blog series, creating our service from scratch (blank pattern) is not a complex task.</span></p>
<p><span style="font-size:small;font-family:Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/0601.1.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/0601.1.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/0601.1.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/0601.1.jpg" /></a></span></p>
<p><span style="font-size:small;font-family:Calibri;">At this point our Service Template will look like the following. Notice that in my demo environment I only have two Virtual Machine Templates, these are the two that were created during post two of this blog series. The first is configured to deploy a VHD which contains only the OS image and a few other prerequisites such as .Net 3.5 and current software updates. The second is configured to deploy a VHD which in addition to OS and prerequisites also contains a prepared SQL Server image. In this example I will be using both of these templates, thus will drag an instance of each onto the designer pane of the Service Template designer.</span></p>
<p><span style="font-size:small;font-family:Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/3324.2.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/3324.2.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/3324.2.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/3324.2.jpg" /></a></span></p>
<p><span style="font-size:small;font-family:Calibri;">Once the VM Templates have been placed into the service pattern, the service template will look thusly.</span></p>
<p><span style="font-size:small;font-family:Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/1016.3.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/1016.3.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/1016.3.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/1016.3.jpg" /></a></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">At this point we have defined that the service being deployed will consisted of two tires, and have defined the VM templates that will be used to deploy the VM&rsquo;s for each of these tiers. To keep in mind, these VM Templates contain the rules on how each VM will be deployed, such as network settings, VHD settings, and weather on not to be created as highly available. I will not detail each setting for each of these templates as these will be unique to your environment. For the most part, the core configuration of these templates will differ very little from that of just deploying a &lsquo;standalone&rsquo; VM. Where we will see significant difference between a standard VM deployment and a service deployment is in the Application and SQL Server Configuration features.</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">That said, in the following section I will be detailing the configuration of the VM Template for Tier 1 of this example service. </span></span></p>
<p><strong><span style="font-size:small;"><span style="font-family:Calibri;">Configure Tier 1: </span></span></strong><span style="font-size:small;"><span style="font-family:Calibri;">To recap, Tier 1 of the multi-tiered deployment of System Center Orchestrator will consist of a single VM which contains all components of the Orchestrator application (Management Server, DB Server, Web Components, and a Runbook Server). To begin configuration, right click on the VM Template intended for Tier 1 (with SQL Server) and click properties.</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">Give the Template / Tier a name, I&rsquo;ve used &lsquo;<strong>Tier 1 &ndash; Management Server / DB / Web Components / Runbook Server&rsquo;</strong>.</span></span></p>
<p><span style="font-size:small;font-family:Calibri;">Next, while we will not make any modifications, observe that this Tier will both be deployed and serviced first. It is important that this Tier is completely deployed before Tier 2 begins as Tier 2 will rely on the existence of the Tier 1 SQL Server instance. Also note that this Tier will not scale. Whereas this service instance may contain many Orchestrator Runbook Servers (Tier 2), we will only have one Management / DB / Web Components Server (Tier 1).</span></p>
<p><span style="font-size:small;font-family:Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/4188.2.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/4188.2.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/4188.2.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/4188.2.jpg" /></a></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;"><strong>Tier 1 OS Configuration:</strong> Next we need to make a very minor yet key change to the OS Configuration of the VM Template. Under the Identity Information / Computer name: I have entered &lsquo;<b>@COMP@</b>&rsquo;. The @@ identifiers essentially create a variable that can be used throughout the service template. By creating this variable in the Tier 1 computer name position, we can dynamically specify the computer name of the Orchestrator Management / SQL Server at several different positions within the service template. This allowing us to both dynamically deploy the service, but also to deploy multiple instance of the service using unique computer names across all deployments without having to make adjustments to the service template.</span></span></p>
<p><span style="font-size:small;font-family:Calibri;">Because we have created a Service Template variable @COMP@, when deploying this service we will be asked to provide a value which is ultimately that value that will be given to our Tier 1 VM&rsquo;s Computer Name.</span></p>
<p><span style="font-size:small;font-family:Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/0456.3.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/0456.3.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/0456.3.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/0456.3.jpg" /></a></span></p>
<p><span style="font-size:small;font-family:Calibri;">While potentially not necessary, we can also take this opportunity to add any additional Roles or Features that may not already exists on our captured VHDs. For instance the Orchestrator Orchestration Console requires HTTP Activation; as can be seen below I have configured the VM template to deploy this feature at deployment time.</span></p>
<p><span style="font-size:small;font-family:Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/7077.4.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/7077.4.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/7077.4.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/7077.4.jpg" /></a></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;"><strong>Tier 2 Application Configuration:</strong> No need to go into depth here as the work behind the application deployment has been completed in the form of an application profile. So at this point we simply need to select the application profile that will deploy all Orchestrator components and also SQL Server Management Studio &ndash; this profile was detailed in <a href="/b/neilp/archive/2014/01/18/scvmm3.aspx" target="_blank">post 3 </a>of this series.</span></span></p>
<p><span style="font-size:medium;font-family:Calibri;"><span style="font-size:small;">While there is nothing to detail in terms of configuration, I will point out below an example of where we are using the <strong>@COMP@</strong> variable to dynamically specify the location of the Orchestrator database.</span> </span></p>
<p><span style="font-size:medium;font-family:Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/2438.5.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/2438.5.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/2438.5.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/2438.5.jpg" /></a></span></p>
<p><span style="font-size:small;font-family:Calibri;"><strong>SQL Server Configuration</strong>: Again, nothing to configure here, we simply need to select the SQL Server profile created in <a href="/b/neilp/archive/2014/01/18/scvmm3.aspx" target="_blank">post 3</a>. To reiterate, the purpose of this profile is to complete the&nbsp;deployment of the SYSPREPED SQL instance contained on the Tier 1 VHD.</span></p>
<p><span style="font-size:small;font-family:Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/5432.6.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/5432.6.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/5432.6.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/5432.6.jpg" /></a></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">This completes the necessary configuration for Tier 1 in this example.</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;"><strong>Tier 2 Configuration:</strong> to recap, Tier 2 of this service will contain multiple VM&rsquo;s each containing only the System Center Orchestrator Runook Server component. Additionally this Tier will be scalable such that additional Runbook Server can be added at will. To begin the configuration right click on the VM Template or Service Tier for Tier 2&nbsp;and select &lsquo;properties&rsquo;.</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">On the General tab give the Tier a name, I have chosen &lsquo;<strong>Tier 2 &ndash; Runbook Server&rsquo;</strong>.</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">I have then modified the deployment and servicing order so that this Tier is deployed and services after Tier 1.</span></span></p>
<p><span style="font-size:small;font-family:Calibri;">Finally I have configured the tier for scale out. In this case I have started with a default instance count of 4 and max instance count of 8.</span></p>
<p><span style="font-size:small;font-family:Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/6303.10.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/6303.10.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/6303.10.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/6303.10.jpg" /></a></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;"><b>Tier 2 OS Configuration:</b> Once again I am going to modify the Computer name field in the template for my Tier 2 VM template, however instead of creating variable like what was done for Tier 1, I have specified <strong>RBS0##</strong>. The ## indicates that VMM will increment values here starting with 01. So each Tier 2 system will be named similarly, however with incremented computer names (RBS001, RBS002, RBS003, etc.).</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/5153.9.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/5153.9.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/5153.9.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/5153.9.jpg" /></a></span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;"><b>Tier 2 Application Configuration:</b> Once again no configuration necessary, select the Application Profile created that will deploy only the Orchestrator Runbook Server component. Again pictured below is another use of the Tier 1 computer name variable. In this case we are using the variable to reference the database server during the Runbook Server deployment.</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/2768.11.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/2768.11.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/2768.11.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/2768.11.jpg" /></a></span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">Because the Tier 2 VM&rsquo;s do not require SQL Server we do not need to add a SQL Server profile, in fact this Tier configuration is now complete, click ok.</span></span></p>
<p><span style="font-size:small;font-family:Calibri;">Once the Service Template has been completely configured it will appear similar to the following.</span></p>
<p><span style="font-size:small;font-family:Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/31364.1.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/31364.1.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/31364.1.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/31364.1.jpg" /></a></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">At this point we can validate the Service Templates configuration and save the template using the Save and Validate button found at the upper left hand side of the designer. Once completed the designer can be closed.</span></span></p>
<p><span style="font-size:medium;font-family:Calibri;"><span style="font-size:small;"><strong>Deploying the Service Template:</strong> Now we reap the rewards of four blog posts worth of content. To deploy the Service Template, right click on the template and select &lsquo;Configure Deployment&rsquo;, Select a name and destination for the service.</span> </span></p>
<p><span style="font-size:medium;font-family:Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/7367.2.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/7367.2.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/7367.2.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/7367.2.jpg" /></a></span></p>
<p><span style="font-size:small;font-family:Calibri;">On the Deploy Service window,&nbsp;we can observe a few items. First notice that we can see a visual representation of the service as it will be deployed, in this case 1 VM for Tier 1, and 4 VM&rsquo;s for Tier 2. On the left hand pane we can see the current VM computer names for the VM&rsquo;s of each Tier, and finally we see the &lsquo;prompt&rsquo; or text box in which we provide the value to be used in the <strong>@COMP@</strong> variable.</span></p>
<p><span style="font-size:small;font-family:Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/5224.4.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/5224.4.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/5224.4.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/5224.4.jpg" /></a></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">We could click the Refresh Preview which would engage the fabric placement algorithm ensuring that our service will &lsquo;fit&rsquo; on the destination, or we can just click on the Deploy Service button. If there is going to be a pre-detectable&nbsp;placement issue, the Deploy Service wizard will let you know. </span></span></p>
<p><span style="font-size:small;font-family:Calibri;">After selecting Deploy Service, confirm that you would like to deploy the service and VMM will take care of the rest. Once this process has completed you service will be baked and ready for use.</span></p>
<p><span style="font-size:small;font-family:Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/8424.5.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/8424.5.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/8424.5.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/8424.5.jpg" /></a></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;"><b>Conclusion:</b> If you read all four post of this blog series or simply flipped though, I hope that this has been helpful in your pursuit to service deployment.</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">Happy Hydration..</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">neilp</span></span></p>]]></content:encoded>
    </item>
    <item>
      <title>VMM Service Deployments in Depth: Deploying System Center Orchestrator as a Service Part 3 – SQL Server and Application Profiles</title>
      <link>https://docs.microsoft.com/archive/blogs/neilp/vmm-service-deployments-in-depth-deploying-system-center-orchestrator-as-a-service-part-3-sql-server-and-application-profiles</link>
      <pubDate>Fri, 17 Jan 2014 21:26:00 GMT</pubDate>
      <dc:creator><![CDATA[Neil Peterson]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/neilp/2014/01/17/vmm-service-deployments-in-depth-deploying-system-center-orchestrator-as-a-service-part-3-sql-server-and-application-profiles/</guid>
      <description><![CDATA[Quick Blog Description: In the two previous postings of this blog series I&rsquo;ve introduced VMM...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family:Calibri;font-size:small;"><span><b>Quick Blog Description</b>: In the two previous postings of this blog series I&rsquo;ve <a href="/b/neilp/archive/2014/01/15/scvmmservicetemplates.aspx" target="_blank">introduced VMM Service Templates as well as demonstrated a VMM Service deployment&nbsp;</a>using&nbsp;System Center Orchestrator as the example service. <a href="/b/neilp/archive/2014/01/16/scvmmservicetemplatespart2.aspx" target="_blank">Blog posting 2 detailed all prerequisites </a>needed in order to deploy Orchestrator as a service. In this posting, the third in the series I will be detailing how to create a SQL Server Profile that will be used during the service deployment to complete the SQL Instance configuration. I will also be walking through the creation of two application profiles, the first used to install all Orchestrator components and SQL Server Management Studio, and the second used to install only the Orchestrator Runbook Server component.</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;"><b>Prerequisites Recap</b>: If you recall from the previous posting, the following items have been created / gathered in support of this service template / deployment. Many of these will be utilized throughout this process.</span></span></p>
<ul>
<li><span style="font-size:small;"><span style="font-family:Calibri;">SCVMM Virtual Hard Drive with SQL generalized and ready for deployment</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">SCVMM Virtual Hard Drive (without SQL)</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">SCVMM VM Template for each VHD/VHDX</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">The information necessary for the SQL deployment</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Custom SCVMM Resource containing the System Center Orchestrator installation media</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">The commands / scripts required for an unattended installation of all Orchestrator components</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">The commands / scripts required for an unattended installation of only an Orchestrator Runbook server </span></span></li>
</ul>
<p><span style="font-size:small;"><span style="font-family:Calibri;"><b>SQL Server Profile:</b> </span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">SQL Server Profiles can be added to a Server Template and serve the purpose of completing the SQL imaging process of a SYSPREPED SQL instance.&nbsp;In the example being detailed throughout this&nbsp;series of posting, the SQL Server Profile will be added to the Tier 1 VM of the service deployment and will ultimately prepare the SQL instance that will host the Orchestrator database. In order to create a SQL Server profile, navigate to appropriate node under the&nbsp;VMM Library workspace, and create a new SQL Server Profile.&nbsp;</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">Recall from my previous post that several pieces of data will be required for this configuration. This data includes:</span></span></p>
<ul>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Name of the SQL Instance: MSSQLSERVER is the default name given to a non-modified instance</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Instance ID: Specified during the SQL SYSPREP process&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Media Source: In my example I have made a copy of the media local to the VM before creating my VHDX / VM Template. This copy was placed under c:\source\sql2012</span></span></li>
</ul>
<p><span style="font-size:medium;font-family:Calibri;"><span style="font-size:small;">Configure the SQL Server Deployment as seen below. In this case &lsquo;Name:&rsquo; is an internal to VMM value and is not related to the prepared instance of SQL on the VHDX, anything can be placed here. Also notice that not only have I specified the Instance Name and Instance ID, but <b>I have also increased the timeout value</b>.</span> </span></p>
<p><span style="font-size:medium;font-family:Calibri;"><span style="font-size:small;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/7382.1.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/7382.1.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/7382.1.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/7382.1.jpg" /></a></span></span></p>
<p><span style="font-size:medium;font-family:Calibri;"><span style="font-size:small;">Configure the SQL Server&nbsp;Configuration thusly. Notice that not only have I specified the media source, but have specified a SQL administrator and ensured that TCP/IP and named pipes has been enabled</span>.</span></p>
<p><span style="font-size:medium;font-family:Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/2816.2.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/2816.2.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/2816.2.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/2816.2.jpg" /></a></span></p>
<p><span style="font-size:small;font-family:Calibri;">Finally specify VMM Run As accounts to be uses as service accounts for the SQL instance.</span></p>
<p><span style="font-size:small;font-family:Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/8078.3.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/8078.3.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/8078.3.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/8078.3.jpg" /></a></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">This completes the creation of the SQL Server Profile and it is now ready for use in our Tier 1 configuration. I will detail how to use the profile later on in this blog series.</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;"><b>Application Profile for all Orchestrator Components plus SQL Server Management Studio: </b></span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">In addition to completing the SQL configuration on my Tier 1 VM, I will also be deploying all System Center Orchestrator components as well as SQL Server Management Studio. These items can be taken care of using one Application Profile. Just like SQL Server Profiles, Application profiles can be added to a service template and are used to preform post VM service configurations such as installing application, executing scripts, and providing access to VMM Library resources.</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">To create the Tier 1&nbsp;Application Profile navigate to the&nbsp;appropriate profile node under the VMM Library workspace and create a new application profile. On the general tab give the profile a name similar to &lsquo;Orchestrator Management Server&#39;.</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">On the Application Configuration tab add a <strong>Script Application</strong> and name it similar to &lsquo;Orchestrator Management Server&rsquo;. Recall in the previous blog that I had detailed the command that would perform a complete and unattended installation of System Center Orchestrator. We are going to use that information here. Configure the Script Application like the following:</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/2047.1.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/2047.1.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/2047.1.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/2047.1.jpg" /></a></span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">Where the Executable Program is: </span></span></p>
<p style="margin-left:30px;"><em><span style="font-size:small;"><span style="font-family:Calibri;">%WINDIR%\System32\cmd.exe</span></span></em></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">And<b> the Parameters are:</b> </span></span></p>
<p style="margin-left:30px;"><em><span style="font-size:small;"><span style="font-family:Calibri;">/c .\setup\setup.exe /Silent /Key:&lt;insert key&gt; /ServiceUserName&lt;insert service account&gt; /ServicePassword:&lt;insert password&gt; /Components:All /DbServer:@computerName@ /DbNameNew:Orchestrator /WebServicePort:81 /WebConsolePort:82 /OrchestratorRemote /UseMicrosoftUpdate:0 /SendCEIPReports:0 /EnableErrorReporting:never</span></span></em></p>
<p></p>
<p><span style="font-size:small;font-family:Calibri;">Let&rsquo;s back up a bit and take a closer inspection of the Executable Program and parameters. </span><span style="font-size:small;"><span style="font-family:Calibri;">Please notice the following </span></span></p>
<ul>
<li><span style="font-size:small;"><span style="font-family:Calibri;"><strong>Executable Program</strong>: we are not executing setup.exe for Orchestrator, rather a CMD shell or interpreter</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Because we are executing a command shell we need to specify <b>/c</b> indicating that the commands following should be executed</span></span></li>
<li><span style="font-size:medium;"><span style="font-family:Calibri;"><span style="font-size:small;"><b>/DbServer:@COMP@</b> - what is this about? VMM allows us to define variables when creating service. What we will see is that in the OS template for deploying the Tier 1 VM, we will specify @COMP@ as&nbsp;its computer name. Hence, we will be prompted to populate this value at service deployment time. Any place in our service template&nbsp;that the @COMP@ variable is referenced will consume the provided value</span>. <span style="font-size:small;">Essentially @COMP@ will be the name of the Tier 1 VM, which is also where the Orchestrator database will be stored, which is why I am using /Dbserver:@COMP@. I will revisit this in more detail when we configure the Tier 1 VM deployment.</span></span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Be sure to select the Custom Resource package which includes the orchestrator media.</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Take note that several items in the parameter need to be changed to match your media / environment (anything with &lt;insert etc.&gt;).</span></span></li>
</ul>
<p><span style="font-size:small;font-family:Calibri;">Finally for the Tier 1 application profile, to install SQL Server Management Studio we will add a script to the application profile and configure it as follows:</span></p>
<p><span style="font-size:small;font-family:Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/6406.2.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/6406.2.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/6406.2.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/6406.2.jpg" /></a></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">Where the Executable Program is: </span></span></p>
<p style="margin-left:30px;"><em><span style="font-size:small;"><span style="font-family:Calibri;">%WINDIR%\System32\cmd.exe</span></span></em></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">And the Parameters are:</span></span></p>
<p style="margin-left:30px;"><em><span style="font-size:small;"><span style="font-family:Calibri;">/c c:\source\sql2012\setup.exe /q /ACTION=install /FEATURES=ssms /IACCEPTSQLSERVERLICENSETERMS</span></span></em></p>
<p><span style="font-size:small;font-family:Calibri;">The one item to note here is the <strong>path to setup.exe</strong>. This is the path on the reference VM in which I have stored the SQL media.</span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;"><b>Application Profile for only the Runbook Server Components: </b></span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">To complete the Tier 2 end of this service deployment we will need an&nbsp;additional application profile&nbsp;that will deploy only the Orchestrator Runbook Server components.</span></span></p>
<p><span style="font-size:small;font-family:Calibri;">So we will&nbsp;create a new application profile naming it something like &lsquo;Orchestrator Runbook Server&rsquo; and configure it thusly:</span></p>
<p><span style="font-size:small;font-family:Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/7331.3.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/7331.3.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/7331.3.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/7331.3.jpg" /></a></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">Where the Executable Program is: </span></span></p>
<p style="margin-left:30px;"><em><span style="font-size:small;"><span style="font-family:Calibri;">%WINDIR%\System32\cmd.exe</span></span></em></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">And the Parameters are:</span></span></p>
<p style="margin-left:30px;"><em><span style="font-size:small;"><span style="font-family:Calibri;">/c .\setup\setup.exe /Silent /Key:&lt;insert Key&gt;/ServiceUserName:&lt;Insert Service Account&gt; /ServicePassword:&lt;Insert service Password&gt; /Components:RunbookServer /DbServer:@COMP@ /DbNameExisting:Orchestrator /OrchestratorRemote /UseMicrosoftUpdate:0 /SendCEIPReports:0 /EnableErrorReporting:never</span></span></em></p>
<p><span style="font-size:small;font-family:Calibri;">Be sure to replace any items marked with &lt;Insert&gt;, as well note that where the&nbsp;Tier 1&nbsp;application profile was configured to install all Orchestrator components (/Components:ALL), here we are only installing a Runbook Server (/Components:RunbookServer).</span></p>
<p><strong><span style="font-size:small;font-family:Calibri;">Conclusion: </span></strong></p>
<p><span style="font-size:small;font-family:Calibri;">I&#39;m going to wrap this post up here. If you have been following along, at this point we&#39;ve discussed Service Deployments and seen one in action, have gathered all needed prerequisites and configured our SQL Server and Application Profiles. Stick around as I will soon place up the final post to this series in which I will pull this all together into a Service Template for precise, mass, and repeatable service&nbsp;deployments.</span></p>]]></content:encoded>
    </item>
    <item>
      <title>VMM Service Deployments in Depth: Deploying System Center Orchestrator as a Service Part 2 - Prerequisites</title>
      <link>https://docs.microsoft.com/archive/blogs/neilp/vmm-service-deployments-in-depth-deploying-system-center-orchestrator-as-a-service-part-2-prerequisites</link>
      <pubDate>Thu, 16 Jan 2014 07:52:00 GMT</pubDate>
      <dc:creator><![CDATA[Neil Peterson]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/neilp/2014/01/16/vmm-service-deployments-in-depth-deploying-system-center-orchestrator-as-a-service-part-2-prerequisites/</guid>
      <description><![CDATA[Quick Overview - Hello Again, during this post I will be detailing all prerequisites needed in order...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size:small;"><span style="font-family:Calibri;"><b>Quick Overview -</b> Hello Again, during this post I will be detailing all prerequisites needed in order to configure and deploy a multi-tiered instance of System Center Orchestrator using the System Center Virtual Machine Manager Service Deployment capabilities. </span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">In Post one of this series I&rsquo;ve introduced the concept of Virtual Machine Manager Service Templates or Service Deployments and also introduced the example that I will be detailing in this and future posts. The initial post including a video demonstrating the end results of this service deployment and can be found here:</span></span></p>
<p><a href="/b/neilp/archive/2014/01/15/scvmmservicetemplates.aspx" target="_blank">https://blogs.technet.com/b/neilp/archive/2014/01/15/scvmmservicetemplates.aspx</a></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;"><b>Service Deployment Prerequisites -</b> With this post, the second in the series, I will begin detailing how this service template has been configured. More to the point, this post is all about pulling together the prerequisites. In order to achieve a service deployment similar to the example that I am working with the following items will be required:</span></span></p>
<ul>
<li><span style="font-size:small;"><span style="font-family:Calibri;">SCVMM Virtual Hard Drive with SQL generalized and ready for deployment</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">SCVMM Virtual Hard Drive (without SQL)</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">SCVMM VM Template for each VHD/VHDX</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">The information necessary for the SQL deployment</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Custom SCVMM Resource containing the System Center Orchestrator installation media</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">The commands / scripts required for an unattended installation of all Orchestrator components</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">The commands / scripts required for an unattended installation of only an Orchestrator Runbook server </span></span></li>
</ul>
<p><span style="font-size:small;"><span style="font-family:Calibri;">Wowza &ndash; this is a lot of requirements, however no worries, I am confident that the time spent collecting these artifacts and creating / generalizing VHD&rsquo;s will pay off with the ability to both mass deploy and repeatable deploy this service with only a few mouse clicks.</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">During the next few sections I will be examining each of these prerequisites.</span></span></p>
<p><span style="font-size:small;"><b><span><span style="font-family:Calibri;">Virtual Hard Drives, VM Templates, and SYSPREPED SQL Instance:</span></span></b></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">The example service deployment detailed in this blog series consist of two different VM tiers. </span></span></p>
<ul>
<li><span style="font-size:small;"><span style="font-family:Calibri;"><b>Tier One (VM1):</b> All components of the Orchestrator application including the Orchestrator database, <strong>thus has a requirement of SQL server</strong>. </span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;"><b>Tier Two (VM2 &ndash; VM5):</b> Only the Orchestrator Runbook Server component and thus <strong>does not require a SQL Server installation</strong>. </span></span></li>
</ul>
<p><span style="font-size:small;"><span style="font-family:Calibri;">Because of the SQL requirements, I have chosen to use the concept of&nbsp;VMM <a href="https://technet.microsoft.com/en-us/library/hh427294.aspx" target="_blank">SQL Server&nbsp;Profiles</a>, and two&nbsp;different Virtual Hard drives, one for each tier. There are other ways that this could be performed using only one hard drive and a scripted installation of SQL, however the method detailed here works very well.</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">I chose to create both my virtual hard drives and my VM Templates using Virtual Machine Managers ability to create a VM Template from an existing VM which coincidentally will also create the virtual hard drive. This process is documented in the following article:</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">Creating a VM Template - </span><a href="https://technet.microsoft.com/en-us/library/hh427282.aspx" target="_blank"><span style="font-family:Calibri;color:#0563c1;">https://technet.microsoft.com/en-us/library/hh427282.aspx</span></a><span><span style="font-family:Calibri;"> .</span></span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">In the case of this example I have created two reference VM&rsquo;s and performed the following on each.</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;"><b>Tier 1 VM Source:</b> Because this tier will include a SQL Server installation, I&rsquo;ve prepared the source VM with a SYSPREP copy of SQL 2012 SP1. The following steps were used to complete this task.</span></span></p>
<ul>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Deploy Standard VM with Windows 2012 R2</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Prepare the VM with a SysPrep instance of SQL (This is an involved process so I have detailed it independently in the below section) </span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Applied all software updates to VM</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Powered off the VM</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Used the SCVMM create template from existing machine capabilities to create both&nbsp;a virtual hard drive from the VM as well as a VM Template</span></span></li>
</ul>
<p><span style="font-size:small;"><span style="font-family:Calibri;"><b>Tier 2 VM Source:</b> This tier will not need a SQL instance. The following steps were used to complete this task.</span></span></p>
<ul>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Deployed a Standard VM with Windows 2012 R2</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Installed .Net Framework 3.5</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Applied all software updates to VM</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Powered off the VM</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Used the SCVMM create template from existing machine capabilities to create both&nbsp;a virtual hard drive from the VM as well as a VM Template</span></span></li>
</ul>
<p><span style="font-size:small;"><span style="font-family:Calibri;">After completing these tasks I am left with two VHDX files in my VMM Library and also two VM Templates which takes care of the first three prerequisites on the list.</span></span></p>
<p><span style="font-size:small;"><b><span><span style="font-family:Calibri;">SQL SysPrep:</span></span></b></span></p>
<p><span style="font-size:small;font-family:Calibri;"><strong>To Note</strong> &ndash; at this time VMM does not support creating SQL Profiles for SQL 2012 SP1. Features have been added to SQL 2012 SP1 CU2 around image preparation that may change this experience once SQL Server 2012 SP1 is supported for deployment using SQL Profiles by VMM.</span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">When creating the Tier 1 VM image&nbsp;(see previous section)&nbsp;there is a requirement of preparing the Tier 1 reference VM with a SYSPREPED instance of SQL&nbsp;. More information can be found on performing this task at the following sites</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">TechNet - </span><a href="https://technet.microsoft.com/en-us/library/ee210664.aspx" target="_blank"><span style="font-family:Calibri;color:#0563c1;">https://technet.microsoft.com/en-us/library/ee210664.aspx</span></a></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">For completeness sake I will walk though a few steps of this process here.</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">First thing first&nbsp;I have done is to&nbsp;copy the SQL media local to the reference VM image. I have placed this under a folder at the root drive names &lsquo;source&rsquo;. This can be placed in any location however we will need to <strong>take note of this location for later use</strong>.</span></span></p>
<p><span style="font-size:small;font-family:Calibri;">Second: We can being the SQL installation / image preparation. This is very similar to a standard SQL installation however will be initiated using the options shown below.</span></p>
<p><span style="font-size:small;font-family:Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/1638.1.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/1638.1.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/1638.1.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/1638.1.jpg" /></a></span></p>
<p><span style="font-size:medium;font-family:Calibri;"><span style="font-size:small;">Notice that when installing a reference instance of SQL 2012 that we have a limited set of features that can be added. Also notice that SQL Server Management Studio is not one of these features. If you would like to include SQL Server Management Studio, this will need to be performed post deployment which I will demonstrate later in this blog series. This experience may change once VMM supports SQL Server Profiles for SQL SP1.</span></span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/4380.2.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/4380.2.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/4380.2.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/4380.2.jpg" /></a></p>
<p><span style="font-size:small;font-family:Calibri;">During the image preparation wizard we will select an Instance ID. <strong>This information will be required when configuring the SCVMM service deployment</strong>.</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/8422.3.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/8422.3.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/8422.3.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/8422.3.jpg" /></a></p>
<p><span style="font-size:small;font-family:Calibri;">Once completed, SQL Server is generalized and prepared (notice that the services are not actually installed on the sever). At this point we can continue preparing the reference VM for the VHDX and VM Template (as detailed in the previous section of this blog).</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/7484.4.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/7484.4.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/7484.4.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/7484.4.jpg" /></a></p>
<p><span style="font-size:small;"><b><span><span style="font-family:Calibri;">Custom VMM Resource Containing Orchestrator Media:</span></span></b></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">With our Virtual Hard Drives and VM Templates secure, we can now begin to collect the artifacts necessary for the application deployment side of this service deployment. In this case, before we can deeply Orchestrator we will need to stage the Orchestrator media&nbsp;somewhere that can be accessed during the VM / Service deployment. This could easily be an external to VMM share, however we have an additional option when using VMM to store media, scripts, and other resources directly in the VMM library. In order to do so we need to create a custom VMM Library resource. Once our Custom Resource has been created in the VMM Library it can be reference in service templates. To create a custom library resource complete the following:<br /></span></span></p>
<ul>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Create a folder in the VMM Library Share that contains .CR in the folder name - for example <strong>OrchestratorR2.CR</strong></span></span></li>
<li style="font-family:Calibri;"><span style="font-size:small;"><span style="font-family:Calibri;">Copy the desired contents to this folder (in this case the Orchestrator media)</span></span></li>
<li style="font-family:Calibri;"><span style="font-size:small;"><span style="font-family:Calibri;">Refresh the VMM Library</span></span></li>
</ul>
<p style="font-family:Calibri;"><span style="font-size:small;"><span style="font-family:Calibri;">Once completed the following items can be observed: In the Custom Resource folder that was created&nbsp;a file named SCVMMCRtag.cr will be automatically&nbsp;created (screen shot 1),&nbsp;and our custom resource will be added to the VMM Library (screen shot 2)<br /></span></span><br /><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/8831.1.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/8831.1.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/8831.1.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/8831.1.jpg" /></a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/3542.2.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/3542.2.jpg"><img border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/07/3542.2.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-07/3542.2.jpg" /></a></p>
<p><span style="font-size:small;"><b><span><span style="font-family:Calibri;">SQL Management Studio:</span></span></b></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">Because of the SQL versioning limitation when using VMM SQL Server Profiles SQL Server Management Studio is not included in the prepared image of SQL Server. If you wish to use SQL Server&nbsp;Profiles and also desire to include SQL Server Management Studio with your deployments, this can be achieved using Post Deployment Scripts. This is an optional step, however one that I prefer. Being that&nbsp;we are just collecting&nbsp;prerequisites, at this point I will only be detailing the command necessary to install SQL Server Management Studio. In the following blog posting to this series I will be putting this command to use.&nbsp;</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">I&rsquo;ve gathered the following installation string from the following documentation: <a href="https://msdn.microsoft.com/en-us/library/ms144259.aspx" target="_blank">Install SQL Server From the Command Line</a>&nbsp;.</span></span></p>
<p style="margin-left:30px;"><em><span style="font-size:small;"><span style="font-family:Calibri;">setup.exe /q /ACTION=install /FEATURES=ssms /IACCEPTSQLSERVERLICENSETERMS</span></span></em></p>
<p><span style="font-size:small;"><b><span><span style="font-family:Calibri;">Orchestrator All Components:</span></span></b></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;"><b>F</b>or Tier 1&nbsp;of this service I will be installing <strong>all Orchestrator components</strong> on one VM. In order to do so I need the commands that will make this happen. The command line installation documentation for Orchestrator can be found here: <a href="https://technet.microsoft.com/en-us/library/hh674378.aspx" target="_blank">Install Orchestrator with the Command Line</a> .</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">The following command will install all Orchestrator components. Notice that there are several items that need replacement here (Key, ServiceUserName, ServicePassword, and DBServer). I will be discussing the configuration of these in the next posting of this blog series.</span></span></p>
<p style="margin-left:30px;"><em><span style="font-size:small;"><span style="font-family:Calibri;">setup.exe /Silent /Key:&lt;Insert Key&gt; /ServiceUserName:&lt;Insert Service Account&gt; /ServicePassword:&lt;Insert Service Account Password&gt; /Components:All /DbServer:&lt;Insert DB Server Name&gt; /DbNameNew:Orchestrator /WebServicePort:81 /WebConsolePort:82 /OrchestratorRemote /UseMicrosoftUpdate:0 /SendCEIPReports:0 /EnableErrorReporting:never</span></span></em></p>
<p><span style="font-size:small;"><b><span><span style="font-family:Calibri;">Orchestrator Runbook Server:</span></span></b></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">Finally because Tier 2 of this service will contain <strong>only the Orchestrator Runbook Server </strong>component, we will need the commands necessary to install only this component, which can be seen below. The following items will require adjustment below, Key, ServiceUserName, ServicePasword and DBServer.</span></span></p>
<p></p>
<p style="margin-left:30px;"><em><span style="font-size:small;"><span style="font-family:Calibri;">setup.exe /Silent /Key:&lt;Insert Key&gt; /ServiceUserName:&lt;Insert Service Account&gt; /ServicePassword:&lt;Insert Service Account Password&gt; /Components:RunbookServer /DbServer:&lt;Insert DBServer&gt; /DbNameExisting:Orchestrator /OrchestratorRemote /UseMicrosoftUpdate:0 /SendCEIPReports:0 /EnableErrorReporting:never</span></span></em></p>
<p><span style="font-size:small;"><b><span><span style="font-family:Calibri;">Conclusion:</span></span></b></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">At this point we have gathered the prerequisites and in some cases created a few VMM resources that will be needed to pull this Service Template together. To recap these items are:</span></span></p>
<ul>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Tier 1 VHDX (Server 2012 R2 with Prepared SQL Instance)</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Tier 2 VHDX (Server 2012 R2 with no additional components)</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Template for the Tier 1 VM Deployment</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Template for the Tier 2 VM Deployment</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Custom VMM Library Resource containing the Orchestrator Media.</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Commands necessary for an unattended deployment of SQL Server Management Studio (Optional)</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Commands necessary for an unattended deployment of all Orchestrator components</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Commands necessary for a deployment of only the Runbook Server Orchestrator component</span></span></li>
</ul>
<p><span style="font-size:small;font-family:Calibri;">Check back soon, in the next post of this series I will bring this together creating SQL and Application profiles that will be paramount to the deployment of this service.</span></p>]]></content:encoded>
    </item>
    <item>
      <title>VMM Service Deployments in Depth: Deploying System Center Orchestrator as a Service Part 1 - Demonstration</title>
      <link>https://docs.microsoft.com/archive/blogs/neilp/vmm-service-deployments-in-depth-deploying-system-center-orchestrator-as-a-service-part-1-demonstration</link>
      <pubDate>Wed, 15 Jan 2014 06:47:00 GMT</pubDate>
      <dc:creator><![CDATA[Neil Peterson]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/neilp/2014/01/15/vmm-service-deployments-in-depth-deploying-system-center-orchestrator-as-a-service-part-1-demonstration/</guid>
      <description><![CDATA[Quick Blog Description: In this series of postings I will be detailing how to use System Center...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size:small;"><span style="font-family:Calibri;"><b>Quick Blog Description:</b> In this series of postings I will be detailing how to use System Center Virtual Machine Manager to deploy complex applications / services. I will be demonstrating this capability by deploying a System Center Orchestrator instances consisting of multiple virtual machines hosting the Orchestrator components. While my example focuses on Orchestrator, the concepts and most of the core configuration will be applicable for just about any complex service or application deployment with SCVMM.</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;"><b>Introduction to Service Templates</b>: Essentially, Service Templates allow us to rapidly deploy a pre-configured services (application), consisting of one or more virtual machines, managed as a single entity, which can be scaled to match demand. A simple example may be a two tiered application consisting of a SQL Server, and a load balanced web server. As demand for the application increases, the web interface may be scaled out into a three or four NLB cluster. As demand decreases, the service can be scaled back to the initial two node cluster.</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">We configure Service Templates through the use of many resources already familiar to the SCVMM administrator such as virtual hard drives, VM Templates, and other VMM library resources. The service template allows us to configure how many VM&rsquo;s are initially deployed as part of the service deployment, configure applications including SQL Server to be installed at deployment time, as well as to configure other scripts to be execute throughout the deployment. Finally service templates allow us to define thresholds or minimum and maximum instance sizes at which the service can be scaled.</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">My goal with this blog series is to not only provide an example service template, but to also deep dive on the items that need to be completed in order to create your own service templates / deployments. Rather than have one large post to complete this task, I am going to break this post up into the following chunks.</span></span></p>
<ul>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Post 1 (this post) &ndash; Introduction and Video Demonstration</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Post 2 - <a href="/b/neilp/archive/2014/01/16/scvmmservicetemplatespart2.aspx" target="_blank">Prerequisites</a></span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Post&nbsp;3 &ndash; <a href="/b/neilp/archive/2014/01/18/scvmm3.aspx" target="_blank">SQL Server&nbsp;and Application Profiles</a></span></span></li>
<li>Post 4 - <a href="/b/neilp/archive/2014/01/28/scvmm4.aspx" target="_blank">Configuring the Service Deployment</a></li>
</ul>
<p><span style="font-size:small;"><span style="font-family:Calibri;">I hope that you enjoy this series and that you can take some of the lessons that I have learned about rapid service deployment and apply them for your own benefit.</span></span></p>
<p><span style="font-size:small;"><b><span><span style="font-family:Calibri;">Scenario or Example for this Blog:</span></span></b></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">I will be deploying a multi-tier Orchestrator Instance that can be scaled as necessary. My initial deployment needs to consist of one server which contains all Orchestrator roles (Management Server, Database Server, Web Components, Runbook Server). I will then deploy an additional four servers which will each contain an additional Runbook server.</span></span></p>
<p><span style="font-size:small;"><span style="font-family:Calibri;">So my initial deployment will look thusly:</span></span></p>
<ul>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Server 1: All Orchestrator Components (Database Server, Management Server, Web Components, and Runbook Server)</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Server 2: Runbook Server 2</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Server 3: Runbook Server 3</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Server 4: Runbook Server 4</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Server 5: Runbook Server 5</span></span></li>
</ul>
<p><span style="font-size:small;"><span style="font-family:Calibri;">In order to achieve this goal, the following actions need to occur at initial deployment:</span></span></p>
<ul>
<li><span style="font-size:small;"><span style="font-family:Calibri;">5 VM&rsquo;s are deployed</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">SQL Server is deployed to VM1</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">All Orchestrator components are deployed VM1</span></span></li>
<li><span style="font-size:small;"><span style="font-family:Calibri;">Four additional Runbook servers are deployed to the remaining VM&rsquo;s (VM2 &ndash; VM5)</span></span></li>
</ul>
<p><span style="font-size:small;font-family:Calibri;">To close out this introduction I am going to include a video demonstration of this service deployment in action. If you like what you see, stay tuned for the next few blog posting in which I will detail how this deployment was configured.</span></p>
<p></p>
<p><span style="font-size:medium;font-family:Calibri;"><span style="font-size:small;">Direct Link to Video - </span></span><a href="https://youtu.be/_QQLPvURntg">https://youtu.be/_QQLPvURntg</a></p>
<p></p>
<p></p>
<p><span style="font-size:small;font-family:Calibri;">[View:https://youtu.be/_QQLPvURntg:0:0]</span></p>]]></content:encoded>
    </item>
  </channel>
</rss>