<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Tao Yang's System Management BlogTao Yang's System Management Blog</title>
	
	<link>http://blog.tyang.org</link>
	<description>My thoughts on SCOM, SCCM, PowerShell and more...</description>
	<lastBuildDate>Fri, 07 Jun 2013 04:50:12 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/TaoYangsSystemManagementBlog" /><feedburner:info uri="taoyangssystemmanagementblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly></feedburner:browserFriendly><item>
		<title>Finding OpsMgr Management Group Installation Date Using PowerShell</title>
		<link>http://blog.tyang.org/2013/06/07/finding-opsmgr-management-group-installation-date-using-powershell/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=finding-opsmgr-management-group-installation-date-using-powershell</link>
		<comments>http://blog.tyang.org/2013/06/07/finding-opsmgr-management-group-installation-date-using-powershell/#comments</comments>
		<pubDate>Fri, 07 Jun 2013 04:47:29 +0000</pubDate>
		<dc:creator>Tao Yang</dc:creator>
				<category><![CDATA[SCOM]]></category>
		<category><![CDATA[Powershell]]></category>

		<guid isPermaLink="false">http://blog.tyang.org/?p=1955</guid>
		<description><![CDATA[<p>As part of what I’m working on at the moment, I need to find out when the OpsMgr 2012 management group was initially installed using PowerShell (the installation time of the first management server). To do so, I can either use the OpsMgr SDK or the OperationsManager PowerShell module. I’ve developed below scripts to run [...]</p><p>The post <a href="http://blog.tyang.org/2013/06/07/finding-opsmgr-management-group-installation-date-using-powershell/">Finding OpsMgr Management Group Installation Date Using PowerShell</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>As part of what I’m working on at the moment, I need to find out when the OpsMgr 2012 management group was initially installed using PowerShell (the installation time of the first management server).</p>
<p>To do so, I can either use the OpsMgr SDK or the OperationsManager PowerShell module. I’ve developed below scripts to run locally on a management server:</p>
<p><strong>Using SDK:</strong></p>
<pre class="brush: powershell; title: ; notranslate">
$MgmtServer = $Env:COMPUTERNAME
#Connect to SCOM management group
[System.Reflection.Assembly]::LoadWithPartialName(&quot;Microsoft.EnterpriseManagement.OperationsManager.Common&quot;) | Out-Null
[System.Reflection.Assembly]::LoadWithPartialName(&quot;Microsoft.EnterpriseManagement.OperationsManager&quot;) | Out-Null
$MGConnSetting = New-Object Microsoft.EnterpriseManagement.ManagementGroupConnectionSettings($MgmtServer)
$MG = New-Object Microsoft.EnterpriseManagement.ManagementGroup($MGConnSetting)
$MG.GetManagementGroupMonitoringObject()
</pre>
<p><strong>TimeAdded</strong> property indicates the MG initial installation date.</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/06/image.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/06/image_thumb.png" width="580" height="316" border="0" /></a></p>
<p><strong>Using OperationsManager PowerShell module:</strong></p>
<pre class="brush: powershell; title: ; notranslate">
import-module OperationsManager
$mg = Get-SCOMManagementGroup
$mg.GetManagementGroupMonitoringObject() | format-list
</pre>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/06/image1.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/06/image_thumb1.png" width="580" height="359" border="0" /></a></p>
<p>The post <a href="http://blog.tyang.org/2013/06/07/finding-opsmgr-management-group-installation-date-using-powershell/">Finding OpsMgr Management Group Installation Date Using PowerShell</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.tyang.org/2013/06/07/finding-opsmgr-management-group-installation-date-using-powershell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I’m Now a Microsoft Certified Solutions Expert (MCSE): Private Cloud</title>
		<link>http://blog.tyang.org/2013/05/16/im-now-a-microsoft-certified-solutions-expert-mcse-private-cloud/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=im-now-a-microsoft-certified-solutions-expert-mcse-private-cloud</link>
		<comments>http://blog.tyang.org/2013/05/16/im-now-a-microsoft-certified-solutions-expert-mcse-private-cloud/#comments</comments>
		<pubDate>Thu, 16 May 2013 11:44:19 +0000</pubDate>
		<dc:creator>Tao Yang</dc:creator>
				<category><![CDATA[Others]]></category>
		<category><![CDATA[Certification]]></category>
		<category><![CDATA[Training]]></category>

		<guid isPermaLink="false">http://blog.tyang.org/?p=1941</guid>
		<description><![CDATA[<p>Yesterday, I completed the last exam: 70-247: Configuring and Deploying a Private Cloud with System Center 2012. With all the previous exams that I took over last few months, I’m now a MCSE: Private Cloud. Being technical in I.T industry means I always have to keep myself up to date with the latest technologies and [...]</p><p>The post <a href="http://blog.tyang.org/2013/05/16/im-now-a-microsoft-certified-solutions-expert-mcse-private-cloud/">I&rsquo;m Now a Microsoft Certified Solutions Expert (MCSE): Private Cloud</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://blog.tyang.org/wp-content/uploads/2013/05/MCSErgb_1460.png"><img class="alignleft size-full wp-image-1942" alt="MCSE(rgb)_1460" src="http://blog.tyang.org/wp-content/uploads/2013/05/MCSErgb_1460.png" width="252" height="80" /></a>Yesterday, I completed the last exam: 70-247: Configuring and Deploying a Private Cloud with System Center 2012. With all the previous exams that I took over last few months, I’m now a MCSE: Private Cloud.</p>
<p>Being technical in I.T industry means I always have to keep myself up to date with the latest technologies and certifications. 2012 in particular has been very busy for me. Firstly, I became a dad in June, 2012. Secondly, we can all recall how many products that Microsoft has released in 2012! I started studying and preparing for exams around March, April 2012 during my spare time. Now, just a little bit over 1 year, I have completed the following exams during this period:</p>
<p><strong>70-243</strong>: Administering and Deploying System Center 2012 Configuration Manager</p>
<p><strong>70-410</strong>: Installing and Configuring Windows Server 2012</p>
<p><strong>70-411</strong>: Administering Windows Server 2012</p>
<p><strong>70-412</strong>: Configuring Advanced Windows Server 2012 Services</p>
<p><strong>70-246</strong>: Monitoring and Operating a Private Cloud with System Center 2012</p>
<p><strong>70-247</strong>: Configuring and Deploying a Private Cloud with System Center 2012</p>
<p>With these exams, I’ve earned 3 certification:</p>
<ul>
<li><strong>Microsoft Certified Technology Specialist (MCTS): Administering and Deploying System Center 2012 Configuration manager</strong></li>
<li><strong>Microsoft Certified Solutions Associate: Windows Server 2012</strong></li>
<li><strong>Microsoft Certified Solutions Expert: Private Cloud</strong></li>
</ul>
<p>In terms of taking exams, it should be done and dusted for me for a while (unless Microsoft releases other System Center related certificates in the near future).</p>
<p><strong>What’s next?</strong></p>
<p>There are few books that I really want to have a good read, i.e. SCOM 2012 unleashed book and the upcoming Orchestrator Unleashed book. I’m also planning to start working on updating the OpsMgr Self Maintenance management pack very shortly. And with the System Center 2012 upgrade project at work, I will definitely still be very busy.</p>
<p>The post <a href="http://blog.tyang.org/2013/05/16/im-now-a-microsoft-certified-solutions-expert-mcse-private-cloud/">I&rsquo;m Now a Microsoft Certified Solutions Expert (MCSE): Private Cloud</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.tyang.org/2013/05/16/im-now-a-microsoft-certified-solutions-expert-mcse-private-cloud/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Unable to Launch SCVMM 2012 Console</title>
		<link>http://blog.tyang.org/2013/05/07/unable-to-launch-scvmm-2012-console/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=unable-to-launch-scvmm-2012-console</link>
		<comments>http://blog.tyang.org/2013/05/07/unable-to-launch-scvmm-2012-console/#comments</comments>
		<pubDate>Mon, 06 May 2013 14:34:03 +0000</pubDate>
		<dc:creator>Tao Yang</dc:creator>
				<category><![CDATA[SCVMM]]></category>

		<guid isPermaLink="false">http://blog.tyang.org/?p=1931</guid>
		<description><![CDATA[<p>I was planning to continue on my 70-247 exam preparation tonight, but I couldn&#8217;t launch VMM 2012 console from any computers in my lab. So things didn’t turn out as planned. Lucky I’ve figured out the issue now after 4 hours troubleshooting. It’s just passed midnight, still one hour until my bed time, so I [...]</p><p>The post <a href="http://blog.tyang.org/2013/05/07/unable-to-launch-scvmm-2012-console/">Unable to Launch SCVMM 2012 Console</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>I was planning to continue on my 70-247 exam preparation tonight, but I couldn&#8217;t launch VMM 2012 console from any computers in my lab. So things didn’t turn out as planned. Lucky I’ve figured out the issue now after 4 hours troubleshooting. It’s just passed midnight, still one hour until my bed time, so I thought I’ll quickly document the issue.</p>
<p>When I tried to launch VMM using an account with Full Administrator rights, the console got stuck on below screen during load and would not go any further:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/05/image.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/05/image_thumb.png" width="480" height="311" border="0" /></a></p>
<p>I also found out if I use an account which is a member of a Delegated Admin role that I’ve created called “Cloud Admin”, although it also got stuck on this screen, but the console would eventually load after 10-15 minutes.</p>
<p>Long story short, after spent my entire night troubleshooting, I noticed there were few job got stuck on “Running” state by querying the database using below query:</p>
<pre class="brush: sql; title: ; notranslate">
SELECT * FROM [VirtualManagerDB].[dbo].[tbl_TR_TaskTrail] where TaskState = 'Running'
</pre>
<p>All of these running jobs were trying to run the VMM cmdlet <strong>Get-SCOpsMgrConnection</strong>. It seems each of this job is associated to a console connection attempt. I then tried to manually run this cmdlet from a PowerShell console, it also got stuck.</p>
<p>My OpsMgr management group consists 4 management servers and I’ve created a NLB cluster for the Data Access Service. I have configured OpsMgr integration in VMM using the NLB name a while back and the VMM console was working this morning before I went to work. I checked my OpsMgr servers, they are all healthy and I am able to connect to OpsMgr console using the NLB name from a Windows 8 machine. I’m not sure at this stage what’s causing it.</p>
<p>In order to get VMM consoles fixed as soon as possible, I’ve taken the following steps:</p>
<p>1. Kill all VMM console connections via task manager on all the machines that are trying to connect.</p>
<p>2. Restart System Center Virtual Machine Manager service on the VMM server in order to get rid of these running jobs</p>
<p>3. Use PowerShell cmdlet <strong>Remove-SCOpsMgrConnetion –force</strong> to remove the OpsMgr connection</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/05/image4.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/05/image_thumb2.png" width="468" height="202" border="0" /></a></p>
<p>4. Confirm the OpsMgr connection is removed from the database by running below SQL query:</p>
<pre class="brush: sql; title: ; notranslate">
SELECT * FROM tbl_MOM_OMConnection
</pre>
<p>5. I restarted VMM service again just to be safe</p>
<p>Now I can open VMM console from any computers on my network <img class="wlEmoticon wlEmoticon-smile" style="border-style: none;" alt="Smile" src="http://blog.tyang.org/wp-content/uploads/2013/05/wlEmoticon-smile.png" /></p>
<p>I’ll try to add OpsMgr connection back in later. It’s bed time now…</p>
<p>The post <a href="http://blog.tyang.org/2013/05/07/unable-to-launch-scvmm-2012-console/">Unable to Launch SCVMM 2012 Console</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.tyang.org/2013/05/07/unable-to-launch-scvmm-2012-console/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Missing Virtual Machines After An Unexpected Shutdown of Hyper-V Host</title>
		<link>http://blog.tyang.org/2013/04/26/missing-virtual-machines-after-an-unexpected-shutdown-of-hyper-v-host/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=missing-virtual-machines-after-an-unexpected-shutdown-of-hyper-v-host</link>
		<comments>http://blog.tyang.org/2013/04/26/missing-virtual-machines-after-an-unexpected-shutdown-of-hyper-v-host/#comments</comments>
		<pubDate>Thu, 25 Apr 2013 14:14:16 +0000</pubDate>
		<dc:creator>Tao Yang</dc:creator>
				<category><![CDATA[Hyper-V]]></category>

		<guid isPermaLink="false">http://blog.tyang.org/?p=1916</guid>
		<description><![CDATA[<p>I’m not having any luck with computers lately. This is why all my recent posts are related to my troubleshooting experience. Yesterday morning, there were some tradies working in my house fixing a leakage in my shower. I was just about to get in the car leaving home for the MS 70-246 exam, they connected [...]</p><p>The post <a href="http://blog.tyang.org/2013/04/26/missing-virtual-machines-after-an-unexpected-shutdown-of-hyper-v-host/">Missing Virtual Machines After An Unexpected Shutdown of Hyper-V Host</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>I’m not having any luck with computers lately. This is why all my recent posts are related to my troubleshooting experience.</p>
<p>Yesterday morning, there were some tradies working in my house fixing a leakage in my shower. I was just about to get in the car leaving home for the MS 70-246 exam, they connected some tools to a powerpoint and popped the safety switch. Therefore all my computers got shutdown unexpectly. I quickly switch the safety switch back on and left home.</p>
<p>After I came home few hours later, I turned all the computers back on and made sure all VM’s were up and running.</p>
<p>Today is a public holiday in Australia and New Zealand, and since I’ve just passed a exam yesterday after 2 months of study, I was going to spend some time with my daughter and trying to stay away from doing more work in the lab.</p>
<p>Unfortunately, my day didn’t turnout as what I’ve planned. This morning, I noticed there were around 15 VMs missing from one of my Windows Server 2012 Hyper-V hosts. I had 21 VMs running on that box and I could only see 6. all the rest were gone from the Hyper-V console.</p>
<p>On this Hyper-V server (named HYPERV01), there are 3 SATA disks and 2 SSDs hosting VMs. I found out all VMs from 2 out of 3 SATA drives went missing.</p>
<p>I checked <em><strong>C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines</strong></em> and all the symbolic links for VM’s are still there. Below errors were logged in the event log:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image20.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb20.png" width="580" height="249" border="0" /></a></p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image21.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb21.png" width="580" height="191" border="0" /></a></p>
<p>According to <a href="http://support.microsoft.com/kb/2249906">http://support.microsoft.com/kb/2249906</a>, It could be caused by insufficient NTFS permissions. I double, triple checked NTFS permissions, and used icacls command to assign virtual machine SID permission to VHDs and XMLs (as suggested in the KB), it didn’t help.</p>
<p>Another KB, <a href="http://support.microsoft.com/kb/969556">http://support.microsoft.com/kb/969556</a> suggests it’s caused by Intel IPMI driver. Although I’m running Windows Server 2012, not 2008 R2, I still downloaded Intel’s ResetAccess utility as suggested in the KB but it couldn’t run on Windows Server 2012.</p>
<p>KB961804(<a href="http://support.microsoft.com/kb/961804">http://support.microsoft.com/kb/961804</a>) reckons it’s caused by antivirus on access scan and exclusion list. I’m using SCEP (System Center Endpoint Protection) which comes with SCCM 2012. I previously configured exclusion using the Hyper-V antimalware policy template that comes with SCCM, and on top of what’s in the template, I’ve also added few file extensions to the policy (.VHD; .VHDX; .AVHD). However, I didn’t add .XML file type and the path to where VM’s are stored. I couldn’t go to SCCM and fix up the policy – because the Central and the primary site server where my Hyper-V is reporting to are among those 15 missing VM’s.</p>
<p>I didn’t configure to allow users to override SCEP on-access scan settings and exclusion list. So there is no way I could configure SCEP. I’ve then uninstalled SCCM client using “ccmsetup /uninstall” and and uninstalled SCEP agent from Programs and Features in Control panel. I rebooted HYPERV01 after the uninstallation.</p>
<p>After reboot, nothing’s changed. Still not fixed. I then spent next 5-6 hours tried many things including copying all VM’s out of a problematic drive and the reformatted the drive…</p>
<p>I also found in VMM console, the 2 problematic disks (D:\ and E:\) did not show up in the Hyper-V server properties:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image22.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb22.png" width="427" height="634" border="0" /></a></p>
<p>Under the Storage tab, it showed these 2 drives have 0 GB available but in fact, both of them only have around 200 GB data on the 1 TB drives.</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image23.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb23.png" width="580" height="429" border="0" /></a></p>
<p>I tried to re-import the missing VM’s back, but I got this error:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image24.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb24.png" width="470" height="416" border="0" /></a></p>
<p>Finally, at 11:00pm, I managed to fix the issue. I uninstalled “Windows Firewall Configuration Provider” from Programs and Features</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image25.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb25.png" width="580" height="263" border="0" /></a></p>
<p>According to some Google search results, it is a part of SCEP client. After uninstallation and a reboot, all my VM’s appeared in the Hyper-V console:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image26.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb26.png" width="467" height="372" border="0" /></a></p>
<p>For those VMs that were copied back to the formatted drive, I had to configure NTFS permission as per KB2249906 before they could be started (because during the copying processes, the VM SID has lost access). (Tip: use /T switch in icacls command to apply the permission to all files and folders below).</p>
<p>Now I’ll have to put SCCM client back on and re-configure Hyper-V antimalware policy. I’ll leave it to tomorrow…</p>
<p>Anyways, this is how I spent my ANZAC day holiday. Maybe it’s time to get few UPS’s for the lab…</p>
<p>The post <a href="http://blog.tyang.org/2013/04/26/missing-virtual-machines-after-an-unexpected-shutdown-of-hyper-v-host/">Missing Virtual Machines After An Unexpected Shutdown of Hyper-V Host</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.tyang.org/2013/04/26/missing-virtual-machines-after-an-unexpected-shutdown-of-hyper-v-host/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Unable to Select VMM Server in Assign Cloud Resources Wizard in Service Manager</title>
		<link>http://blog.tyang.org/2013/04/18/unable-to-select-vmm-server-in-assign-cloud-resources-wizard-in-service-manager/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=unable-to-select-vmm-server-in-assign-cloud-resources-wizard-in-service-manager</link>
		<comments>http://blog.tyang.org/2013/04/18/unable-to-select-vmm-server-in-assign-cloud-resources-wizard-in-service-manager/#comments</comments>
		<pubDate>Thu, 18 Apr 2013 12:16:08 +0000</pubDate>
		<dc:creator>Tao Yang</dc:creator>
				<category><![CDATA[SCOM]]></category>
		<category><![CDATA[SCSM]]></category>
		<category><![CDATA[SCVMM]]></category>
		<category><![CDATA[CSPP]]></category>
		<category><![CDATA[SCSM SCOM CI Connector]]></category>

		<guid isPermaLink="false">http://blog.tyang.org/?p=1898</guid>
		<description><![CDATA[<p>In the last few days, I’ve been going through the labs from Microsoft’s course 10750A: Monitoring and Operating a Private Cloud with System Center 2012. As part of the lab, I installed the System Center 2012 SP1 version of the Cloud Service Process Pack (CSPP). Last night, I created a Cloud Resources Subscription Request, and [...]</p><p>The post <a href="http://blog.tyang.org/2013/04/18/unable-to-select-vmm-server-in-assign-cloud-resources-wizard-in-service-manager/">Unable to Select VMM Server in Assign Cloud Resources Wizard in Service Manager</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>In the last few days, I’ve been going through the labs from Microsoft’s course <em>10750A: Monitoring and Operating a Private Cloud with System Center 2012</em>. As part of the lab, I installed the System Center 2012 SP1 version of the <a href="http://www.microsoft.com/en-us/download/details.aspx?id=36497">Cloud Service Process Pack</a> (CSPP).</p>
<p>Last night, I created a Cloud Resources Subscription Request, and then tried to assign the cloud resources to this request. While I was going through the “Assign Cloud Resources” wizard, I got stuck because my VMM server does not show up in the drop down list:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image17.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb17.png" width="580" height="407" border="0" /></a></p>
<p>This has really annoyed me as it’s hard for me to find time to study and prepare for the exam with all the stuff going on at work. The only time I can study is from 9:30pm to 1:00am – after my daughter went to bed… the last thing I want to see at 12:00 mid night is an error stop me from going through the lab.</p>
<p>Anyways, after spending some time on google, I found people are having same issues as me and posted the question on the <a href="http://social.technet.microsoft.com/Forums/en-US/privatecloud/thread/edcc7273-2e65-4b12-a7c2-789f6d96fe32/">TechNet forum</a>. As suggested in the forum thread, the issue is the VMM 2012 Discovery management pack.</p>
<p>In my case, this MP was not selected in the SCOM CI connector in Service Manager. I couldn’t select it because it was greyed out in the connector. It was greyed out because the version of the MP loaded in Service Manager was <strong>3.0.6005.0</strong> and the version loaded in OpsMgr is <strong>3.1.6011.0</strong>.</p>
<p>According to <a href="http://social.technet.microsoft.com/wiki/contents/articles/15361.list-of-build-numbers-for-system-center-virtual-machine-manager.aspx">this article</a>, 3.0.6005.0 is the build number for VMM 2012 RTM and 3.1.6011.0 is the build number for VMM 2012 SP1 RTM. Looks like the VMM MP author is trying to match the VMM build version and MP version.</p>
<p>Version <strong>3.0.6005.0</strong> comes with the SP1 version of the Cloud Service Process Pack. Thus this was the one I imported in to Service Manager.</p>
<p>Version <strong>3.1.6011.0</strong> comes with VMM 2012 SP1 installation (located on the VMM server, under &lt;VMM Installation directory&gt;\ManagementPacks directory), and it has been previously imported into my OpsMgr management group.</p>
<p>I also found out the VMM 2012 management pack on Microsoft’s management pack catalog (<a href="http://systemcenter.pinpoint.microsoft.com">http://systemcenter.pinpoint.microsoft.com</a>) is <a href="http://systemcenter.pinpoint.microsoft.com/en-US/applications/Monitoring-Pack-for-System-Center-2012-Virtual-Machine-Manager-12884940307">version 3.0.6019.0</a>, which is different again…</p>
<p>After I imported version 3.1.6011.0 to Service Manager (because it’s the latest version and it’s the version in OpsMgr), I was able to select VMM 2012 Discovery MP in the OpsMgr CI connector:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image18.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb18.png" width="556" height="391" border="0" /></a></p>
<p>I went to bed after I manually kicked off the connector synchronisation, this morning, the VMM server address appeared in the wizard:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image19.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb19.png" width="580" height="410" border="0" /></a></p>
<p>Well, I guess it’s all part of the learning. Since I’m still pretty new to Service Manager, I’m not sure how many people in System Center community already know this issue. This post is more like a note to myself. I’m not sure why Microsoft included a very old version of the VMM MP in the most recent release of the Cloud Service Process Pack (which was only released last month).</p>
<p>The post <a href="http://blog.tyang.org/2013/04/18/unable-to-select-vmm-server-in-assign-cloud-resources-wizard-in-service-manager/">Unable to Select VMM Server in Assign Cloud Resources Wizard in Service Manager</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.tyang.org/2013/04/18/unable-to-select-vmm-server-in-assign-cloud-resources-wizard-in-service-manager/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Failed to Connect to VMM 2012 via Service Manager Connector and Orchestrator VMM Integration Pack</title>
		<link>http://blog.tyang.org/2013/04/14/failed-to-connect-to-vmm-2012-via-service-manager-connector-and-orchestrator-vmm-integration-pack/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=failed-to-connect-to-vmm-2012-via-service-manager-connector-and-orchestrator-vmm-integration-pack</link>
		<comments>http://blog.tyang.org/2013/04/14/failed-to-connect-to-vmm-2012-via-service-manager-connector-and-orchestrator-vmm-integration-pack/#comments</comments>
		<pubDate>Sun, 14 Apr 2013 02:48:11 +0000</pubDate>
		<dc:creator>Tao Yang</dc:creator>
				<category><![CDATA[SC Orchestrator]]></category>
		<category><![CDATA[SCSM]]></category>
		<category><![CDATA[SCVMM]]></category>
		<category><![CDATA[Orchestrator]]></category>

		<guid isPermaLink="false">http://blog.tyang.org/?p=1887</guid>
		<description><![CDATA[<p>I was thinking about how I can make my study room quieter and cooler as I had 4 desktop machines under my desks. The VMM server in my lab was running on a very old PC. Couple of weeks ago I bought a HP Proliant N54L Microserver and rebuilt the VMM server on it. I [...]</p><p>The post <a href="http://blog.tyang.org/2013/04/14/failed-to-connect-to-vmm-2012-via-service-manager-connector-and-orchestrator-vmm-integration-pack/">Failed to Connect to VMM 2012 via Service Manager Connector and Orchestrator VMM Integration Pack</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>I was thinking about how I can make my study room quieter and cooler as I had 4 desktop machines under my desks. The VMM server in my lab was running on a very old PC. Couple of weeks ago I bought a <a href="http://h10010.www1.hp.com/wwpc/uk/en/sm/WF06b/15351-15351-4237916-4237917-4237917-4248009-5336624.html?dnr=1">HP Proliant N54L Microserver</a> and rebuilt the VMM server on it. I put a 128GB SSD (For OS and all the apps), a 1TB SATA (For VMM Library) and 2x4GB DDR3 memory sticks on it, it runs so quiet, I can hardly hear it.</p>
<p>HP Proliant N54L:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/712969-375.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="712969-375" alt="712969-375" src="http://blog.tyang.org/wp-content/uploads/2013/04/712969-375_thumb.png" width="179" height="204" border="0" /></a></p>
<p>&nbsp;</p>
<p>Yesterday, I was going through the labs for Microsoft exam <a href="http://www.microsoft.com/learning/en/us/exam.aspx?id=70-246">70-246: Minotoring and Operating a Private Cloud with System Center 2012</a><em></em> and I ran into issues that I could not create a VMM connector to connect to my new VMM server from Service Manager. I got a very simple error message: <em>“Cannot connect to VMM server &lt;vmm server name&gt;”</em></p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image15.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb16.png" width="515" height="360" border="0" /></a></p>
<p>While I was troubleshooting it, I realised 2 other issues:</p>
<p>1. I couldn’t create a PowerShell remote session to my VMM server using PowerShell command like:</p>
<p><em><strong>New-PSSession –ComputerName &lt;VMM server FQDN&gt; –Credential &lt;Service Manager VMM Connector Account&gt;</strong></em></p>
<p>2. After I have created a connection to the new VMM server in the Orchestrator VMM integration pack, I modified an existing test runbook called “Get Cloud” to use the new connection, and it also failed.</p>
<p>All of these worked fine on the old VMM server, WinRM is configured exactly the same between old and new VMM severs because it configured in a domain GPO.</p>
<p>Both these errors were related to some kind of Kerberos authentication errors. (It was very late at night, I forgot to take screenshots while I was troubleshooting it).</p>
<p>After few hours troubleshooting, I have found the problems:</p>
<p>1. During VMM install, I installed SQL server on the VMM server. I somehow installed SSRS (SQL Server Reporting Services) as well although it’s not required for VMM. I had SSRS running on a service account and I have registered the SPN’s for SSRS (i.e. setspn.exe –A http/&lt;VMM server Name&gt; &lt;Service Account&gt;). I realised SSRS was installed by mistake, so I uninstalled it. As soon as I removed the SPN’s for the http service (for SSRS), PowerShell remote sessions started to work. – because PS Remoting also uses http.</p>
<p>2. I then tried to run the VMM PowerShell cmdlet <strong>Get-SCVMMServer</strong> in the remote shell against the VMM server and I got an error:</p>
<p><em><span style="color: #ff0000;">The type or name syntax of the registry key value IndigoTcpPort under Software\Microsoft\Microsoft System Center Virtual Machine Manager Administrator Console\Settings is incorrect.</span></em></p>
<p>Luckily I found <a href="http://gokhanyildirim.wordpress.com/2012/05/01/the-type-or-name-syntax-of-the-registry-key-value-indigotcpport-under-softwaremicrosoftmicrosoft-system-center-virtual-machine-manager-administrator-consolesettings-is-incorrect/">this blog article</a>. In my VMM server’s registry, the value <strong>IndigoTcpPort</strong> under <em>HKLM\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager Administrator Console\Settings</em> is a REG_SZ (string) with no value configured. After I deleted it and recreated a REG_DWORD with value 1fa4 (which is hexadecimal for 8100), everything started working. The Get-SCVMMServer cmdlet worked fine. Service Manager VMM Connector was successfully created and Orchestrator runbooks were able to run.</p>
<p>So to summarise what I’ve done. I’ve reviewed and removed the SPN’s for http service which were originally created for SSRS, and corrected the “<strong>IndigoTcpPort</strong>” registry value.</p>
<p>It was not how I would like to spend my Saturday night, but I’m glad I’ve got it fixed so I can continue with my study.</p>
<p>The post <a href="http://blog.tyang.org/2013/04/14/failed-to-connect-to-vmm-2012-via-service-manager-connector-and-orchestrator-vmm-integration-pack/">Failed to Connect to VMM 2012 via Service Manager Connector and Orchestrator VMM Integration Pack</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.tyang.org/2013/04/14/failed-to-connect-to-vmm-2012-via-service-manager-connector-and-orchestrator-vmm-integration-pack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpsMgr Alerts Push Notification to iOS (And Android, And Windows Phone) Devices</title>
		<link>http://blog.tyang.org/2013/04/07/opsmgr-alerts-push-notification-to-ios-and-android-and-windows-phone-devices/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=opsmgr-alerts-push-notification-to-ios-and-android-and-windows-phone-devices</link>
		<comments>http://blog.tyang.org/2013/04/07/opsmgr-alerts-push-notification-to-ios-and-android-and-windows-phone-devices/#comments</comments>
		<pubDate>Sat, 06 Apr 2013 14:11:26 +0000</pubDate>
		<dc:creator>Tao Yang</dc:creator>
				<category><![CDATA[SCOM]]></category>
		<category><![CDATA[SCOM Notifications]]></category>

		<guid isPermaLink="false">http://blog.tyang.org/?p=1869</guid>
		<description><![CDATA[<p>Last week, I’ve posted a solution for OpsMgr alerts push notification to Android devices, which was inspired by Stefan Stranger’s post for push notification for Windows Phone devices. Few iPhone lovers at work asked me, “what about iphones?” My response was, “Do I really care?? Why would I spend my time polishing a turd?” But [...]</p><p>The post <a href="http://blog.tyang.org/2013/04/07/opsmgr-alerts-push-notification-to-ios-and-android-and-windows-phone-devices/">OpsMgr Alerts Push Notification to iOS (And Android, And Windows Phone) Devices</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Last week, I’ve posted a solution for <a href="http://blog.tyang.org/2013/03/30/opsmgr-alerts-push-notification-to-android-devices/">OpsMgr alerts push notification to Android devices</a>, which was inspired by Stefan Stranger’s post for push notification for Windows Phone devices. Few iPhone lovers at work asked me, “what about iphones?” My response was, “Do I really care?? Why would I spend my time polishing a turd?”</p>
<p>But then I thought, I might as well do it, just to close the circle. Al though I hate any Apple products (except the old 160GB iPod Classic, which I still use), I’ve spent some time to work out how to do the same for iOS devices &#8211; Because iOS is still the most popular mobile devices out there…</p>
<p>An iPhone user at work told me he uses an iOS app called <a href="http://www.prowlapp.com/">Prowl</a> for his NZB or Sick Beard notifications (I wasn’t really sure exactly, don’t really spend too much time watching TV)…</p>
<p>So I’ve modified the PowerShell script to utilize Prowl API as well.</p>
<p>Luckily my partner has a spare first generation iPad doing nothing because she’s now using an iPad 3, I’m able to use this old iPad for testing.</p>
<p>I’ll now go through the steps to setup Prowl first, the command notification channel is pretty much the same with my previous post (I’ll go through what’s changed).</p>
<p>1. Firstly, buy and download Prowl from Apple App Store for $2.99: <a href="https://itunes.apple.com/us/app/prowl-growl-client/id320876271?mt=8&amp;ign-mpt=uo%3D4">https://itunes.apple.com/us/app/prowl-growl-client/id320876271?mt=8&amp;ign-mpt=uo%3D4</a></p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/IMG_0004.jpg"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="IMG_0004" alt="IMG_0004" src="http://blog.tyang.org/wp-content/uploads/2013/04/IMG_0004_thumb.jpg" width="391" height="294" border="0" /></a></p>
<p>2. Go to Prowl’s website and register an account: <a title="https://www.prowlapp.com/register.php" href="https://www.prowlapp.com/register.php">https://www.prowlapp.com/register.php</a></p>
<p>3. Logon with the account and generate an API Key:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image16.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb15.png" width="456" height="368" border="0" /></a></p>
<p>4. Logon to Prowl on your iOS device.</p>
<p>Now the the iOS device is configured.</p>
<p>Below is the updated PowerShell script used for command notification channel:</p>
<pre class="brush: powershell; title: ; notranslate">
Param($os,$apikey,$alertname,$alertsource,$alertseverity,$alertTimeRaised,$alertdescription)

# Enter the name of the application the notification originates from.
$application = &quot;OM2012&quot;

# Enter The event that occured. Depending on your application, this might be a summary, subject or a brief explanation.
$event = &quot;OM2012 Alert&quot;

Switch ($alertseverity)
{
&quot;2&quot; {$strSeverity = &quot;Critical&quot;}
&quot;1&quot; {$strSeverity = &quot;Warning&quot;}
&quot;0&quot; {$strSeverity = &quot;Information&quot;}
}

# The full body of the notification.
$description = @&quot;
AlertName: $alertname
Source: $alertsource
Severity: $strSeverity
TimeRaised: $alertTimeRaised
Description: $alertDescription
&quot;@

#description maximum length is 10000, truncate it if it's over
If ($description.length -gt 10000)
{
$description = $description.substring(0,10000)
}
#You can enable the write-eventlog for logging purposes.
#write-eventlog -LogName Application -source MSIInstaller -EventId 999 -entrytype Information -Message $description

# An optional value representing the priority of the notification.
$priority = &quot;-2&quot;

# Specifies the responsetype you want. You can currently choose between JSON or XML (default)
$type = &quot;json&quot;
$os = $os.tolower()
Switch ($os)
{
    &quot;android&quot; {$uri = &quot;http://notifymyandroid.com/publicapi/notify?event=$event&amp;priority=$priority&amp;application=$application&amp;description=$description&amp;apikey=$apikey&amp;type=$type&quot;}
    &quot;windows&quot; {$uri = &quot;http://notifymywindowsphone.com/publicapi/notify?event=$event&amp;priority=$priority&amp;application=$application&amp;description=$description&amp;apikey=$apikey&amp;type=$type&quot;}
    &quot;ios&quot; {$uri = &quot;http://api.prowlapp.com/publicapi/add?event=$event&amp;priority=$priority&amp;application=$application&amp;description=$description&amp;apikey=$apikey&amp;type=$type&quot;}
}

#Invoke-WebRequest -Uri $uri
$response = [System.Net.WebRequest]::Create($uri)
$response.GetResponse()
</pre>
<p>The script can also be downloaded <a href="http://blog.tyang.org/wp-content/uploads/2013/04/MobileDevicesPushNotifications.zip">here</a>.</p>
<p>I have made the following changes to the script:</p>
<p>1. Windows PowerShell version 3 is no longer a requirement.</p>
<p>As we all know, Microsoft has removed Windows Management Framework 3.0 update for operating systems earlier than Windows 8 &amp; Server 2012 from WSUS couple of months ago because it breaks many applications including SCCM, SharePoint, etc.. More Info can be found <a href="http://myitforum.com/myitforumwp/2012/12/19/troublesome-wmf-3-0-update-now-expired-for-all-platforms/">here</a>. I saw someone posted a question in System Center Central’s forum wanting to install WMF 3.0 on OpsMgr management servers just to run this script. So I replaced the PowerShell 3.0 cmdlet <strong>Invoke-WebRequest</strong> (which was inherited from Stefan’s original script) with a .NET method in <strong>System.Net.WebRequest</strong>.</p>
<p>2. The original script was displaying alert severity as number (0 = information, 1 = warning, 2 = critical), I’ve updated it to display the actual severity in English rather than number.</p>
<p>3. the $os parameter supports additional value of “ios”.</p>
<p>The command notification setup is exactly the same as the previous version (except OS parameter now supports “ios”):</p>
<p>In my lab, the script is located on <em><strong>D:\Scripts\MobileDevices-Notification</strong></em> on all my management servers, so the setup looks like:</p>
<p><strong>Full path of the command line:</strong></p>
<p>C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe</p>
<p><strong>Command line parameters:</strong></p>
<p><span style="font-family: Arial; font-size: large;">D:\Scripts\MobileDevices-Notification\MobileDevicesPushNotifications.ps1 ‘&lt;mobile device type&gt;’ ‘&lt;API Key&gt;’ ‘$Data/Context/DataItem/AlertName$’ ‘$Data[Default='Not Present']/Context/DataItem/ManagedEntityPath$\$Data[Default='Not Present']/Context/DataItem/ManagedEntityDisplayName$’ ‘$Data/Context/DataItem/Severity$’ ‘$Data/Context/DataItem/TimeRaisedLocal$’ ‘$Data[Default='Not Present']/Context/DataItem/AlertDescription$’</span></p>
<p><strong>Startup Folder:</strong></p>
<p>D:\Scripts\MobileDevices-Notification</p>
<p><strong><span style="color: #ff0000;">Note:</span></strong></p>
<p>The script takes the following parameters (in the correct order):</p>
<p>1. <strong>OS</strong>: support either <span style="color: #ff0000; font-size: large;">“ios”,</span> “android” or “windows”</p>
<p>2. <strong>API key</strong>: generated from either Notify My Windows Phone or Notify My Android website</p>
<p>3. <strong>AlertName</strong></p>
<p>4. <strong>AlertSource</strong>: Addition to Stefan’s script.</p>
<p>5. <strong>AlertSeverity</strong></p>
<p>6. <strong>AlertTimeRaised</strong></p>
<p>7. <strong>Alert Description</strong>: Addition to Stefan’s script.</p>
<p><strong>Command line samples</strong> (assuming the API key is 1111111111111111):</p>
<p><strong>For iOS devices:</strong></p>
<p><span style="font-family: Arial; font-size: large;"><span style="font-size: medium;">D:\Scripts\MobileDevices-Notification\MobileDevicesPushNotifications.ps1 ‘<span style="color: #ff0000;"><strong>ios</strong></span>’ ‘1111111111111111’ ‘$Data/Context/DataItem/AlertName$’ ‘$Data[Default='Not Present']/Context/DataItem/ManagedEntityPath$\$Data[Default='Not Present']/Context/DataItem/ManagedEntityDisplayName$’ ‘$Data/Context/DataItem/Severity$’ ‘$Data/Context/DataItem/TimeRaisedLocal$’ ‘$Data[Default='Not Present']/Context/DataItem/AlertDescription$</span>’</span></p>
<p><strong>For Android devices:</strong></p>
<p><span style="font-family: Arial; font-size: large;"><span style="font-size: medium;">D:\Scripts\MobileDevices-Notification\MobileDevicesPushNotifications.ps1 ‘<strong><span style="color: #ff0000;">android</span></strong>’ ‘1111111111111111’ ‘$Data/Context/DataItem/AlertName$’ ‘$Data[Default='Not Present']/Context/DataItem/ManagedEntityPath$\$Data[Default='Not Present']/Context/DataItem/ManagedEntityDisplayName$’ ‘$Data/Context/DataItem/Severity$’ ‘$Data/Context/DataItem/TimeRaisedLocal$’ ‘$Data[Default='Not Present']/Context/DataItem/AlertDescription$</span>’</span></p>
<p><strong>For Windows phone devices:</strong></p>
<p><span style="font-family: Arial; font-size: large;"><span style="font-size: medium;">D:\Scripts\MobileDevices-Notification\MobileDevicesPushNotifications.ps1 ‘<strong><span style="color: #ff0000;">windows</span></strong>’ ‘1111111111111111’ ‘$Data/Context/DataItem/AlertName$’ ‘$Data[Default='Not Present']/Context/DataItem/ManagedEntityPath$\$Data[Default='Not Present']/Context/DataItem/ManagedEntityDisplayName$’ ‘$Data/Context/DataItem/Severity$’ ‘$Data/Context/DataItem/TimeRaisedLocal$’ ‘$Data[Default='Not Present']/Context/DataItem/AlertDescription$</span>’</span></p>
<p>On my iPad, when an alert has arrived:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/IMG_0007.jpg"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="IMG_0007" alt="IMG_0007" src="http://blog.tyang.org/wp-content/uploads/2013/04/IMG_0007_thumb.jpg" width="399" height="300" border="0" /></a></p>
<p>And I can also see the details once I opened Prowl:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/IMG_0008.jpg"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="IMG_0008" alt="IMG_0008" src="http://blog.tyang.org/wp-content/uploads/2013/04/IMG_0008_thumb.jpg" width="511" height="384" border="0" /></a></p>
<p>Similar to the Android and Windows phone APIs, Prowl has a limitation of 1000 notifications per hour from an IP address. I wouldn’t think any healthy OpsMgr environments would hit that limit.</p>
<p>If you’ve already got the notification channel setup for Android device (from my previous post), you can simply replace the script with the new one. and the same script can be used for iOS and Windows phone devices too.</p>
<h2>Summary</h2>
<p>At this stage, this script would work on all 3 major mobile device types: iOS, Android and Windows Phone by using 3 different push notification API’s:</p>
<p>Windows Phone: <a href="https://notifymywindowsphone.com/">Notify My Windows Phone</a></p>
<p>Android: <a href="https://www.notifymyandroid.com/">Notify My Android</a></p>
<p>iOS: <a href="http://www.prowlapp.com/">Prowl</a></p>
<p>Again, thanks Stefan for his original posts and script. Hopefully this script will be adopted by more people as most of the population is still using iOS and Android devices.</p>
<p>The post <a href="http://blog.tyang.org/2013/04/07/opsmgr-alerts-push-notification-to-ios-and-android-and-windows-phone-devices/">OpsMgr Alerts Push Notification to iOS (And Android, And Windows Phone) Devices</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.tyang.org/2013/04/07/opsmgr-alerts-push-notification-to-ios-and-android-and-windows-phone-devices/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Duplicate OpsMgr Alert Notifications Caused by Service Manager’s OpsMgr Alert Connector And Ways Around It.</title>
		<link>http://blog.tyang.org/2013/04/06/duplicate-opsmgr-alert-notifications-caused-by-service-managers-opsmgr-alert-connector-and-ways-around-it/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=duplicate-opsmgr-alert-notifications-caused-by-service-managers-opsmgr-alert-connector-and-ways-around-it</link>
		<comments>http://blog.tyang.org/2013/04/06/duplicate-opsmgr-alert-notifications-caused-by-service-managers-opsmgr-alert-connector-and-ways-around-it/#comments</comments>
		<pubDate>Sat, 06 Apr 2013 03:26:44 +0000</pubDate>
		<dc:creator>Tao Yang</dc:creator>
				<category><![CDATA[SCOM]]></category>
		<category><![CDATA[SCOM Notifications]]></category>

		<guid isPermaLink="false">http://blog.tyang.org/?p=1851</guid>
		<description><![CDATA[<p>Background Few days ago, I posted an article: OpsMgr Alerts Push Notification to Android Devices. In my lab, I have created a subscription to notify me all new critical alerts using this channel: In the first few days, I wasn’t paying too much attention when every time I get spammed by these push notifications on [...]</p><p>The post <a href="http://blog.tyang.org/2013/04/06/duplicate-opsmgr-alert-notifications-caused-by-service-managers-opsmgr-alert-connector-and-ways-around-it/">Duplicate OpsMgr Alert Notifications Caused by Service Manager&rsquo;s OpsMgr Alert Connector And Ways Around It.</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<h2>Background</h2>
<p>Few days ago, I posted an article: <a href="http://blog.tyang.org/2013/03/30/opsmgr-alerts-push-notification-to-android-devices/">OpsMgr Alerts Push Notification to Android Devices</a>. In my lab, I have created a subscription to notify me all new critical alerts using this channel:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb.png" width="458" height="443" border="0" /></a></p>
<p>In the first few days, I wasn’t paying too much attention when every time I get spammed by these push notifications on my phone, 2 days ago, I realised every new critical alerts gets pushed to my phone twice and two notifications are 1-2 minutes apart:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image1.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb1.png" width="435" height="464" border="0" /></a></p>
<h2>Cause</h2>
<p>After some troubleshooting, I found the Service Manager’s OpsMgr Alert Connector is causing this issue. Well, I wouldn’t say it’s a fault or bug, it’s just the way that OpsMgr alert notifications handles alert.</p>
<p>In my lab, I have configured an OpsMgr Alert Connector in Service Manager. As a result, Service Manager updates the OpsMgr alert with a Ticket ID after the alert is generated:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image2.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb2.png" width="479" height="374" border="0" /></a></p>
<p>And in alert history tab, you can see Service Manager updated the alert soon after it was initially raised:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image3.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb3.png" width="580" height="292" border="0" /></a></p>
<p>Looks like this issue has been identified for a long time. some one has already posted a thread in TechNet forum back in 2009: <a href="http://social.technet.microsoft.com/Forums/en-US/operationsmanagergeneral/thread/4d2f7f8f-c616-483e-a5af-8c77f5d20953/">http://social.technet.microsoft.com/Forums/en-US/operationsmanagergeneral/thread/4d2f7f8f-c616-483e-a5af-8c77f5d20953/</a></p>
<p>OpsMgr alerts get processed by notification subscriptions every time they are updated. i.e. If I take a critical alert with resolution state of “New” and set the resolution state to “New” again in the OpsMgr console, it will get processed again by subscriptions:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image4.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb4.png" width="518" height="291" border="0" /></a></p>
<p>Therefore I wouldn’t blame service manager for this issue.</p>
<h2>Possible Solutions</h2>
<p>I can think of 3 possible solutions:</p>
<p>1. Put a 3 minutes delay in the OpsMgr alert subscription since Service Manager alert connector is configured to check OpsMgr every 60 seconds.</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image5.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb5.png" width="580" height="546" border="0" /></a></p>
<p>2. add another criteria to the alert subscription: with a “%” ticket ID – which means ticket ID must match a wildcard (%).</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image6.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb6.png" width="490" height="302" border="0" /></a></p>
<p>3. Modify the criteria to notify any new critical alert <strong>WITHOUT</strong> a ticket ID.</p>
<p>Each option has it’s pros an cons.</p>
<p>Option 1 would wait Service Manager 3 minutes so it can process the alert first. However, if the alert is generated by a monitor and the monitor has a recovery task, the alert is probably already closed after 3 minutes and you will not get notified. this may not be the desired result.</p>
<p>Option 2 would only pick up alerts that have already been processed by Service Manager. This adds a unnecessary dependency. If for some reasons Service Manager is down, Ticket ID field in the OpsMgr alert will not get updated, therefore alert subscription will not pick up the alert.</p>
<p>To me, Option 3 makes most of the sense. The subscription should only pick up the “brand new” new critical alerts, before Service Manager updates the Ticket ID. – But, it’s not that easy to configure. Why? because I cannot specify conditions like “<strong>and with a NULL ticket ID</strong>” via the OpsMgr Console. As you can see below, I can only specify a wildcard match to ticket ID:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image7.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb7.png" width="495" height="213" border="0" /></a></p>
<p>Luckily I can do this outside of the console, by directly modifying the OpsMgr “Notification Internal Library” MP. Kevin Holman has an excellent blog post on this topic: <a href="http://blogs.technet.com/b/kevinholman/archive/2008/10/12/creating-granular-alert-notifications-rule-by-rule-monitor-by-monitor.aspx">Creating granular alert notifications &#8211; rule by rule, monitor by monitor</a>.</p>
<p>So I’ve decided that I’m going to go for option 3. I’ll now go through the steps I took to modify the existing alert subscription.</p>
<p>1. Export <strong>AND BACKUP</strong> the “Notification Internal Library” MP from the OpsMgr console (Microsoft.SystemCenter.Notifications.Internal.xml)</p>
<p>2. Open Microsoft.SystemCenter.Notifications.Internal.xml with a text editor (i.e. <a href="http://notepad-plus-plus.org/">Notepad++</a>).</p>
<p>3. Towards the end of the file, in the &lt;LanguagePack&gt; section, find the &lt;DisplayString&gt; associated to the subscription. Make sure the Name in &lt;Name&gt; tag matches the subscription name in the OpsMgr console, and ElementID starts with “subscription”</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image8.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb8.png" width="508" height="296" border="0" /></a></p>
<p>4. Change the name in &lt;Name&gt; tag, add “-Do Not Change In UI” at the end (As shown above). this is to remind anyone not to change this subscription in the Operations console after it’s imported back.</p>
<p>5. Find the Rule with the same ID as the ElementID for the &lt;DisplayString&gt; taken from step 3. The rule should be under &lt;Monitoring&gt;&lt;Rules&gt; tags.</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image9.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb9.png" width="580" height="191" border="0" /></a></p>
<p>6. Modify the DataSource module of this rule, Add below expression in &lt;Expressions&gt;&lt;And&gt; tag:</p>
<p><span style="color: #ff0000;">&lt;Expression&gt;<br />
&lt;UnaryExpression&gt;<br />
&lt;ValueExpression&gt;<br />
&lt;Property&gt;TicketId&lt;/Property&gt;<br />
&lt;/ValueExpression&gt;<br />
&lt;Operator&gt;IsNull&lt;/Operator&gt;<br />
&lt;/UnaryExpression&gt;<br />
&lt;/Expression&gt;</span></p>
<p><strong>Before:</strong></p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image10.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb10.png" width="565" height="585" border="0" /></a></p>
<p><strong>After:</strong></p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image11.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb11.png" width="565" height="724" border="0" /></a></p>
<p>7. Save the changes and import the MP back to OpsMgr management group.</p>
<p>8. Wait few minutes for the new configuration to become active. Once it’s active, you will no longer see the criteria in operations console:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image12.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb12.png" width="580" height="194" border="0" /></a></p>
<p>Now, when I test this notification by creating a critical alert (using a <a href="http://support.microsoft.com/kb/934756">test alert generating rule</a> I’ve configured previously), I only get 1 notification pushed out to my phone (and it was pushed out before Service Manager updated it):</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image13.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb13.png" width="447" height="393" border="0" /></a></p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/04/image14.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/04/image_thumb14.png" width="580" height="263" border="0" /></a></p>
<h2>More Information</h2>
<p><strong>MP Schema Reference:</strong></p>
<p>ExpressionType: <a href="http://msdn.microsoft.com/en-us/library/ee692979.aspx">http://msdn.microsoft.com/en-us/library/ee692979.aspx</a></p>
<p>ExpressionType (GroupPopulationSchema): <a href="http://msdn.microsoft.com/en-us/library/ff472337.aspx">http://msdn.microsoft.com/en-us/library/ff472337.aspx</a></p>
<p><strong><span style="color: #ff0000; font-size: large;">Note:</span></strong> I used UnaryExpression, which is only listed in GroupPopulation Schema ExpressionType. but it worked in this scenario.</p>
<p><strong>Related Blog Articles:</strong></p>
<p>Using Expressions and Wildcards to create groups, author rules and monitors, create console views and notification subscriptions, and in the Command Shell: <a href="http://blogs.technet.com/b/jonathanalmquist/archive/2010/10/13/regular-expression-syntax-in-scom-for-filtering-groups-monitor-elements-operational-views-notification-subscriptions-etc.aspx">http://blogs.technet.com/b/jonathanalmquist/archive/2010/10/13/regular-expression-syntax-in-scom-for-filtering-groups-monitor-elements-operational-views-notification-subscriptions-etc.aspx</a></p>
<p>Creating granular alert notifications &#8211; rule by rule, monitor by monitor: <a href="http://blogs.technet.com/b/kevinholman/archive/2008/10/12/creating-granular-alert-notifications-rule-by-rule-monitor-by-monitor.aspx">http://blogs.technet.com/b/kevinholman/archive/2008/10/12/creating-granular-alert-notifications-rule-by-rule-monitor-by-monitor.aspx</a></p>
<p>The post <a href="http://blog.tyang.org/2013/04/06/duplicate-opsmgr-alert-notifications-caused-by-service-managers-opsmgr-alert-connector-and-ways-around-it/">Duplicate OpsMgr Alert Notifications Caused by Service Manager&rsquo;s OpsMgr Alert Connector And Ways Around It.</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.tyang.org/2013/04/06/duplicate-opsmgr-alert-notifications-caused-by-service-managers-opsmgr-alert-connector-and-ways-around-it/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>OpsMgr Alerts Push Notification to Android Devices</title>
		<link>http://blog.tyang.org/2013/03/30/opsmgr-alerts-push-notification-to-android-devices/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=opsmgr-alerts-push-notification-to-android-devices</link>
		<comments>http://blog.tyang.org/2013/03/30/opsmgr-alerts-push-notification-to-android-devices/#comments</comments>
		<pubDate>Sat, 30 Mar 2013 13:56:13 +0000</pubDate>
		<dc:creator>Tao Yang</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SCOM]]></category>
		<category><![CDATA[SCOM Notifications]]></category>

		<guid isPermaLink="false">http://blog.tyang.org/?p=1816</guid>
		<description><![CDATA[<p>Update 07 April 2013: I&#8217;ve updated this script again to support iOS devices and removed the requirements for PowerShell version 3. The updated script can be found here here. Background Stefan Stranger has written a 2-part blog post on how to use Windows Phone push notification for OpsMgr alerts. Stefan’s posts can be found here: [...]</p><p>The post <a href="http://blog.tyang.org/2013/03/30/opsmgr-alerts-push-notification-to-android-devices/">OpsMgr Alerts Push Notification to Android Devices</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><span style="color: #ff0000;"><strong>Update 07 April 2013:</strong></span> I&#8217;ve updated this script again to support iOS devices and removed the requirements for PowerShell version 3. The updated script can be found here <a href="http://blog.tyang.org/2013/04/07/opsmgr-alerts-push-notification-to-ios-and-android-and-windows-phone-devices/">here</a>.</p>
<h2>Background</h2>
<p>Stefan Stranger has written a 2-part blog post on how to use Windows Phone push notification for OpsMgr alerts. Stefan’s posts can be found here:</p>
<p><a href="http://blogs.technet.com/b/stefan_stranger/archive/2013/01/05/windows-phone-push-notifications-for-your-opsmgr-alerts-part-1.aspx">Part 1</a></p>
<p><a href="http://blogs.technet.com/b/stefan_stranger/archive/2013/01/07/windows-phone-push-notifications-for-your-opsmgr-alerts-part-2.aspx">Part 2</a></p>
<p>I got so excited about this idea, but I’m a big fan for Android when comes to mobile devices. I am currently using a Samsung Galaxy Nexus phone and a Samsung Galaxy Tab 2 10.1 tablet – both of them are Android devices. So I’ve spent some time to see if I can do the same for Android devices.</p>
<p>It turned out, there is also an app for Android devices, called “<a href="https://www.notifymyandroid.com/">Notify My Android</a>” <img class="wlEmoticon wlEmoticon-smile" style="border-style: none;" alt="Smile" src="http://blog.tyang.org/wp-content/uploads/2013/03/wlEmoticon-smile1.png" />. And the API’s for both apps are the same.</p>
<h2>Setup Instructions</h2>
<p>It’s pretty much the same way to get this setup for Android devices. I’ll now go through the steps to configure push notification for Android devices (and also for Windows Phones):</p>
<p>1. Install <em>“Notify My Android”</em> on Android devices via <a href="https://play.google.com/store/apps/details?id=com.usk.app.notifymyandroid">Google Play</a></p>
<p>2. Sign up – either from android device or from <a href="https://notifiymyandroid.com">https://notifiymyandroid.com</a></p>
<p>3. Generate an API key from <a href="https://notifymyandroid.com">https://notifymyandroid.com</a>, under “My Account”</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/03/image18.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/03/image_thumb17.png" width="580" height="381" border="0" /></a></p>
<p><span style="color: #ff0000;"><strong>Note:</strong></span></p>
<p><em>Stefan mentioned the “Notify My Windows Phone” app costs $1.99. “Notify My Android” app is actually free from Google Play, HOWEVER, after you’ve signed up, your account is only a trail account. the limitation for the trail accounts is that you only get 5 push notifications per day. Premium account has removed this limit It costs one-off payment of $4.99 to upgrade to premium account. the upgrade payment can either be made via Google Play on your android devices or using PayPal via the website. I upgraded my account via Google Play (as I thought it’s easier than using PayPal).</em></p>
<p><em>As I have 2 Android devices, I don’t need to create multiple accounts or generate multiple API keys. Once I’ve logged in on both devices using my premium account, the push notifications get delivered to both devices at the same time.</em></p>
<p>4. copy <a href="http://blog.tyang.org/wp-content/uploads/2013/03/MobileDevicesPushNotifications.zip">this script</a> to a unique location on all OpsMgr management servers in the Notifications Resource Pool (by default, this resource pool contains all management servers). In my lab, I have copied the script to <em><strong>D:\Scripts\MobileDevices-Notification</strong></em> on all my management servers. Below is what my updated script look like:</p>
<pre class="brush: powershell; title: ; notranslate">
#Requires -Version 3

Param($os,$apikey,$alertname,$alertsource,$alertseverity,$alertTimeRaised,$alertdescription)

# Enter the name of the application the notification originates from.
$application = &quot;OM2012&quot;

# Enter The event that occured. Depending on your application, this might be a summary, subject or a brief explanation.
$event = &quot;OM2012 Alert&quot;

# The full body of the notification.
$description = @&quot;
AlertName: $alertname
Source: $alertsource
Severity: $alertseverity
TimeRaised: $alertTimeRaised
Description: $alertDescription
&quot;@

#description maximum length is 10000, truncate it if it's over
If ($description.length -gt 10000)
{
$description = $description.substring(0,10000)
}
#You can enable the write-eventlog for logging purposes.
#write-eventlog -LogName Application -source MSIInstaller -EventId 999 -entrytype Information -Message $description

# An optional value representing the priority of the notification.
$priority = &quot;-2&quot;

# Specifies the responsetype you want. You can currently choose between JSON or XML (default)
$type = &quot;json&quot;
$os = $os.tolower()
Switch ($os)
{
&quot;android&quot; {$uri = &quot;http://notifymyandroid.com/publicapi/notify?event=$event&amp;priority=$priority&amp;application=$application&amp;description=$description&amp;apikey=$apikey&amp;type=$type&quot;}
&quot;windows&quot; {$uri = &quot;http://notifymywindowsphone.com/publicapi/notify?event=$event&amp;priority=$priority&amp;application=$application&amp;description=$description&amp;apikey=$apikey&amp;type=$type&quot;}
}

Invoke-WebRequest -Uri $uri
</pre>
<p>I’ve modified Stefan’s script (used in OpsMgr command notification channel) a little bit. Below is a list of what’s changed in my version of the script:</p>
<ul>
<li>supports both Windows Phone’s “Notify My Windows Phone” app and Android’s “Notify My Android” app.</li>
<li>Script is more generic as the API key is not hardcoded in the script, instead, it’s passed into the the script as a parameter.</li>
<li>Push notification messages contain additional alert information – alert source, alert description. – As both app’s API’s supports maximum 10,000 characters in notification description, the script will truncate the message to 10,000 characters if it’s over the limit.</li>
<li>Additional parameters are required to be passed into the script. – therefore the OpsMgr command channel is different than Stefan’s version.</li>
</ul>
<p>5. Setup command notification channel:</p>
<p><strong>Full path of the command line:</strong></p>
<p>C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe</p>
<p><strong>Command line parameters:</strong></p>
<p>D:\Scripts\MobileDevices-Notification\MobileDevicesPushNotifications.ps1 &#8216;&lt;mobile device type&gt;&#8217; &#8216;&lt;API Key&gt;&#8217; &#8216;$Data/Context/DataItem/AlertName$&#8217; &#8216;$Data[Default='Not Present']/Context/DataItem/ManagedEntityPath$\$Data[Default='Not Present']/Context/DataItem/ManagedEntityDisplayName$&#8217; &#8216;$Data/Context/DataItem/Severity$&#8217; &#8216;$Data/Context/DataItem/TimeRaisedLocal$&#8217; &#8216;$Data[Default='Not Present']/Context/DataItem/AlertDescription$&#8217;</p>
<p><strong>Startup Folder:</strong></p>
<p>D:\Scripts\MobileDevices-Notification</p>
<p><strong><span style="color: #ff0000;">Note:</span></strong></p>
<p>The script takes the following parameters (in the correct order):</p>
<p>1. <strong>OS</strong>: support either “android” or “windows”</p>
<p>2. <strong>API key</strong>: generated from either Notify My Windows Phone or Notify My Android website</p>
<p>3. <strong>AlertName</strong></p>
<p>4. <strong>AlertSource</strong>: Addition to Stefan’s script.</p>
<p>5. <strong>AlertSeverity</strong></p>
<p>6. <strong>AlertTimeRaised</strong></p>
<p>7. <strong>Alert Description</strong>: Addition to Stefan’s script.</p>
<p>The command line parameter can be populated by using pre-defined OpsMgr variables:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/03/image19.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/03/image_thumb18.png" width="580" height="429" border="0" /></a></p>
<p>6. Follow <a href="http://blogs.technet.com/b/stefan_stranger/archive/2013/01/07/windows-phone-push-notifications-for-your-opsmgr-alerts-part-2.aspx">Part 2</a> of Stefan’s original post to setup Subscriber and Subscriptions.</p>
<p>I cannot test my version of the script against Windows phones because I don’t have one. But I’m fairly confident it should work. From what I can see, the API’s for both apps are exactly the same. Well, the only difference is the URL’s for API calls:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/03/image20.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/03/image_thumb19.png" width="580" height="83" border="0" /></a></p>
<p>I think in real world, this is a very cost effective solution for alerts notification to mobile devices. According to the API documentations, multiple API keys can be used in a single API call. When using multiple API keys, the API keys needs to be separated by comma. Again, I have not tested this scenario against my script because I don’t really want to spend another $4.99 for another premium account.</p>
<p>If it’s required to setup push notification to multiple people (different mobile devices types, different notify app accounts and different Microsoft / Google accounts, thus different API keys), separate command notification channels need to be created (one per API key or group of API keys).</p>
<p>Below are what I get on my Android devices:</p>
<p>On the phone:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/03/Screenshot_2013-03-31-00-33-07.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="Screenshot_2013-03-31-00-33-07" alt="Screenshot_2013-03-31-00-33-07" src="http://blog.tyang.org/wp-content/uploads/2013/03/Screenshot_2013-03-31-00-33-07_thumb.png" width="413" height="731" border="0" /></a></p>
<p>On the tablet:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/03/Screenshot_2013-03-31-00-37-03.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="Screenshot_2013-03-31-00-37-03" alt="Screenshot_2013-03-31-00-37-03" src="http://blog.tyang.org/wp-content/uploads/2013/03/Screenshot_2013-03-31-00-37-03_thumb.png" width="580" height="364" border="0" /></a></p>
<h2>Limitations</h2>
<p>According the the FAQ pages on both websites, there are some limitations that are worth mentioning:</p>
<p><strong>Notify My Windows Phone:</strong></p>
<p>Are there any limitations to the amount of messages I can send?</p>
<p>Yes &#8211; The Microsoft Push Notification Service throttles notifications at 500 per 24 hours per device. The messages will however be stored temporarily at NotifyMyWindowsPhone, so they can be retrieved manually by hitting refresh from within the Windows Phone App.</p>
<p><strong>Notify My Android:</strong></p>
<p>Is there a rate limit for using the public API?</p>
<p>Yes. Right now the limit is set to 800 API calls per hour from a given IP. Remember that you can notify multiple API keys on a single API call. Please check the <a href="https://www.notifymyandroid.com/api.jsp">API documentation</a> for more details. Very few applications managed to reach that limit so far, but if you hit the cap too often, feel free to <a href="mailto:support@notifymyandroid.com">contact us</a> and ask for a developer key.</p>
<p>In my opinion, if you get over 500 messages a day on your Windows phone or 800 in one hour on android devices, there are something seriously wrong with your infrastructure <img class="wlEmoticon wlEmoticon-sadsmile" style="border-style: none;" alt="Sad smile" src="http://blog.tyang.org/wp-content/uploads/2013/03/wlEmoticon-sadsmile.png" /> or you might want to re-configure alert subscriptions to only notify really critical alerts.</p>
<h2>Credit</h2>
<p>Big thanks to Stefan for providing such an wonderful solution in the first place. <img class="wlEmoticon wlEmoticon-thumbsup" style="border-style: none;" alt="Thumbs up" src="http://blog.tyang.org/wp-content/uploads/2013/03/wlEmoticon-thumbsup.png" /></p>
<p>The post <a href="http://blog.tyang.org/2013/03/30/opsmgr-alerts-push-notification-to-android-devices/">OpsMgr Alerts Push Notification to Android Devices</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.tyang.org/2013/03/30/opsmgr-alerts-push-notification-to-android-devices/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>OpsMgr Weather Monitoring MP Updated</title>
		<link>http://blog.tyang.org/2013/03/16/opsmgr-weather-monitoring-mp-updated/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=opsmgr-weather-monitoring-mp-updated</link>
		<comments>http://blog.tyang.org/2013/03/16/opsmgr-weather-monitoring-mp-updated/#comments</comments>
		<pubDate>Sat, 16 Mar 2013 11:06:33 +0000</pubDate>
		<dc:creator>Tao Yang</dc:creator>
				<category><![CDATA[SCOM]]></category>
		<category><![CDATA[Management Pack]]></category>
		<category><![CDATA[MP Authoring]]></category>

		<guid isPermaLink="false">http://blog.tyang.org/?p=1792</guid>
		<description><![CDATA[<p>I got an email from someone up in Sweden the other day in regards to the Weather Monitoring MP that I released few months ago. I’ve been made aware that a negative temperature reading is being recorded as a positive value (i.e. –8 degrees is being collected as 8 degrees). First of all, apologies for [...]</p><p>The post <a href="http://blog.tyang.org/2013/03/16/opsmgr-weather-monitoring-mp-updated/">OpsMgr Weather Monitoring MP Updated</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>I got an email from someone up in Sweden the other day in regards to the <a href="http://blog.tyang.org/2012/10/25/monitoring-weather-conditions-using-scom/">Weather Monitoring MP</a> that I released few months ago. I’ve been made aware that a negative temperature reading is being recorded as a positive value (i.e. –8 degrees is being collected as 8 degrees).</p>
<p>First of all, apologies for this mistake. I wrote the PowerShell script for the probe action module back in July last year, when most of world was in summer. I didn’t even think about negative values and I couldn’t test it anyway…</p>
<p>Last night, I spent some time fixing the management pack. As I was fixing the code, I also found few other issues due to in consistencies in <a href="http://www.webservicex.net">www.webservicex.net</a> (where the MP is getting the data from). for example, some locations have decimal points in temperature value (i.e. Vancouver, Canada), some locations have multiple &lt;Wind&gt; tags in the return data, etc. oh well, webservicex is a free service so there’s no point bagging them for inconsistencies.</p>
<p>Below is a list of bugs that are fixed in this release (1.0.1.0):</p>
<ul>
<li>Incorrect temperature collected when the reading is below zero</li>
<li>Incorrect temperature collected when the reading contains decimal points</li>
<li>script error when pressure reading is not within &lt;pressure&gt; tag (i.e. Vancouver, Canada uses &lt;PressureTendency&gt; tag). in this situation, pressure reading is not probed.</li>
<li>fixed wind direction and speed probe when there are multiple &lt;Wind&gt; tags in the result.</li>
<li>Agent task not displaying wind speed in KM/H</li>
<li>Updated temperature related performance views to display negative temperature readings.</li>
</ul>
<p><strong><span style="color: #ff0000;">Note:</span></strong></p>
<p>I’ve updated below 4 temperature related performance views so they can display negative values:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/03/image16.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/03/image_thumb15.png" width="270" height="199" border="0" /></a></p>
<p>The Y-Axis range is set to –130 to 134 (degrees) for Imperial Unit (Fahrenheit) and –90 to 57 (degrees) for Metric Unit (Celsius). According to <a href="http://en.wikipedia.org/wiki/List_of_weather_records">Wikipedia</a>, these figures are the highest and lowest temperature ever recorded on this plant. They can be customised by right clicking the view and choose “Personalize view…”:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/03/image17.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/03/image_thumb16.png" width="530" height="289" border="0" /></a></p>
<p>the updated MP can be downloaded <a href="http://blog.tyang.org/wp-content/uploads/2013/03/TYANG.Weather.Monitoring.v1.0.1.0.zip">HERE</a>. The download link from the <a href="http://blog.tyang.org/2012/10/25/monitoring-weather-conditions-using-scom/">original post</a> is also updated.</p>
<p>The post <a href="http://blog.tyang.org/2013/03/16/opsmgr-weather-monitoring-mp-updated/">OpsMgr Weather Monitoring MP Updated</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.tyang.org/2013/03/16/opsmgr-weather-monitoring-mp-updated/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>“Data Aggregation” field became empty in OpsMgr 2007 linked Performance Report</title>
		<link>http://blog.tyang.org/2013/03/13/data-aggregation-field-became-empty-in-opsmgr-2007-linked-performance-report/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=data-aggregation-field-became-empty-in-opsmgr-2007-linked-performance-report</link>
		<comments>http://blog.tyang.org/2013/03/13/data-aggregation-field-became-empty-in-opsmgr-2007-linked-performance-report/#comments</comments>
		<pubDate>Wed, 13 Mar 2013 12:15:10 +0000</pubDate>
		<dc:creator>Tao Yang</dc:creator>
				<category><![CDATA[SCOM]]></category>
		<category><![CDATA[SCOM Reporting]]></category>

		<guid isPermaLink="false">http://blog.tyang.org/?p=1779</guid>
		<description><![CDATA[<p>Today I needed to change some parameters in a linked performance report in one of the OpsMgr 2007 R2 management groups at work. When I opened the report property, the Data Aggregation field somehow became blank and greyed out: As the result, when I tried to run the report, I get this error: I found [...]</p><p>The post <a href="http://blog.tyang.org/2013/03/13/data-aggregation-field-became-empty-in-opsmgr-2007-linked-performance-report/">&ldquo;Data Aggregation&rdquo; field became empty in OpsMgr 2007 linked Performance Report</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Today I needed to change some parameters in a linked performance report in one of the OpsMgr 2007 R2 management groups at work. When I opened the report property, the Data Aggregation field somehow became blank and greyed out:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/03/image9.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/03/image_thumb8.png" width="378" height="308" border="0" /></a></p>
<p>As the result, when I tried to run the report, I get this error:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/03/image10.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/03/image_thumb9.png" width="488" height="173" border="0" /></a></p>
<p>I found a blog article from Dieter Wijckmans “<a href="http://scug.be/dieter/2011/05/16/scom-2007-scheduled-reports-failing/">SCOM 2007: Scheduled reports failing</a>”, it indicates it’s because there are duplicate management group ID specified in the report parameters. Dieter’s fix doesn’t really apply to me as the my report is not a scheduled report, however, my approach is much easier.</p>
<p>below is what I’ve done:</p>
<p>1. log on to the RMS box, and run below PowerShell script to get the management group ID:</p>
<pre class="brush: powershell; title: ; notranslate">
$RMS = $env:computername
[System.Reflection.Assembly]::LoadWithPartialName(&quot;Microsoft.EnterpriseManagement.OperationsManager.Common&quot;) | Out-Null
[System.Reflection.Assembly]::LoadWithPartialName(&quot;Microsoft.EnterpriseManagement.OperationsManager&quot;) | Out-Null

$MGConnSetting = New-Object Microsoft.EnterpriseManagement.ManagementGroupConnectionSettings($RMS)
$MG = New-Object Microsoft.EnterpriseManagement.ManagementGroup($MGConnSetting)
$MG.Id
</pre>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/03/image11.png"><img style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/03/image_thumb10.png" width="442" height="223" border="0" /></a></p>
<p><span style="color: #ff0000;">Note:</span></p>
<p>If RMS is clustered, replace &#8220;<em><strong>$env:computername</strong></em>” to the RMS cluster name in the first line.</p>
<p>2. export the management pack (assuming the linked report is stored in a unsealed MP), open the unsealed MP in a text editor</p>
<p>3. Go to</p>
<p>&lt;Reporting&gt;</p>
<p>&lt;LinkedReports&gt;</p>
<p>&lt;LinkedReport ID= (where ID is the Id of the problematic report)</p>
<p>&lt;Parameters&gt;</p>
<p>Find the ManagementGroupId parameter and delete the incorrect value</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/03/image12.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/03/image_thumb11.png" width="578" height="272" border="0" /></a></p>
<p>4. Save the XML and import the unsealed MP back to the management group.</p>
<p>After importing the MP back, the “Data Aggregation” field is populated:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/03/image13.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/03/image_thumb12.png" width="518" height="317" border="0" /></a></p>
<p><strong><span style="color: #ff0000;">Note:</span></strong></p>
<p>I can also change the report parameter in SSRS web site:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/03/image14.png"><img style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/03/image_thumb13.png" width="377" height="176" border="0" /></a></p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/03/image15.png"><img style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/03/image_thumb14.png" width="580" height="311" border="0" /></a></p>
<p>However, by directly modifying report in SSRS, the fix is only temporary. the original MP is not fixed and it will over write the report definition in SSRS. I’ve tried to update SSRS directly, the report got changed back shortly after.</p>
<p>The post <a href="http://blog.tyang.org/2013/03/13/data-aggregation-field-became-empty-in-opsmgr-2007-linked-performance-report/">&ldquo;Data Aggregation&rdquo; field became empty in OpsMgr 2007 linked Performance Report</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.tyang.org/2013/03/13/data-aggregation-field-became-empty-in-opsmgr-2007-linked-performance-report/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>OpsMgr 2012 App Advisor Web Console Failed To Run Reports After DW Database Move</title>
		<link>http://blog.tyang.org/2013/03/12/opsmgr-2012-app-advisor-web-console-failed-to-run-reports-after-dw-database-move/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=opsmgr-2012-app-advisor-web-console-failed-to-run-reports-after-dw-database-move</link>
		<comments>http://blog.tyang.org/2013/03/12/opsmgr-2012-app-advisor-web-console-failed-to-run-reports-after-dw-database-move/#comments</comments>
		<pubDate>Tue, 12 Mar 2013 10:12:14 +0000</pubDate>
		<dc:creator>Tao Yang</dc:creator>
				<category><![CDATA[SCOM]]></category>
		<category><![CDATA[APM]]></category>
		<category><![CDATA[SCOM Reporting]]></category>

		<guid isPermaLink="false">http://blog.tyang.org/?p=1761</guid>
		<description><![CDATA[<p>Previously I’ve blogged my experience in migrating from OpsMgr 2012 RTM to SP1 which involved moving all databases to a new database server running SQL 2012. Since then, I’ve noticed the instruction in moving Operational DB published in TechNet is actually missing a step, which I’ve blogged here. Over the last few days, since it [...]</p><p>The post <a href="http://blog.tyang.org/2013/03/12/opsmgr-2012-app-advisor-web-console-failed-to-run-reports-after-dw-database-move/">OpsMgr 2012 App Advisor Web Console Failed To Run Reports After DW Database Move</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Previously I’ve blogged my experience in <a href="http://blog.tyang.org/2013/01/08/migrating-opsmgr-2012-rtm-to-opsmgr-2012-sp1/">migrating from OpsMgr 2012 RTM to SP1</a> which involved moving all databases to a new database server running SQL 2012. Since then, I’ve noticed the instruction in moving Operational DB published in TechNet is actually missing a step, which I’ve blogged <a href="http://blog.tyang.org/2013/01/25/eventid-28001-and-29112-on-scom-2012-management-server-after-operational-database-move/">here</a>.</p>
<p>Over the last few days, since it was the long weekend down here in Victoria, I spent some time setting up the Talking Heads web application to explorer APM in OpsMgr 2012. I was following the instructions in Chapter 9 in the <a href="http://kevingreeneitblog.blogspot.com.au/2012/10/available-now-mastering-system-center.html">Mastering System Center 2012 Operations Manager</a> book. The instructions in this chapter is exactly the same (almost word to word) as the 3-part series in Kevin Greene’s blog (<a href="http://kevingreeneitblog.blogspot.com.au/2012/07/scom-2012-apm-consoles-part-1.html">Part 1</a>, <a href="http://kevingreeneitblog.blogspot.com.au/2012/07/scom-2012-apm-csm-vs-gsm-and-web.html">Part 2</a>, <a href="http://kevingreeneitblog.blogspot.com.au/2012/03/scom-2012-configuring-application_49.html">Part 3</a>). – Looks like we know who’s the author for this chapter. &#8211; Thanks Kevin <img class="wlEmoticon wlEmoticon-smile" style="border-style: none;" alt="Smile" src="http://blog.tyang.org/wp-content/uploads/2013/03/wlEmoticon-smile.png" /></p>
<p>Anyways, I’ve learnt a lot from this chapter as I’ve never dealt with Avicode in 2007 or APM in 2012. While I was exploring the App Diagnostic and App Advisor consoles, I’ve noticed my App Advisor console won’t run any reports! No matter which reports I tried to run, I always get this error:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/03/image6.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/03/image_thumb5.png" width="580" height="290" border="0" /></a></p>
<p>and as suggested, I got this warning event (EventID 1309) from Windows Application log:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/03/image7.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/03/image_thumb6.png" width="543" height="435" border="0" /></a></p>
<p>In the exception stack, it shows I cannot connect to the SQL server:</p>
<p><em><span style="color: #ff0000;">Exception message: An error has occurred during report processing. &#8212;&gt; Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. &#8212;&gt; Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: <strong>Cannot create a connection to data source &#8216;AppMonitoringSource&#8217;. &#8212;&gt; System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.</strong> (provider: Named Pipes Provider, error: 40 &#8211; Could not open a connection to SQL Server)<br />
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)<br />
</span></em></p>
<p>After spending time trying to fix this issue, I created a DNS Alias record with my old OpsMgr SQL server name pointing to the new SQL server, and it fixed the problem! By doing this, I knew there is one place that I haven’t updated the SQL server name yet. I went through the Technet instructions for moving Operational DB, DW DB and Reporting Server again, I couldn’t find which step was I missing.</p>
<p>Today, I had a second look in the SSRS instance for OpsMgr reporting, I noticed there is an additional data source called <strong>AppMonitoringSource</strong> under <strong>Application Monitoring –&gt;.Net Monitoring</strong>. the connection string for this data source was still pointing to the old SQL server:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/03/image8.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/03/image_thumb7.png" width="469" height="417" border="0" /></a></p>
<p>According to the Technet guide <a href="http://technet.microsoft.com/en-us/library/hh268492.aspx">“How to Move the Data Warehouse Database”</a>, as per step 8, only the Data Warehouse Main data source needs to be updated (and of course, if we’ve manually created another data source for operational DB, which is very common and lots of community report MPs requires this datasource, we’d also update it too.). The AppMonitoringSource was not mentioned in the instructions – which I found interesting because step 10 actually covered changing the DB server name in <strong>dbo. MT_Microsoft$SystemCenter$DataWarehouse$AppMonitoring</strong>, table, we can tell by name is used for APM.</p>
<p>As result, after I’ve changed the connection string in this data source, deleted the DNS alias and flushed DNS cache on my web console server, the problem is now fixed.</p>
<p>So, not sure if the AppMonitoringSource was overlooked by the author of the Technet guide. For anyone who has moved the DW DB in OpsMgr 2012, it’s probably worth checking this data source (by going to http://&lt;reporting server&gt;/reports). I only found out now only because I’ve started using APM in my environment.</p>
<p>The post <a href="http://blog.tyang.org/2013/03/12/opsmgr-2012-app-advisor-web-console-failed-to-run-reports-after-dw-database-move/">OpsMgr 2012 App Advisor Web Console Failed To Run Reports After DW Database Move</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.tyang.org/2013/03/12/opsmgr-2012-app-advisor-web-console-failed-to-run-reports-after-dw-database-move/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>System Center 2012 Operations Manager Unleashed ebook</title>
		<link>http://blog.tyang.org/2013/03/05/system-center-2012-operations-manager-unleashed-ebook/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=system-center-2012-operations-manager-unleashed-ebook</link>
		<comments>http://blog.tyang.org/2013/03/05/system-center-2012-operations-manager-unleashed-ebook/#comments</comments>
		<pubDate>Tue, 05 Mar 2013 13:09:13 +0000</pubDate>
		<dc:creator>Tao Yang</dc:creator>
				<category><![CDATA[SCOM]]></category>
		<category><![CDATA[ebook]]></category>

		<guid isPermaLink="false">http://blog.tyang.org/?p=1752</guid>
		<description><![CDATA[<p>We’ve all been waited for so long for this book: You might have heard that this book is already available in ebook formats from Amazon and Barnes &#38; Noble. I’m sick of waiting for the paperback version that I bought last July from Amazon, it still hasn’t been shipped yet. So I went ahead and [...]</p><p>The post <a href="http://blog.tyang.org/2013/03/05/system-center-2012-operations-manager-unleashed-ebook/">System Center 2012 Operations Manager Unleashed ebook</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>We’ve all been waited for so long for this book:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/03/image4.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/03/image_thumb3.png" width="218" height="284" border="0" /></a></p>
<p>You might have heard that this book is already available in ebook formats from Amazon and Barnes &amp; Noble.</p>
<p>I’m sick of waiting for the paperback version that I bought last July from Amazon, it still hasn’t been shipped yet. So I went ahead and also bought the ebook.</p>
<p>I bought the ebook from the publisher’s website: <a title="http://www.informit.com/store/system-center-2012-operations-manager-unleashed-9780672335914" href="http://www.informit.com/store/system-center-2012-operations-manager-unleashed-9780672335914">http://www.informit.com/store/system-center-2012-operations-manager-unleashed-9780672335914</a></p>
<p>Unlike Amazon, when you get from <a href="http://www.informit.com">www.informit.com</a>, you’ll get 3 versions of the ebook: epub, mobi and pdf.</p>
<p>Currently the price is $38.39, but for the limited time, if you use the promo code “<strong>UNLEASHED2013</strong>”, the price will reduce to $37.99 – That’s 40 cents off! what a bargain!</p>
<p>So for those who are getting the ebook and hasn’t made the purchase yet, I’d recommend to get from the above mentioned site as you’ll get all 3 formats:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/03/image5.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/03/image_thumb4.png" width="533" height="295" border="0" /></a></p>
<p>The post <a href="http://blog.tyang.org/2013/03/05/system-center-2012-operations-manager-unleashed-ebook/">System Center 2012 Operations Manager Unleashed ebook</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.tyang.org/2013/03/05/system-center-2012-operations-manager-unleashed-ebook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>“PowerShell Script failed to run” alert in OpsMgr 2012</title>
		<link>http://blog.tyang.org/2013/03/04/powershell-script-failed-to-run-alert-in-opsmgr-2012/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=powershell-script-failed-to-run-alert-in-opsmgr-2012</link>
		<comments>http://blog.tyang.org/2013/03/04/powershell-script-failed-to-run-alert-in-opsmgr-2012/#comments</comments>
		<pubDate>Mon, 04 Mar 2013 04:43:24 +0000</pubDate>
		<dc:creator>Tao Yang</dc:creator>
				<category><![CDATA[SCOM]]></category>
		<category><![CDATA[MP Authoring]]></category>

		<guid isPermaLink="false">http://blog.tyang.org/?p=1745</guid>
		<description><![CDATA[<p>Don’t you hate it when you’ve just released a piece of work to public and you found an issue with it? Well, this is what happened to me today. Yesterday and released the OpsMgr Self Maintenance MP, and today, I found an issue with the 2012 version. After the MP is imported and the “OpsMgr [...]</p><p>The post <a href="http://blog.tyang.org/2013/03/04/powershell-script-failed-to-run-alert-in-opsmgr-2012/">&ldquo;PowerShell Script failed to run&rdquo; alert in OpsMgr 2012</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Don’t you hate it when you’ve just released a piece of work to public and you found an issue with it? Well, this is what happened to me today. Yesterday and released the <a href="http://blog.tyang.org/2013/03/03/opsmgr-self-maintenance-management-pack/">OpsMgr Self Maintenance MP</a>, and today, I found an issue with the 2012 version.</p>
<p>After the MP is imported and the “OpsMgr 2012 Self Maintenance Operational Database LocalizedText Table Health Monitor” has been enabled via an override, you’ll soon get this alert from one of the management servers:</p>
<p><span style="color: #ff0000;"><em>The PowerShell script failed with below exception</em></span></p>
<p><span style="color: #ff0000;"><em>System.Management.Automation.IncompleteParseException: White space is not allowed before the string terminator.<br />
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)<br />
at Microsoft.EnterpriseManagement.Common.PowerShell.RunspaceController.RunScript[T](String scriptName, String scriptBody, Dictionary`2 parameters, Object[] constructorArgs, IScriptDebug iScriptDebug, Boolean bSerializeOutput)</em></span></p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/03/image.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/03/image_thumb.png" width="579" height="380" border="0" /></a></p>
<p>After spent sometime troubleshooting, the issue is a bit stupid, but I’ll remember this in the future:</p>
<p>I wrote the 2007 version using 2007 R2 authoring console, thus no problems found. The 2012 version was written using Visual Studio Authoring Extension. In the particular probe action module used by the monitor type, this is what the raw code looks like:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/03/image1.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/03/image_thumb1.png" width="580" height="402" border="0" /></a></p>
<p>when I pasted the script in the xml, I tried to format it using the Tab key.</p>
<p>This is what it should look like:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/03/image2.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/03/image_thumb2.png" width="580" height="457" border="0" /></a></p>
<p>After I removed all the Tab spaces, the monitor started working.</p>
<p>I’ve changed the version number of the 2012 version to 1.0.0.1. I’ll update the MP from the original article from yesterday. For those who has already downloaded the MP, apologies. please download it again and the mp can be in-place upgraded to the new version.</p>
<p>The post <a href="http://blog.tyang.org/2013/03/04/powershell-script-failed-to-run-alert-in-opsmgr-2012/">&ldquo;PowerShell Script failed to run&rdquo; alert in OpsMgr 2012</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.tyang.org/2013/03/04/powershell-script-failed-to-run-alert-in-opsmgr-2012/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>OpsMgr Self Maintenance Management Pack</title>
		<link>http://blog.tyang.org/2013/03/03/opsmgr-self-maintenance-management-pack/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=opsmgr-self-maintenance-management-pack</link>
		<comments>http://blog.tyang.org/2013/03/03/opsmgr-self-maintenance-management-pack/#comments</comments>
		<pubDate>Sun, 03 Mar 2013 12:12:53 +0000</pubDate>
		<dc:creator>Tao Yang</dc:creator>
				<category><![CDATA[SCOM]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[SCOM Management Pack]]></category>

		<guid isPermaLink="false">http://blog.tyang.org/?p=1726</guid>
		<description><![CDATA[<p>Background I had this idea to automate some repetitive maintenance tasks that every SCOM administrator perform regularly via a management pack. So I started to write a OpsMgr self maintenance MP during my spare time around July last year, right after my baby girl Rosie was born. since then, I’ve got side-tracked many times, i.e. [...]</p><p>The post <a href="http://blog.tyang.org/2013/03/03/opsmgr-self-maintenance-management-pack/">OpsMgr Self Maintenance Management Pack</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<h1><span style="font-size: x-large;">Background</span></h1>
<p>I had this idea to automate some repetitive maintenance tasks that every SCOM administrator perform regularly via a management pack. So I started to write a OpsMgr self maintenance MP during my spare time around July last year, right after my baby girl Rosie was born. since then, I’ve got side-tracked many times, i.e. left for TechEd in September for a week, studying for ConfigMgr 2012 exam, studying for the 3 Windows Server 2012 MCSA exams, writing other management packs such as the Weather monitoring MP, etc. This MP has been sitting there 90% completed for months.</p>
<p>Few of weeks ago, I passed all 3 Windows Server 2012 exams required for MCSA, and got a phone call from my friend Dan Kregor. Dan told me he wanted to write a maintenance MP for OpsMgr, and I told him I’ve got one 90% done. So we got together, went through what needed to be included and Dan gave me some good ideas. Over last few weeks, I have spent most of my spare time working on this MP. Initially this MP was only designed for 2007 (which would also work on 2012), I then decided to build a 2012 version (based on OpsMgr 2012 MP schema) so the MP can utilise resource pools. There are also few additional rules / monitors in the 2012 version. Anyways, I’ve now finally finished both version of the MP. Below paragraphs are ripped from the MP documentation:</p>
<h1><span style="font-size: x-large;">Introduction</span></h1>
<p>OpsMgr Self Maintenance Management Pack automates some routine tasks generally performed by OpsMgr administrators on a regular basis. It also provides few rules / monitors to monitor the OpsMgr management group itself. This management pack contains 2 version.</p>
<ul>
<li>The OpsMgr 2007 R2 version works on both 2007 R2 and 2012 versions of OpsMgr.</li>
<li>The OpsMgr 2012 version only works on OpsMgr 2012.</li>
</ul>
<p>The 2012 version of this management pack is able to utilize OpsMgr 2012 resource pools and also provides additional rules and monitors than the 2007 version. For OpsMgr 2012 environments, it’s strongly recommended to use the 2012 version of this management pack.</p>
<p>The following workflows are included in this management pack:</p>
<ul>
<li>Automatically balance OpsMgr agents among a group of management servers.</li>
<li>Automatically close aged rule-generated alerts</li>
<li>Convert all manually installed OpsMgr agents to Remote-Manageable.</li>
<li>Enable Agent-Proxy for all agents</li>
<li>Backup Unsealed (and Sealed) management packs.</li>
<li>Remove Disabled discovery objects</li>
<li>Detect staled stage change events</li>
<li>Monitoring the size of LocalizedText able from the OpsMgr operational database.</li>
<li>Detects OpsMgr management servers in maintenance mode (Only available in OpsMgr 2012 version of the MP)</li>
<li>Performance Collection rule for total number of SDK connection within the management group (among all management servers). (Only available in OpsMgr 2012 version of the MP).</li>
<li>Agent tasks for:
<ul>
<li>Manually backup management packs</li>
<li>Get currently connected users to the SDK service</li>
<li>Enable Agent Proxy for all agents.</li>
</ul>
</li>
</ul>
<p>All the rules and monitors from the OpsMgr Self Maintenance management packs are disabled by default. This is to ensure OpsMgr administrators only turn on the workflows that are required for the OpsMgr environments they support and configure the required parameters for workflows to suit the environment.</p>
<p>The agent tasks from the management packs are enabled by default.</p>
<p>An unsealed override management pack is provided for each version of the OpsMgr Self Maintenance MP. OpsMgr administrators can use provided unsealed override MP for customization or they can also create their own override MPs for this purpose.</p>
<h1><span style="font-size: x-large;">Credit</span></h1>
<p>I’d like to thank Dan Kregor for sharing ideas with me and taking time testing the MP.</p>
<p>I appreciate any feedback from the community, this is only the first release, any thoughts on additional workflows that I can build into this MP is much appreciated!</p>
<p>Both versions of the management packs and the documentation can be downloaded <a href="http://blog.tyang.org/wp-content/uploads/2013/03/OpsMgr-Self-Maintenance.zip">HERE</a>.</p>
<p>The post <a href="http://blog.tyang.org/2013/03/03/opsmgr-self-maintenance-management-pack/">OpsMgr Self Maintenance Management Pack</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.tyang.org/2013/03/03/opsmgr-self-maintenance-management-pack/feed/</wfw:commentRss>
		<slash:comments>36</slash:comments>
		</item>
		<item>
		<title>Using SCOM 2012 SDK to Retrieve Resource Pools Information</title>
		<link>http://blog.tyang.org/2013/02/21/using-scom-2012-sdk-to-retrieve-resource-pools-information/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=using-scom-2012-sdk-to-retrieve-resource-pools-information</link>
		<comments>http://blog.tyang.org/2013/02/21/using-scom-2012-sdk-to-retrieve-resource-pools-information/#comments</comments>
		<pubDate>Thu, 21 Feb 2013 10:12:49 +0000</pubDate>
		<dc:creator>Tao Yang</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SCOM]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[SCOM SDK]]></category>

		<guid isPermaLink="false">http://blog.tyang.org/?p=1720</guid>
		<description><![CDATA[<p>Today I needed to retrieve information about SCOM 2012 resource pools in a PowerShell script, I needed to do this directly via SDK, rather than using the OperationsManager PowerShell module. I couldn’t find any existing scripts via Google, so I spent some time playing with SDK and finally found it. Since it seems no one [...]</p><p>The post <a href="http://blog.tyang.org/2013/02/21/using-scom-2012-sdk-to-retrieve-resource-pools-information/">Using SCOM 2012 SDK to Retrieve Resource Pools Information</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Today I needed to retrieve information about SCOM 2012 resource pools in a PowerShell script, I needed to do this directly via SDK, rather than using the OperationsManager PowerShell module. I couldn’t find any existing scripts via Google, so I spent some time playing with SDK and finally found it. Since it seems no one has mentioned it on the web, here’s how I did it:</p>
<p>Firstly, load the SDK DLL’s. I always use below function:</p>
<pre class="brush: powershell; title: ; notranslate">
function Load-SDK()
{
[System.Reflection.Assembly]::LoadWithPartialName(&quot;Microsoft.EnterpriseManagement.OperationsManager.Common&quot;) | Out-Null
[System.Reflection.Assembly]::LoadWithPartialName(&quot;Microsoft.EnterpriseManagement.OperationsManager&quot;) | Out-Null
}

Load-SDK
</pre>
<p>Secondly, connect to the management group. Since I’ll be running this script on a management server, I’m connecting to the management group via the SDK service on the local machine:</p>
<pre class="brush: powershell; title: ; notranslate">
$MGConnSetting = New-Object Microsoft.EnterpriseManagement.ManagementGroupConnectionSettings($env:computername)
$MG = New-Object Microsoft.EnterpriseManagement.ManagementGroup($MGConnSetting)
</pre>
<p>Then, get the management group administration</p>
<pre class="brush: powershell; title: ; notranslate">
$Admin = $MG.Administration
</pre>
<p>Finally, get all resource pools</p>
<pre class="brush: powershell; title: ; notranslate">
$ResourcePools = $admin.GetManagementServicePools()
</pre>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/02/image.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/02/image_thumb.png" width="579" height="709" border="0" /></a></p>
<p>In the past, I’ve been using the GetAdministration() method from the management group object to retrieve MG administration object. This time, When I did it, the MG administration object returned from the method does not contain a method for GetManagementServicePools. I then realised the management group contains a property called Administration. the object type is the same as what’s returned from GetAdministration() method.</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/02/image1.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/02/image_thumb1.png" width="580" height="148" border="0" /></a></p>
<p>But it looks like the object returned from the “Administration” property contains more members:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/02/image2.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/02/image_thumb2.png" width="580" height="114" border="0" /></a></p>
<p>This is just a quick observation. In the future, I’ll remember to check both places.</p>
<p>The post <a href="http://blog.tyang.org/2013/02/21/using-scom-2012-sdk-to-retrieve-resource-pools-information/">Using SCOM 2012 SDK to Retrieve Resource Pools Information</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.tyang.org/2013/02/21/using-scom-2012-sdk-to-retrieve-resource-pools-information/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>EventID 28001 and 29112 on SCOM 2012 Management Server after Operational Database Move</title>
		<link>http://blog.tyang.org/2013/01/25/eventid-28001-and-29112-on-scom-2012-management-server-after-operational-database-move/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=eventid-28001-and-29112-on-scom-2012-management-server-after-operational-database-move</link>
		<comments>http://blog.tyang.org/2013/01/25/eventid-28001-and-29112-on-scom-2012-management-server-after-operational-database-move/#comments</comments>
		<pubDate>Fri, 25 Jan 2013 11:58:57 +0000</pubDate>
		<dc:creator>Tao Yang</dc:creator>
				<category><![CDATA[SCOM]]></category>
		<category><![CDATA[SCOM Migration]]></category>

		<guid isPermaLink="false">http://blog.tyang.org/?p=1708</guid>
		<description><![CDATA[<p>Recently I’ve moved databases for my lab SCOM 2012 management group to a new SQL 2012 server as part of of my RTM to SP1 migration. I followed the How to Move the Operational Database guide from TechNet. After the migration, I have noticed that on one of my management servers, I kept getting a [...]</p><p>The post <a href="http://blog.tyang.org/2013/01/25/eventid-28001-and-29112-on-scom-2012-management-server-after-operational-database-move/">EventID 28001 and 29112 on SCOM 2012 Management Server after Operational Database Move</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Recently I’ve moved databases for my lab SCOM 2012 management group to a new SQL 2012 server as part of of my <a href="http://blog.tyang.org/2013/01/08/migrating-opsmgr-2012-rtm-to-opsmgr-2012-sp1/">RTM to SP1 migration</a>.</p>
<p>I followed the <a href="http://technet.microsoft.com/en-us/library/hh278848.aspx">How to Move the Operational Database guide</a> from TechNet. After the migration, I have noticed that on one of my management servers, I kept getting a warning event 28001 and an error event 29112 every couple of minutes in the OperationsManager event log.</p>
<p><strong>Event 28001:</strong></p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/01/image1.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/01/image_thumb1.png" width="580" height="359" border="0" /></a></p>
<p><em><span style="color: #ff0000; font-size: small;">The Root connector received an exception from the Config Service on StateSyncRequest: </span></em></p>
<p><em><span style="color: #ff0000; font-size: small;">System.Runtime.Remoting.RemotingException: Failed to connect to an IPC Port: The system cannot find the file specified.<br />
</span></em></p>
<p><em><span style="color: #ff0000; font-size: small;">Server stack trace:<br />
at System.Runtime.Remoting.Channels.Ipc.IpcPort.Connect(String portName, Boolean secure, TokenImpersonationLevel impersonationLevel, Int32 timeout)<br />
at System.Runtime.Remoting.Channels.Ipc.ConnectionCache.GetConnection(String portName, Boolean secure, TokenImpersonationLevel level, Int32 timeout)<br />
at System.Runtime.Remoting.Channels.Ipc.IpcClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders&amp; responseHeaders, Stream&amp; responseStream)<br />
at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)</span></em></p>
<p><em><span style="color: #ff0000; font-size: small;">Exception rethrown at [0]:<br />
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)<br />
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&amp; msgData, Int32 type)<br />
at Microsoft.EnterpriseManagement.Mom.Internal.IConfigService.OnStateSyncRequest(Guid source, UInt64 messageIdentifier, String cookie)</span></em></p>
<p><strong>Event 29112:</strong></p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/01/image2.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/01/image_thumb2.png" width="580" height="359" border="0" /></a></p>
<p><span style="color: #ff0000; font-size: small;"><em>OpsMgr Management Configuration Service failed to execute bootstrap work item &#8216;ConfigurationStoreInitializeWorkItem&#8217; due to the following exception</em></span></p>
<p><span style="color: #ff0000; font-size: small;"><em>System.Data.SqlClient.SqlException (0&#215;80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 &#8211; Could not open a connection to SQL Server)<br />
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)<br />
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()<br />
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity)<br />
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject)<br />
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout)<br />
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)<br />
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)<br />
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)<br />
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)<br />
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)<br />
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)<br />
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)<br />
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)<br />
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)<br />
at System.Data.SqlClient.SqlConnection.Open()<br />
at Microsoft.EnterpriseManagement.ManagementConfiguration.DataAccessLayer.ConnectionManagementOperation.Execute()<br />
at Microsoft.EnterpriseManagement.ManagementConfiguration.DataAccessLayer.DataAccessOperation.ExecuteSynchronously(Int32 timeoutSeconds, WaitHandle stopWaitHandle)<br />
at Microsoft.EnterpriseManagement.ManagementConfiguration.SqlConfigurationStore.ConfigurationStore.ExecuteOperationSynchronously(IDataAccessConnectedOperation operation, String operationName)<br />
at Microsoft.EnterpriseManagement.ManagementConfiguration.SqlConfigurationStore.ConfigurationStore.Initialize()<br />
at Microsoft.EnterpriseManagement.ManagementConfiguration.Engine.ConfigurationStoreInitializeWorkItem.ExecuteWorkItem()</em></span></p>
<p>This particular management server did not get rebuilt to Windows 2012, all other management servers I have in the MG has been completely rebuilt so they did not have this issue.</p>
<p>In the step 7 of the <a href="http://technet.microsoft.com/en-us/library/hh278848.aspx">guide from TechNet</a>, it mentioned updating the &lt;Category Name=”Cmdb”&gt; tag in the <strong>%ProgramFiles%\System Center 2012\Operations Manager\Server\ConfigService.config</strong> file.</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/01/image3.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/01/image_thumb3.png" width="580" height="95" border="0" /></a></p>
<p>However, the old DB server name also exists in the <strong>&lt;Category Name=”ConfigStore”&gt;</strong> tag in the same file. this was not mentioned in the guide:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/01/image4.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/01/image_thumb4.png" width="580" height="155" border="0" /></a></p>
<p>After I updated &lt;Category Name=”ConfigStore”&gt; section and restarted all the SCOM services on the management server, the error went away.</p>
<p>The post <a href="http://blog.tyang.org/2013/01/25/eventid-28001-and-29112-on-scom-2012-management-server-after-operational-database-move/">EventID 28001 and 29112 on SCOM 2012 Management Server after Operational Database Move</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.tyang.org/2013/01/25/eventid-28001-and-29112-on-scom-2012-management-server-after-operational-database-move/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing SCCM 2012 SP1 Secondary Site with a Pre-Configured SQL 2012 Instance</title>
		<link>http://blog.tyang.org/2013/01/23/installing-sccm-2012-sp1-secondary-site-with-a-pre-configured-sql-2012-instance/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=installing-sccm-2012-sp1-secondary-site-with-a-pre-configured-sql-2012-instance</link>
		<comments>http://blog.tyang.org/2013/01/23/installing-sccm-2012-sp1-secondary-site-with-a-pre-configured-sql-2012-instance/#comments</comments>
		<pubDate>Wed, 23 Jan 2013 01:09:01 +0000</pubDate>
		<dc:creator>Tao Yang</dc:creator>
				<category><![CDATA[SCCM]]></category>
		<category><![CDATA[Secondary Site]]></category>

		<guid isPermaLink="false">http://blog.tyang.org/?p=1694</guid>
		<description><![CDATA[<p>Over the last week, I’ve been re-installing my SCCM lab environment to SCCM 2012 SP1. I’m using Windows Server 2012 as the base OS for all site system roles and all database engines and SQL reporting server run on SQL 2012. I got stuck few days ago when I was building my first secondary site. [...]</p><p>The post <a href="http://blog.tyang.org/2013/01/23/installing-sccm-2012-sp1-secondary-site-with-a-pre-configured-sql-2012-instance/">Installing SCCM 2012 SP1 Secondary Site with a Pre-Configured SQL 2012 Instance</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Over the last week, I’ve been re-installing my SCCM lab environment to SCCM 2012 SP1. I’m using Windows Server 2012 as the base OS for all site system roles and all database engines and SQL reporting server run on SQL 2012.</p>
<p>I got stuck few days ago when I was building my first secondary site. I was trying to use a pre-installed SQL 2012 Express With SP1 instance for the secondary site database. I followed the instruction that I have previously blogged for SQL Express 2008 R2: <a title="http://blog.tyang.org/2012/04/09/installing-sccm-2012-rtm-secondary-site-using-a-pre-installed-sql-express-2008-r2-instance/" href="http://blog.tyang.org/2012/04/09/installing-sccm-2012-rtm-secondary-site-using-a-pre-installed-sql-express-2008-r2-instance/">http://blog.tyang.org/2012/04/09/installing-sccm-2012-rtm-secondary-site-using-a-pre-installed-sql-express-2008-r2-instance/</a></p>
<p>After I installed and configured the SQL express instance for the secondary site, I started the secondary site install (from the parent primary site). However, I was keep getting this error during the prerequisites check:</p>
<p><span style="color: #ff0000;"><strong>SQL server sysadmin rights:</strong></span></p>
<p><span style="color: #ff0000;"><em>Either the user account running Configuration Manager Setup does not have sysadmin SQL Server role permission on the SQL Server instance selected for site database installation, or the SQL Server instance could not be contacted to verify permissions. Setup cannot continue.</em></span></p>
<p><span style="color: #000000;">Prerequisite check result:</span></p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/01/clip_image001.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image001" alt="clip_image001" src="http://blog.tyang.org/wp-content/uploads/2013/01/clip_image001_thumb.png" width="580" height="397" border="0" /></a></p>
<p><span style="color: #000000;">ConfigMgrPrereq.log:</span></p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/01/clip_image0016.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image001[6]" alt="clip_image001[6]" src="http://blog.tyang.org/wp-content/uploads/2013/01/clip_image0016_thumb.png" width="580" height="321" border="0" /></a></p>
<p>The error suggested that my account does not have sysadmin rights. In fact, both my user account and the site server computer account have sysadmin and dbcreator rights in that SQL 2012 instance.</p>
<p>I then tried few different SQL configurations, including using default instance rather than named instance (CONFIGMGRSEC), and using SQL 2012 Enterprise rather than Express edition, they made no difference. I then installed SQL 2008 R2 Express With SP2 (with exact same configuration in terms of security, collation, using named instance, enabling SQL Server Browser service, etc). and the pre-requisite checks passed and secondary site got successfully installed.</p>
<p>After I compared settings in SQL 2008 R2 and the SQL 2012 Express instance I had installed on another secondary site server, I found the issue:</p>
<p>During SQL 2012 install, the sysadmin rights was not granted to the local system account (NT AUTHORITY\SYSTEM). In SQL 2008 R2, “NT AUTHORITY\SYSTEM” account by default has sysadmin rights. During the prerequisites check, SCCM installs a series of services on the target secondary site server to perform the checks. these services are installed to run under LOCALSYSTEM account. The SQL sysadmin rights check failed because the LOCALSYSTEM account does not have sysadmin rights as it was running under LOCALSYSTEM account. To a degree, the error message is somewhat misleading in my opinion.</p>
<p>i.e. system event log entry for one of the services installed by prerequisites check:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/01/image.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" alt="image" src="http://blog.tyang.org/wp-content/uploads/2013/01/image_thumb.png" width="578" height="403" border="0" /></a></p>
<p><strong><span style="text-decoration: underline;">So to fix the issue, I simply gave “NT AUTHORITY\SYSTEM” account the same access in SQL 2012 as in SQL 2008 R2:</span></strong></p>
<p><strong>sysadmin</strong> and <strong>securityadmin</strong> role:</p>
<p><a href="http://blog.tyang.org/wp-content/uploads/2013/01/clip_image0018.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image001[8]" alt="clip_image001[8]" src="http://blog.tyang.org/wp-content/uploads/2013/01/clip_image0018_thumb.png" width="541" height="490" border="0" /></a></p>
<p>To summarise, when installing SCCM 2012 SP1 secondary site on a pre-configured SQL 2012 instance regardless which SQL edition is being used, “NT AUTHORITY\SYSTEM” account needs to be given <strong>securityadmin </strong>and <strong>sysadmin</strong> rights. If SQL Express is used, there are few additional steps need to be carried out to configure the SQL TCP connection as documented in my previous blog: <a title="http://blog.tyang.org/2012/04/09/installing-sccm-2012-rtm-secondary-site-using-a-pre-installed-sql-express-2008-r2-instance/" href="http://blog.tyang.org/2012/04/09/installing-sccm-2012-rtm-secondary-site-using-a-pre-installed-sql-express-2008-r2-instance/">http://blog.tyang.org/2012/04/09/installing-sccm-2012-rtm-secondary-site-using-a-pre-installed-sql-express-2008-r2-instance/</a></p>
<p>The post <a href="http://blog.tyang.org/2013/01/23/installing-sccm-2012-sp1-secondary-site-with-a-pre-configured-sql-2012-instance/">Installing SCCM 2012 SP1 Secondary Site with a Pre-Configured SQL 2012 Instance</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.tyang.org/2013/01/23/installing-sccm-2012-sp1-secondary-site-with-a-pre-configured-sql-2012-instance/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Migrating OpsMgr 2012 RTM to OpsMgr 2012 SP1</title>
		<link>http://blog.tyang.org/2013/01/08/migrating-opsmgr-2012-rtm-to-opsmgr-2012-sp1/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=migrating-opsmgr-2012-rtm-to-opsmgr-2012-sp1</link>
		<comments>http://blog.tyang.org/2013/01/08/migrating-opsmgr-2012-rtm-to-opsmgr-2012-sp1/#comments</comments>
		<pubDate>Tue, 08 Jan 2013 00:33:36 +0000</pubDate>
		<dc:creator>Tao Yang</dc:creator>
				<category><![CDATA[SCOM]]></category>

		<guid isPermaLink="false">http://blog.tyang.org/?p=1680</guid>
		<description><![CDATA[<p>Over the Christmas / New Year break, I spent some time to upgrade the OpsMgr 2012 RTM environment in my test lab to SP1. Since System Center 2012 SP1 fully supports Windows Server 2012 and SQL 2012, I have decided not only to upgrade OpsMgr 2012 to SP1, but I&#8217;d also want all management servers, [...]</p><p>The post <a href="http://blog.tyang.org/2013/01/08/migrating-opsmgr-2012-rtm-to-opsmgr-2012-sp1/">Migrating OpsMgr 2012 RTM to OpsMgr 2012 SP1</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Over the Christmas / New Year break, I spent some time to upgrade the OpsMgr 2012 RTM environment in my test lab to SP1. Since System Center 2012 SP1 fully supports Windows Server 2012 and SQL 2012, I have decided not only to upgrade OpsMgr 2012 to SP1, but I&#8217;d also want all management servers, web server, database server to run on Windows Server 2012 and SQL server 2012.</p>
<p>My OpsMgr 2012 test environment consists 3 management servers, 1 database server (SQL 2008 R2, hosts both Operational and DW database, it is also the OpsMgr reporting server running SQL SSRS), and 1 web console server. All of these servers were running Windows Serer 2008 R2 SP1.</p>
<p>Below are the high level steps I have taken to upgrade this environment to OpsMgr 2012 SP1 and also migrate to Windows Server 2012 and SQL Server 2012 SP1:</p>
<ol style="margin-left: 38pt;">
<li>Update the existing OpsMgr 2012 RTM environment to SP1</li>
<li>Build a new SQL 2012 SP1 database server running on Windows Server 2012 and Migrate both databases and reporting server role to this server.</li>
<li>Move agents off each management server and rebuild them one by one running Windows Server 2012 and then install OpsMgr 2012 SP1 management server to join the existing management group.</li>
<li>Rebuild Web console server to Windows Server 2012 and then install OpsMgr 2012 web console using OpsMgr 2012 SP1 install media.</li>
</ol>
<p>Alone the process, I have documented some detailed steps and I want to share with the community as I assume I&#8217;m not the only one who also wants to upgrade the underlying OS for SCOM servers to Windows Server 2012. Here&#8217;s what I have documented:</p>
<p><span style="color: #ff0000;"><strong>Disclaimer:</strong> below are the step I&#8217;ve taken specific to my test environment. They are essentially combination of multiple guides from TechNet. Please only use it only as a reference, I hold no responsibilities for any damages it may occur to anyone else&#8217;s OpsMgr environment.</span></p>
<ol>
<li>Created Windows Server 2012 instance (named OpsMgrSQL01)</li>
<li>Install SQL 2012 Enterprise With SP1 (Database Engine, Full-Text and Semantic Extractions for Search, SSRS, client tools etc)</li>
<li>
<div>Upgrade existing OpsMgr 2012 RTM to SP1 (<a href="http://technet.microsoft.com/en-us/library/jj899854.aspx">http://technet.microsoft.com/en-us/library/jj899854.aspx</a>)</div>
<ol>
<li>Backup OperationsManager and OperationsManagerDW databases.</li>
<li>run SP1 setup on all management servers</li>
</ol>
</li>
<li>
<div>Migrate SCOM Operational Database to new SQL 2012 server</div>
<ol>
<li>Poweroff all management servers</li>
<li>Backup OperationsManager database on the original SQL 2008 R2 server</li>
<li>Copy OperationsManager.bak to new SQL 2012 server</li>
<li>Restore OperationsManager database from OperationsManager.bak on SQL 2012 server</li>
<li>On the original SQL 2008 server, take OperationsManager database offline</li>
<li>Startup all management servers</li>
<li>Stop System Center Data Access Service, System Center Management service and System Center Management Configuration service on all management servers</li>
<li>Follow instruction from <a href="http://technet.microsoft.com/en-us/library/hh278848.aspx">http://technet.microsoft.com/en-us/library/hh278848.aspx</a> to migrate the operational database</li>
</ol>
</li>
<li>make sure all management servers are functional</li>
<li>
<div>Migrate SCOM Data Warehouse database and reporting server role to new SQL server</div>
<ol>
<li>Backup OperationsManagerDW database on the original SQL 2008 R2 server</li>
<li>Copy OperationsManagerDW.bak to new SQL 2012 server</li>
<li>Restore OperationsManagerDW database on the new SQL 2012 server</li>
<li>Follow instruction to finish moving DW database: <a href="http://technet.microsoft.com/en-us/library/hh268492.aspx">http://technet.microsoft.com/en-us/library/hh268492.aspx</a></li>
<li>Configure SSRS on new SQL 2012 server</li>
<li>Remove OpsMgr reporting server role from the old SQL 2008 server</li>
<li>Install OpsMgr Reporting Server on new SQL 2012 server</li>
<li>Follow instruction: <a href="http://technet.microsoft.com/en-us/library/hh457588.aspx">http://technet.microsoft.com/en-us/library/hh457588.aspx</a> to move the Reporting server</li>
<li>On new SQL 2012 server, go to <strong>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Reporting</strong>, change <strong>DWDBInstance</strong> to the new SQL 2012 server.</li>
<li>On new SQL 2012 server, go to <strong>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\System Center Operations Manager\12\Reporting</strong>, change <strong>DWDBInstance</strong> to the new SQL 2012 server.</li>
<li>
<div>On the new SQL 2012 server hosting the operational database, update the OperationsManager database table.</div>
<ol>
<li>Open SQL Server Management Studio.</li>
<li>Expand Databases , OperationsManager , and Tables.</li>
<li>Right-click dbo. MT_Microsoft$SystemCenter$DataWarehouse , and then click Edit Top 200 Rows .</li>
<li>Change the value in the MainDatabaseServerName_2C77AA48_DB0A_5D69_F8FF_20E48F3AED0F column to reflect the name of the new SQL Server</li>
<li>Close SQL Server Management Studio.</li>
</ol>
</li>
<li>In new SQL 2012 server, go to SSRS web page http://localhost/reports, edit &#8220;Data Warehouse Main&#8221; data source to point to the new SQL 2012 server.</li>
</ol>
</li>
<li>Turn off old SQL 2008 server</li>
<li>Reboot new SQL 2012 server</li>
<li>Reboot all management servers</li>
<li>Move all agents from management server A to another management server</li>
<li>If management server A is the RMS emulator, move the RMSE role to another management server by using <strong>Powershell Cmdlet: Get-SCOMManagementServer -Name &#8220;NewRMSE&#8221; | Set-SCOMRMSEmulator</strong></li>
<li>
<div>If the Reporting server is pointing to this management server, configure the reporting server to use another MS by editing the registry key on the reporting server</div>
<ol>
<li>Go to <strong>HKLM\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Reporting</strong>, edit <strong>DefaultSDKServiceMachine</strong> to another management server.</li>
<li>Go to <strong>HKLM\SOFTWARE\Microsoft\System Center Operations Manager\12\Reporting</strong>, edit <strong>DefaultSDKServiceMachine</strong> to another management server.</li>
<li>Edit <strong>&#8220;&lt;SQL Install Dir&gt;\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer\rsreportserver.config&#8221;</strong> file, locate 2 instances of <strong>&lt;ServerName&gt;</strong> tag and update the management server name</li>
<li>Restart SSRS service on the new SQL 2012 server running SSRS</li>
<li>Shut down management server A and make sure reporting still works</li>
<li>Power up management server A</li>
</ol>
</li>
<li>Uninstall OpsMgr management server on management server A from control panel.</li>
<li>Delete management server A from OpsMgr console (Administration&#8211;&gt;Management Servers)</li>
<li>Rebuild management server A with Windows Server 2012.</li>
<li>Install Microsoft Report Viewer 2010</li>
<li>Install OpsMgr 2012 Service Pack 1 on the newly built Windows Server 2012 and join it to the existing management group.</li>
<li>Repeat step 10-17 for each management server that to be migrated to Windows Server 2012.</li>
<li>Uninstall Web Console from Web Console server</li>
<li>Rebuild Web Console server to Windows Server 2012</li>
<li>Install Microsoft Report Viewer 2010 on the Web Console server</li>
<li>Configure IIS and .NET prerequisites for OpsMgr 2012 web console</li>
<li>Install OpsMgr 2012 Web Console on the newly built web console server</li>
<li>Connect to the Web console server from a client computer and make sure the web console is functional.</li>
</ol>
<p>Now, I have migrated everything but 1 management server to Windows Server 2012 and SQL server 2012. I have decided to keep one management server running Windows Server 2008 R2 just in case I need to test any different scenarios in the future.</p>
<p>I didn&#8217;t have chance to build a Gateway server in the RTM environment so I didn&#8217;t have a Gateway server to migrate.</p>
<p>The post <a href="http://blog.tyang.org/2013/01/08/migrating-opsmgr-2012-rtm-to-opsmgr-2012-sp1/">Migrating OpsMgr 2012 RTM to OpsMgr 2012 SP1</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.tyang.org/2013/01/08/migrating-opsmgr-2012-rtm-to-opsmgr-2012-sp1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bug Fixes for the Group Maintenance Mode Script</title>
		<link>http://blog.tyang.org/2012/12/07/bug-fixes-for-the-group-maintenance-mode-script/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=bug-fixes-for-the-group-maintenance-mode-script</link>
		<comments>http://blog.tyang.org/2012/12/07/bug-fixes-for-the-group-maintenance-mode-script/#comments</comments>
		<pubDate>Fri, 07 Dec 2012 11:32:59 +0000</pubDate>
		<dc:creator>Tao Yang</dc:creator>
				<category><![CDATA[SCOM]]></category>

		<guid isPermaLink="false">http://blog.tyang.org/?p=1669</guid>
		<description><![CDATA[<p>I got a message from a LinkedIn Powershell group in regards to the SCOM Group Maintenance Mode PowerShell script that I’ve posted couple of weeks ago in this blog. Apparently the script contained 2 bugs: The script could not evaluate existing maintenance mode’s end time. The script did not use“Recursive” option when calling ScheduleMaintenanceMode method. [...]</p><p>The post <a href="http://blog.tyang.org/2012/12/07/bug-fixes-for-the-group-maintenance-mode-script/">Bug Fixes for the Group Maintenance Mode Script</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>I got a message from a LinkedIn Powershell group in regards to the <a href="http://blog.tyang.org/2012/11/22/group-maintenance-mode-powershell-script-updated/">SCOM Group Maintenance Mode PowerShell script</a> that I’ve posted couple of weeks ago in this blog.</p>
<p>Apparently the script contained 2 bugs:</p>
<ol>
<li>The script could not evaluate existing maintenance mode’s end time.</li>
<li>The script did not use“Recursive” option when calling <a href="http://msdn.microsoft.com/en-us/library/bb424617.aspx">ScheduleMaintenanceMode</a> method. Which means, in this case, only the group itself were put into maint. mode, none of its  members were entered maint. mode.</li>
</ol>
<p>I’ve updated the script in the <a href="http://blog.tyang.org/2012/11/22/group-maintenance-mode-powershell-script-updated/">original post</a> and these 2 bugs are fixed.</p>
<p>The post <a href="http://blog.tyang.org/2012/12/07/bug-fixes-for-the-group-maintenance-mode-script/">Bug Fixes for the Group Maintenance Mode Script</a> appeared first on <a href="http://blog.tyang.org">Tao Yang&#039;s System Management Blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.tyang.org/2012/12/07/bug-fixes-for-the-group-maintenance-mode-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
