<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Chris Childers Blog</title><subtitle type="html" /><id>http://blogs.technet.com/b/chrischilders/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/chrischilders/" /><link rel="self" type="application/atom+xml" href="http://blogs.technet.com/b/chrischilders/atom.aspx" /><generator uri="http://telligent.com" version="5.6.50428.7875">Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><updated>2012-02-12T22:12:00Z</updated><entry><title>Deploying VMM 2012 Service Templates with Powershell</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/chrischilders/archive/2012/03/20/deploying-vmm-2012-service-templates-with-powershell.aspx" /><id>http://blogs.technet.com/b/chrischilders/archive/2012/03/20/deploying-vmm-2012-service-templates-with-powershell.aspx</id><published>2012-03-20T12:21:00Z</published><updated>2012-03-20T12:21:00Z</updated><content type="html">&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;One of the most exciting capabilities in System Center 2012 is the ability to deploy applications using Service Templates.&amp;nbsp; Service templates allow us to define a logical model of an application and its infrastructure requirements.&amp;nbsp; Once we have a Service Template defined in Virtual Machine Manager 2012 (VMM 2012) we can assign who has access deploy it to into a Private Cloud.&amp;nbsp; We typically manually deploy a Service Template via App Controller or the VMM 2012 Console.&amp;nbsp; But what if we want to automate the deployment?&amp;nbsp; We can accomplish this using the VMM 2012 PowerShell Cmdlets.&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;My goal in this post is to provide you with a basic walkthrough of the Cmdlets and sequence needed to deploy a Service Template in VMM 2012 with PowerShell.&amp;nbsp; To illustrate this process, I&amp;rsquo;m using the Stocktrader sample application and Service Template.&amp;nbsp; I&amp;rsquo;m running VMM 2012 RC and I have the Stocktrader sample Service Template imported into my library.&amp;nbsp; My examples do not include error checking and validation that you would want to add in an operational environment.&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Let&amp;rsquo;s jump into the example:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;# We need the VMM Server, &amp;nbsp;Release and Cloud as inputs&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;param([string]$VMMServer, &amp;nbsp;[string]$Release, [string]$CloudName)&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-family: Calibri; font-size: small;" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-family: Calibri; font-size: small;" face="Calibri" size="3"&gt;&lt;b&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;# Check to see if the VMM module is loaded&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;$ImportCheck = Get-Module|where { $_.Name -eq "virtualmachinemanager" }&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;if (-not $ImportCheck){import-module virtualmachinemanager}&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-family: Calibri; font-size: small;" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;# We set the static variables we need.&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;i&gt;$ServiceTemplateName=" Stocktrader Service&lt;/i&gt;&lt;i&gt;"&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;i&gt;$ServiceConfigName = " Stocktrader Service&lt;/i&gt;&lt;i&gt;" &lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;i&gt;$SQLTierConfiguration="*SQL*"&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;i&gt;$WEBTierConfiguration="*WEB*"&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;i&gt;$OPTierConfiguration="*OP*"&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;i&gt;$BSLTierConfiguration="*BSL*"&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;$ParameterList=@()&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;i&gt;$ParameterList+=@{Name="configadmin&lt;/i&gt;&lt;i&gt;";Value="configadmin&lt;/i&gt;&lt;i&gt;"}&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;i&gt;$ParameterList+=@{Name="configadminPassword&lt;/i&gt;&lt;i&gt;";Value="Passw0rd&lt;/i&gt;&lt;i&gt;"}&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-family: Calibri; font-size: small;" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;# Connect to the VMM server&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;$VMMServerObj=Get-SCVMMServer -ComputerName $VMMServer&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-family: Calibri; font-size: small;" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;# First we need to set a variable that references our cloud object.&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;# We use Get-SCCloud to reference the Cloud object that we passed into the script.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;$Cloud = Get-SCCloud -Name $CloudName&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-family: Calibri; font-size: small;" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;# We need to find the correct version of the Service Template that we want to deploy. &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;# We use Get-SCServiceTemplate to find the Stocktrader Service with the correct version number. &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;$ServiceTemplate = Get-SCServiceTemplate -Name "Stocktrader Service"| where { $_.Release -match $Release }&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;i&gt;Get-SCServiceConfiguration -Name $ServiceConfigName | Remove-SCServiceConfiguration&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-family: Calibri; font-size: small;" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;# The next set of commands creates a new Service Configuration object.&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;# By default the Service Configuration will only exist temporarily until the deployment is complete.&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;$ServiceConfig = New-SCServiceConfiguration -ServiceTemplate $ServiceTemplate -Name $ServiceConfigName -Cloud $Cloud&amp;nbsp; -ServicePriority High&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-family: Calibri; font-size: small;" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;# We use Update-SCServiceConfiguration to perform placement on the configuration&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;#If placement fails we stop executing the script&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;$ServiceUpdate = Update-SCServiceConfiguration -VMMServer $VMMServer -ServiceConfiguration $ServiceConfig&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;if($sc.deploymenterrorlist -ne $null)&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Write-Host "Cloud Placement failed for Service Deployment..."&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;# The Stocktrader example requires us to define configuration settings that will be used to deploy an instance of the service.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;# Each application tier needs knowledge of how to communicate to other applications tiers.&amp;nbsp; We also need to define a configuration admin account.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;# The next set of commands sets each ComputerTierConfiguration setting based on the ServiceConfiguration ComputerName generated by the placement engine.&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;$ConfigValue = Get-SCVMConfiguration -ServiceConfiguration $ServiceConfig | where { $_.ComputerTierConfiguration -like $SQLTierConfiguration} &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Get-SCServiceSetting -ServiceConfiguration $ServiceConfig -Name "sqlComputerName" |Set-SCServiceSetting&amp;nbsp; -value $ConfigValue.ComputerName&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-family: Calibri; font-size: small;" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;$ConfigValue = Get-SCVMConfiguration -ServiceConfiguration $ServiceConfig | where { $_.ComputerTierConfiguration -like $WEBTierConfiguration} &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Get-SCServiceSetting -ServiceConfiguration $ServiceConfig -Name "rootWebMachineName" |Set-SCServiceSetting&amp;nbsp; -value $ConfigValue.ComputerName&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-family: Calibri; font-size: small;" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;$ConfigValue = Get-SCVMConfiguration -ServiceConfiguration $ServiceConfig | where { $_.ComputerTierConfiguration -like $OPTierConfiguration} &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Get-SCServiceSetting -ServiceConfiguration $ServiceConfig -Name "rootOPMachineName" |Set-SCServiceSetting&amp;nbsp; -value $ConfigValue.ComputerName&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-family: Calibri; font-size: small;" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;$ConfigValue = Get-SCVMConfiguration -ServiceConfiguration $ServiceConfig | where { $_.ComputerTierConfiguration -like $BSLTierConfiguration} &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Get-SCServiceSetting -ServiceConfiguration $ServiceConfig -Name "rootBSLMachineName" |Set-SCServiceSetting&amp;nbsp; -value $ConfigValue.ComputerName&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-family: Calibri; font-size: small;" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style="font-family: Calibri; font-size: small;" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;# Set the admin user/pass info&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;foreach($Parameter in $ParameterList)&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get-SCServiceSetting -ServiceConfiguration $ServiceConfig -Name $Parameter.Name |Set-SCServiceSetting&amp;nbsp; -value $Parameter.Value&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;# We are ready to create an instance of the service. &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;# We use New-SCService to pass in the ServiceConfiguration and VMM Server.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;i&gt;$NewService = New-SCService -VMMServer $VMMServer -ServiceConfiguration $ServiceConfig&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: small;" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Once I save this script to a file I can run it directly from a Powershell prompt to execute:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PS c:\stocktraderdeploy.ps1&amp;ndash;VMMServer &amp;ldquo;vmm01&amp;rdquo; &amp;ndash;Release &amp;ldquo;1&amp;rdquo;&amp;nbsp; &amp;ndash;CloudName &amp;ldquo;Production&amp;rdquo;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: small;" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Now I have a deployed version 1 of the Stocktrader Service in my Production Cloud!&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;This posting is provided "AS IS" with no warranties, and confers no rights. Use of included utilities are subject to the terms specified at h&lt;a href="http://www.microsoft.com/info/cpyright.htm"&gt;ttp://www.microsoft.com/info/copyright.htm&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3487663" width="1" height="1"&gt;</content><author><name>Chris Childers</name><uri>http://blogs.technet.com/chrischilders/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Monitoring SharePoint 2010 with Operations Manager 2012 APM - Advanced Configuration</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/chrischilders/archive/2012/02/28/monitoring-sharepoint-2010-with-operations-manager-2012-apm-advanced-configuration.aspx" /><id>http://blogs.technet.com/b/chrischilders/archive/2012/02/28/monitoring-sharepoint-2010-with-operations-manager-2012-apm-advanced-configuration.aspx</id><published>2012-02-28T18:44:00Z</published><updated>2012-02-28T18:44:00Z</updated><content type="html">&lt;p&gt;In this video, I walk through some of the advanced configuration options for monitoring SharePoint 2010.&amp;nbsp; This builds on my previous post&amp;nbsp;about &lt;a href="http://blogs.technet.com/b/chrischilders/archive/2012/02/21/monitoring-sharepoint-2010-with-operations-manager-2012-apm.aspx"&gt;Monitoring SharePoint 2010 with Operations Manager 2012 APM&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For more information on Operations Manager 2012 APM templates please visit:&amp;nbsp; &lt;a href="http://technet.microsoft.com/en-us/library/hh457578.aspx."&gt;http://technet.microsoft.com/en-us/library/hh457578.aspx.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This posting is provided "AS IS" with no warranties, and confers no rights. Use of included utilities are subject to the terms specified at h&lt;a href="http://www.microsoft.com/info/cpyright.htm"&gt;ttp://www.microsoft.com/info/copyright.htm&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.technet.com/b/chrischilders/archive/2012/02/28/monitoring-sharepoint-2010-with-operations-manager-2012-apm-advanced-configuration.aspx"&gt;(Please visit the site to view this video)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3483611" width="1" height="1"&gt;</content><author><name>Chris Childers</name><uri>http://blogs.technet.com/chrischilders/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Monitoring SharePoint 2010 with Operations Manager 2012 APM</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/chrischilders/archive/2012/02/21/monitoring-sharepoint-2010-with-operations-manager-2012-apm.aspx" /><id>http://blogs.technet.com/b/chrischilders/archive/2012/02/21/monitoring-sharepoint-2010-with-operations-manager-2012-apm.aspx</id><published>2012-02-21T18:54:00Z</published><updated>2012-02-21T18:54:00Z</updated><content type="html">&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Can Operations Manager 2012 monitor Sharepoint 2010?&amp;nbsp; I get this question on a weekly (if not daily) basis.&amp;nbsp; The answer is yes and no.&amp;nbsp; Yes, OM2012 can monitor server-side page execution in SharePoint 2010 environments.&amp;nbsp; There are some default configuration limitations.&amp;nbsp; We will explore how to do more advanced configuration in a future post.&amp;nbsp; Client-side (browser) monitoring is not supported.&amp;nbsp; In many cases, server-side monitoring will be enough to understand SharePoint health and performance.&amp;nbsp; Let&amp;rsquo;s take a look at the level of information we can get by default.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;For this walkthrough, I&amp;rsquo;m using Operations Manager 2012 Release Candidate and a SharePoint 2010 environment.&amp;nbsp; First, we need to make sure that OM is monitoring the SharePoint host.&amp;nbsp; This will initiate the application discovery process.&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Under Authoring, we create a new Add Monitoring Wizard and Select .NET Application Performance Monitoring.&amp;nbsp; After naming the template, we can search for Web Applications and Services.&amp;nbsp; In my list, the &amp;lsquo;SharePoint -80&amp;rsquo; instance has been discovered.&amp;nbsp; We will add this to the selected objects list.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-92-70/3806.1.png"&gt;&lt;img style="border: 0px currentColor;" src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-92-70/3806.1.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Next we need to specify the server-side settings we will use to monitor the SharePoint environment.&amp;nbsp; In my test environment, I&amp;rsquo;m going to choose the default 15000ms. We can accept the defaults for the rest of the template and click create to generate a monitoring instance.&amp;nbsp; &lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Note:&amp;nbsp; You will need to do an IIS reset on the target SharePoint server(s) in order for APM monitoring to start.&amp;nbsp; Otherwise you will see the &amp;lsquo;Monitored Applications&amp;rsquo; state as &amp;lsquo;Not Monitored&amp;rsquo; in Operations Manager.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-92-70/7245.2.png"&gt;&lt;img style="border: 0px currentColor;" src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-92-70/7245.2.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Once a restart has completed, we need to execute transactions in the SharePoint environment.&amp;nbsp; In my test environment, I simply connect to the SharePoint home page.&amp;nbsp; This page generally takes greater than 15000ms to load on first run (after a reset) and consequently I get performance alerts.&amp;nbsp; You will need to make sure that you set your alerting threshold to a level that will generate alerts.&amp;nbsp; Start with the default and reduce as necessary until alerts are raised.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: small;" size="3" face="Calibri"&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-92-70/5706.3.png"&gt;&lt;img style="border: 0px currentColor;" src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-92-70/5706.3.png" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;The performance alert description indicates that a &amp;ldquo;SitePages/Home.aspx&amp;rdquo; transaction has exceed the 15000ms thresold we defined.&amp;nbsp; Clicking the included link brings us to the diagnostic detail.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-92-70/8345.4.png"&gt;&lt;img style="border: 0px currentColor;" src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-92-70/8345.4.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Inside the alert detail we can see the transaction took 21,783ms to execute.&amp;nbsp; We can also see which server executed this request and the time it was executed.&amp;nbsp; We can also see that 4,433ms of time was taken executing a WCF request.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-92-70/1423.5.png"&gt;&lt;img style="border: 0px currentColor;" src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-92-70/1423.5.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;I&amp;rsquo;ll dive into advanced configuration and how we can enable deeper visibility in an upcoming blog post.&amp;nbsp; As you can see, with a few simple steps we are able to monitor SharePoint 2010 and provide application performance insight.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This posting is provided "AS IS" with no warranties, and confers no rights. Use of included utilities are subject to the terms specified at h&lt;a href="http://www.microsoft.com/info/cpyright.htm"&gt;ttp://www.microsoft.com/info/copyright.htm&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3482314" width="1" height="1"&gt;</content><author><name>Chris Childers</name><uri>http://blogs.technet.com/chrischilders/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Why DevOps Matters</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/chrischilders/archive/2012/02/12/why-devops-matters.aspx" /><id>http://blogs.technet.com/b/chrischilders/archive/2012/02/12/why-devops-matters.aspx</id><published>2012-02-13T03:12:00Z</published><updated>2012-02-13T03:12:00Z</updated><content type="html">&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Do a search on DevOps and you will find a heated debate on whether its real, if it&amp;rsquo;s new or if it matters.&amp;nbsp; I think the question of whether it&amp;rsquo;s real or matters is difficult to argue against.&amp;nbsp; Here&amp;rsquo;s why:&amp;nbsp; business expectations have accelerated; technology is constantly changing and we demand more and we demand it faster. &amp;nbsp;This pressure has cascaded across technology teams and has resulted in a refactoring of our processes, team organization and tools.&amp;nbsp; Need convincing?&amp;nbsp; Look at the agile movement as evidence.&amp;nbsp; Development teams transitioned from a waterfall model to an agile model to accommodate fluid changes in business goals.&amp;nbsp; Is DevOps new?&amp;nbsp; The answer is Yes and No.&amp;nbsp; Yes, as a strategic organizational goal.&amp;nbsp; No, because it is typically perceived internally as a tactical response to specific challenges.&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Whether we agree or disagree that DevOps is new is largely irrelevant.&amp;nbsp; We can agree that business pressure and advances in technology have transformed how we deliver services to our customers.&amp;nbsp; The idea of DevOps is just as the name suggests:&amp;nbsp; alignment between development and operations.&amp;nbsp; Ideally we should call it BizDevOps.&amp;nbsp; Alignment between business goals, development and operations is the real change agent.&amp;nbsp; I&amp;rsquo;ll stick with DevOps for the sake of popularity and acknowledge that business drivers are the catalyst.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;So What Exactly is DevOps?&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;DevOps is about people, process, technology and communication across the application lifecycle.&amp;nbsp; It&amp;rsquo;s about collaboration; it&amp;rsquo;s about efficiency and it&amp;rsquo;s about feedback across the intersection points. &amp;nbsp;Have you ever heard the old adage &amp;ldquo;it worked fine on my dev machine, it must be your server&amp;rdquo;?&amp;nbsp; If so, you have already felt the pain of a breakdown in the lifecycle.&amp;nbsp; These are the types of situations that DevOps looks to address.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;A Look Back:&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;I&amp;rsquo;ve been in the technology world for the last 17 years.&amp;nbsp; In the late 90s I ran a software development project that was responsible for building a client-server application and deploying it worldwide to 100+ locations.&amp;nbsp; Deployment was by far the most costly and painful part of the project.&amp;nbsp; Every location had different implementation requirements and challenges.&amp;nbsp; Development worked in a vacuum to revise requirements and address a constant stream of level 3 type issues.&amp;nbsp; One offs became more and more frequent to accommodate field issues.&amp;nbsp; In short, our waterfall approach and lack of focus beyond development caused us significant pain.&amp;nbsp; Sound familiar?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;During the project, web programming models came into popularity.&amp;nbsp; This new paradigm brought the prospect of centralized management and deployment efficiency.&amp;nbsp; This in turn changed the business economics and forced us to re-think the project. This disruption was good from an economic standpoint.&amp;nbsp; But our organizational structure, methodologies and tools weren&amp;rsquo;t agile enough to capitalize on the full benefit across the software lifecycle.&amp;nbsp; Eventually we got there and we focused on operational success along with the end user requirements.&amp;nbsp; But we weren&amp;rsquo;t well equipped to manage constant change in the process and maintain our deliverables.&amp;nbsp; Luckily this worked in the 90s &amp;hellip; it doesn&amp;rsquo;t work now.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;A Look Forward:&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;I would sum up our world today as one of constant change and delivering services to our customers.&amp;nbsp; Virtualization, cloud computing and automation are re-shaping the future and accelerating our ability to deliver business value.&amp;nbsp; Our world demands agility.&amp;nbsp; We have seen a big shift on the development side with agile methodologies.&amp;nbsp; This has impacted how the business views the development process.&amp;nbsp; We need this same agility and collaboration across the entire lifecycle.&amp;nbsp; It&amp;rsquo;s beginning to happen.&amp;nbsp; Customers are defining roles that focus on the Dev/Ops divide; collaboration is starting to happen across teams and tools are helping to enable this transformation.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;That said, most organizations are far from having the efficient processes, tools and culture in place to effectively capitalize on the constant changes.&amp;nbsp; It&amp;rsquo;s typical to see an emphasis on one area without the others.&amp;nbsp; It requires commitment across the organizations that are involved in delivering technology services and applications.&amp;nbsp; It requires rethinking processes, especially at the intersection points.&amp;nbsp; And it requires leveraging tools to automate and manage.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Private and public cloud strategies are driving a focus on self-service IT, automation and time to market.&amp;nbsp; The goal is to accelerate the delivery of applications and services to meet business demands.&amp;nbsp; Many argue that DevOps becomes irrelevant as we embrace PaaS solutions and abstract the infrastructure.&amp;nbsp; I would argue that we only shift focus and the concept of DevOps becomes even more critical to delivering on the benefits.&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3480437" width="1" height="1"&gt;</content><author><name>Chris Childers</name><uri>http://blogs.technet.com/chrischilders/ProfileUrlRedirect.ashx</uri></author></entry></feed>