<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://code4ward.net/cs2/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">code4ward.net</title><subtitle type="html">information technologies | consulting | development</subtitle><id>http://code4ward.net/cs2/blogs/code4ward/atom.aspx</id><link rel="alternate" type="text/html" href="http://code4ward.net/cs2/blogs/code4ward/default.aspx" /><link rel="self" type="application/atom+xml" href="http://code4ward.net/cs2/blogs/code4ward/atom.aspx" /><generator uri="http://communityserver.org" version="3.0.20611.960">Community Server</generator><updated>2007-05-03T17:06:00Z</updated><entry><title>Availability</title><link rel="alternate" type="text/html" href="http://code4ward.net/cs2/blogs/code4ward/archive/2008/06/26/availability.aspx" /><id>http://code4ward.net/cs2/blogs/code4ward/archive/2008/06/26/availability.aspx</id><published>2008-06-26T08:33:00Z</published><updated>2008-06-26T08:33:00Z</updated><content type="html">&lt;p&gt;The last couple of days I am experiencing major outages. My provider has big troubles to stabalize my line. I hope that they get it done soon and I am also considering moving my site somewhere else. &lt;/p&gt;&lt;p&gt;Does anyone know a good hosting company? &lt;br /&gt;&lt;/p&gt;&lt;img src="http://code4ward.net/cs2/aggbug.aspx?PostID=1686" width="1" height="1"&gt;</content><author><name>StefanKoell</name><uri>http://code4ward.net/cs2/members/StefanKoell.aspx</uri></author></entry><entry><title>Royal TS 1.5</title><link rel="alternate" type="text/html" href="http://code4ward.net/cs2/blogs/code4ward/archive/2008/06/15/royal-ts-1-5.aspx" /><id>http://code4ward.net/cs2/blogs/code4ward/archive/2008/06/15/royal-ts-1-5.aspx</id><published>2008-06-15T15:20:00Z</published><updated>2008-06-15T15:20:00Z</updated><content type="html">&lt;p&gt;It&amp;#39;s &lt;strong&gt;(almost)&lt;/strong&gt; done! &amp;quot;Why almost?&amp;quot; you may ask. I just released &lt;strong&gt;Royal TS 1.5&lt;/strong&gt;. &lt;img src="http://code4ward.net/cs2/emoticons/emotion-21.gif" alt="Yes" /&gt;&lt;/p&gt;
&lt;p&gt;And this time a lot of things changed. Not only inside the App, also the way Royal TS 1.5 was built, tested and delivered. It was the first time that I organized a small &amp;quot;private&amp;quot; beta which was overwhelming. I got a lot of great feedback and a lot of very detailed bug reports. Thanks to all of you who helped with that.&lt;/p&gt;
&lt;p&gt;I also worked with a small but effective Sharepoint based bug database.&amp;nbsp;It&amp;#39;s nice to see what&amp;nbsp;can be done with little effort.&lt;/p&gt;
&lt;p&gt;I asked a friend of mine who happened to be&amp;nbsp;a&amp;nbsp;graphics designer to give Royal TS a special look. If you ask me, it worked out great!&lt;/p&gt;
&lt;p&gt;The burger is gone! OMG - did you see that...&lt;/p&gt;
&lt;p&gt;Of course, besides the usual bug fixes,&amp;nbsp;some&amp;nbsp;great new features&amp;nbsp;can be found in Royal TS 1.5.&amp;nbsp;The release notes have all the details but here a short list of the most important ones:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;Encryption: password protect the file when using the autologon feature&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Read-only access to files: by assigning a read-only password you can give users the ability to use some predefined connections&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Minimize to sys-tray&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Experimental TS Gateway support&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;many more&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;So why &amp;quot;almost&amp;quot; done? &lt;img src="http://code4ward.net/cs2/emoticons/emotion-18.gif" alt="Huh?" /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;One planned feature was providing help. I prepared Royal TS for that help but writing all that stuff was completely underestimated. So clicking the help buttons is not very useful right now, but I will work on that...&lt;/p&gt;
&lt;p&gt;So, go ahead and download the latest bits: &lt;a href="http://code4ward.net/cs2/files/folders/rts1/entry1548.aspx"&gt;http://code4ward.net/cs2/files/folders/rts1/entry1548.aspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://code4ward.net/cs2/aggbug.aspx?PostID=1549" width="1" height="1"&gt;</content><author><name>StefanKoell</name><uri>http://code4ward.net/cs2/members/StefanKoell.aspx</uri></author><category term="Royal TS 1.x" scheme="http://code4ward.net/cs2/blogs/code4ward/archive/tags/Royal+TS+1.x/default.aspx" /></entry><entry><title>Royal TS 1.5 Teaser</title><link rel="alternate" type="text/html" href="http://code4ward.net/cs2/blogs/code4ward/archive/2008/03/31/royal-ts-1-5-teaser.aspx" /><id>http://code4ward.net/cs2/blogs/code4ward/archive/2008/03/31/royal-ts-1-5-teaser.aspx</id><published>2008-03-31T15:37:27Z</published><updated>2008-03-31T15:37:27Z</updated><content type="html">&lt;p&gt;In a couple of weeks Royal TS 1.5 will be released. So, let me tease you a bit...&lt;/p&gt;  &lt;p&gt;Royal TS 1.5 will sport strong encryption. You can (optionally) protect your .rts file with a master password:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://code4ward.net/cs2/blogs/code4ward/WindowsLiveWriter/RoyalTS1.5Teaser_F534/image_4.png"&gt;&lt;img height="235" alt="image" src="http://code4ward.net/cs2/blogs/code4ward/WindowsLiveWriter/RoyalTS1.5Teaser_F534/image_thumb_1.png" width="490" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Additionally some new options:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://code4ward.net/cs2/blogs/code4ward/WindowsLiveWriter/RoyalTS1.5Teaser_F534/image_6.png"&gt;&lt;img height="469" alt="image" src="http://code4ward.net/cs2/blogs/code4ward/WindowsLiveWriter/RoyalTS1.5Teaser_F534/image_thumb_2.png" width="526" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Possibility to filter for connected, not connected or all connections in the quick search panel:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://code4ward.net/cs2/blogs/code4ward/WindowsLiveWriter/RoyalTS1.5Teaser_F534/image_8.png"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="99" alt="image" src="http://code4ward.net/cs2/blogs/code4ward/WindowsLiveWriter/RoyalTS1.5Teaser_F534/image_thumb_3.png" width="530" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So stay tuned...&lt;/p&gt;  &lt;p&gt;cheers&lt;/p&gt;&lt;img src="http://code4ward.net/cs2/aggbug.aspx?PostID=1341" width="1" height="1"&gt;</content><author><name>StefanKoell</name><uri>http://code4ward.net/cs2/members/StefanKoell.aspx</uri></author><category term="Development" scheme="http://code4ward.net/cs2/blogs/code4ward/archive/tags/Development/default.aspx" /><category term="Royal TS 1.x" scheme="http://code4ward.net/cs2/blogs/code4ward/archive/tags/Royal+TS+1.x/default.aspx" /><category term="RoyalTS" scheme="http://code4ward.net/cs2/blogs/code4ward/archive/tags/RoyalTS/default.aspx" /></entry><entry><title>Royal TS 1.4.4 Released</title><link rel="alternate" type="text/html" href="http://code4ward.net/cs2/blogs/code4ward/archive/2008/03/05/royal-ts-1-4-4-released.aspx" /><id>http://code4ward.net/cs2/blogs/code4ward/archive/2008/03/05/royal-ts-1-4-4-released.aspx</id><published>2008-03-05T12:32:05Z</published><updated>2008-03-05T12:32:05Z</updated><content type="html">&lt;p&gt;Just to growl it out to the world. Nothing really special or new in this release, only just minor bugs were fixed.&lt;/p&gt;  &lt;p&gt;cheers&lt;/p&gt;&lt;img src="http://code4ward.net/cs2/aggbug.aspx?PostID=1249" width="1" height="1"&gt;</content><author><name>StefanKoell</name><uri>http://code4ward.net/cs2/members/StefanKoell.aspx</uri></author><category term="Development" scheme="http://code4ward.net/cs2/blogs/code4ward/archive/tags/Development/default.aspx" /><category term="Royal TS 1.x" scheme="http://code4ward.net/cs2/blogs/code4ward/archive/tags/Royal+TS+1.x/default.aspx" /><category term="RoyalTS" scheme="http://code4ward.net/cs2/blogs/code4ward/archive/tags/RoyalTS/default.aspx" /></entry><entry><title>Better Windows Service Monitoring with Operations Manager 2007</title><link rel="alternate" type="text/html" href="http://code4ward.net/cs2/blogs/code4ward/archive/2008/02/28/better-windows-service-monitoring-with-operations-manager-2007.aspx" /><id>http://code4ward.net/cs2/blogs/code4ward/archive/2008/02/28/better-windows-service-monitoring-with-operations-manager-2007.aspx</id><published>2008-02-28T17:35:18Z</published><updated>2008-02-28T17:35:18Z</updated><content type="html">&lt;div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:acfe2a1f-d0b9-4d73-bd91-f51381e29181" style="padding-right:0px;display:inline;padding-left:0px;padding-bottom:0px;margin:0px;padding-top:0px;"&gt;&lt;p&gt;CheckServiceState Script &lt;a href="http://code4ward.net/cs2/blogs/code4ward/WindowsLiveWriter/BetterWindowsServiceMonitoringwithOperat_F758/CheckServiceState.zip"&gt;CheckServiceState Script&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;  &lt;p&gt;If you ever wanted more control how to monitor windows services with Operations Manager 2007 you most likely realized, that you have to do it all by yourself with a custom script.&lt;/p&gt;  &lt;p&gt;I had at least two major problems which forced me to use a custom script:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;It seems that you cannot monitor the status of a service which has the startup type set to &amp;quot;Manual&amp;quot;. (There is a parameter in the overrides dialog called &amp;quot;Alert only if service startup type is automatic&amp;quot; but it doesn&amp;#39;t have any effect, the health state simply doesn&amp;#39;t change) &lt;/li&gt;    &lt;li&gt;When using templates to monitor a windows service you cannot override the monitor to only monitor a subset of services using a group. The group just doesn&amp;#39;t show up in the list &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;So this is my approach to windows service monitoring:&lt;/p&gt;  &lt;p&gt;First of all, let&amp;#39;s set up a Windows Service monitoring using the standard &lt;strong&gt;Management Pack Templates Wizard&lt;/strong&gt;. In this example: &amp;quot;Print Spooler&amp;quot;. In the monitoring wizard select or create a destination management pack, here: &amp;quot;Windows Service Monitoring&amp;quot;.&lt;/p&gt;  &lt;p&gt;I use the template wizard because I can use the discovered service class to target my own script and I get all the other goodies (performance monitors, baseline rules, etc).&lt;/p&gt;  &lt;p&gt;After a while the service you just configured to monitor will be discovered. &lt;strong&gt;Now let&amp;#39;s setup a group&lt;/strong&gt;:     &lt;br /&gt;Create a new group with a name like &amp;quot;Print Spooler Service Group&amp;quot; in the &amp;quot;Windows Service Monitoring&amp;quot; management pack. In this example I use explicit group members but you can also use dynamic membership of course. The beauty is, that your &lt;strong&gt;group can (and should) contain the discovered service instances&lt;/strong&gt;:     &lt;br /&gt;&lt;a href="http://code4ward.net/cs2/blogs/code4ward/WindowsLiveWriter/BetterWindowsServiceMonitoringwithOperat_F758/image_16.png"&gt;&lt;img height="274" alt="image" src="http://code4ward.net/cs2/blogs/code4ward/WindowsLiveWriter/BetterWindowsServiceMonitoringwithOperat_F758/image_thumb_7.png" width="620" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Next, bring up the monitors the template wizard creates for us:    &lt;br /&gt;&lt;a href="http://code4ward.net/cs2/blogs/code4ward/WindowsLiveWriter/BetterWindowsServiceMonitoringwithOperat_F758/image_2.png"&gt;&lt;img height="277" alt="image" src="http://code4ward.net/cs2/blogs/code4ward/WindowsLiveWriter/BetterWindowsServiceMonitoringwithOperat_F758/image_thumb.png" width="733" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;There you should see the (very inflexible and buggy) availability monitor:    &lt;br /&gt;&lt;a href="http://code4ward.net/cs2/blogs/code4ward/WindowsLiveWriter/BetterWindowsServiceMonitoringwithOperat_F758/image_4.png"&gt;&lt;img height="140" alt="image" src="http://code4ward.net/cs2/blogs/code4ward/WindowsLiveWriter/BetterWindowsServiceMonitoringwithOperat_F758/image_thumb_1.png" width="474" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Right-click on the &amp;quot;Service Running State&amp;quot; monitor and select &amp;quot;Overrides &amp;gt; Override the Monitor &amp;gt; For all objects of type: Print Spooler&amp;quot;. In the Override Properties, disable the monitor (check &amp;quot;Override&amp;quot; for the Parameter Name &amp;quot;Enabled&amp;quot; and change the &amp;quot;Override Setting&amp;quot; to &amp;quot;False&amp;quot;).&lt;/p&gt;  &lt;p&gt;Next, right-click on the &amp;quot;Availability&amp;quot; node and select &amp;quot;Create a monitor &amp;gt; Unit Monitor...&amp;quot;. In the unit monitor dialog, select the &amp;quot;Scripting &amp;gt; Generic &amp;gt; Timed Script Two State Monitor&amp;quot; as monitor type and place it in the same Management Pack &amp;quot;Windows Service Monitoring&amp;quot;.&lt;/p&gt;  &lt;p&gt;In the General properties page we can now target the script to the &amp;quot;Print Spooler&amp;quot; class. Also be sure to disable the monitor by default (We enable it later using a group override).    &lt;br /&gt;&lt;a href="http://code4ward.net/cs2/blogs/code4ward/WindowsLiveWriter/BetterWindowsServiceMonitoringwithOperat_F758/image_6.png"&gt;&lt;img height="435" alt="image" src="http://code4ward.net/cs2/blogs/code4ward/WindowsLiveWriter/BetterWindowsServiceMonitoringwithOperat_F758/image_thumb_2.png" width="527" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Pick a schedule which makes sense to you (I recommend every 5 minutes but depending on your environment I suggest that you don&amp;#39;t go below 2 minutes).&lt;/p&gt;  &lt;p&gt;In the Script page, provide a script name, like CheckServiceState.vbs and paste the attached script into the script area.&lt;/p&gt;  &lt;p&gt;The script takes 3 parameters (documented in the script) but for a standard scenario you can just use:    &lt;br /&gt;&amp;quot;$Target/Property[Type=&amp;quot;MicrosoftSystemCenterNTServiceLibrary!Microsoft.SystemCenter.NTService&amp;quot;]/DisplayName$&amp;quot; &amp;quot;Running&amp;quot; &amp;quot;Auto&amp;quot;&lt;/p&gt;  &lt;p&gt;Because we already target the print spooler class we can use a dynamic parameter to pass on the service name. Parameter 2 and 3 (which is optional) can be used to define the desired status and startup type. Please be sure to encapsulate each parameter in double-quotes - just to be on the safe side.&lt;/p&gt;  &lt;p&gt;Next let&amp;#39;s define the health expressions:    &lt;br /&gt;&lt;a href="http://code4ward.net/cs2/blogs/code4ward/WindowsLiveWriter/BetterWindowsServiceMonitoringwithOperat_F758/image_8.png"&gt;&lt;img height="84" alt="image" src="http://code4ward.net/cs2/blogs/code4ward/WindowsLiveWriter/BetterWindowsServiceMonitoringwithOperat_F758/image_thumb_3.png" width="732" border="0" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;a href="http://code4ward.net/cs2/blogs/code4ward/WindowsLiveWriter/BetterWindowsServiceMonitoringwithOperat_F758/image_10.png"&gt;&lt;img height="73" alt="image" src="http://code4ward.net/cs2/blogs/code4ward/WindowsLiveWriter/BetterWindowsServiceMonitoringwithOperat_F758/image_thumb_4.png" width="731" border="0" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;a href="http://code4ward.net/cs2/blogs/code4ward/WindowsLiveWriter/BetterWindowsServiceMonitoringwithOperat_F758/image_12.png"&gt;&lt;img height="88" alt="image" src="http://code4ward.net/cs2/blogs/code4ward/WindowsLiveWriter/BetterWindowsServiceMonitoringwithOperat_F758/image_thumb_5.png" width="733" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;And finally the alert:    &lt;br /&gt;&lt;a href="http://code4ward.net/cs2/blogs/code4ward/WindowsLiveWriter/BetterWindowsServiceMonitoringwithOperat_F758/image_14.png"&gt;&lt;img height="376" alt="image" src="http://code4ward.net/cs2/blogs/code4ward/WindowsLiveWriter/BetterWindowsServiceMonitoringwithOperat_F758/image_thumb_6.png" width="515" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I suggest an alert description like:    &lt;br /&gt;The state of the monitored service &amp;#39;$Target/Property[Type=&amp;quot;MicrosoftSystemCenterNTServiceLibrary!Microsoft.SystemCenter.NTService&amp;quot;]/DisplayName$&amp;#39; on &amp;#39;$Target/Host/Property[Type=&amp;quot;Windows!Microsoft.Windows.Computer&amp;quot;]/NetworkName$&amp;#39; is invalid: $Data/Context/Property[@Name=&amp;#39;AlertText&amp;#39;]$     &lt;br /&gt;    &lt;br /&gt;After you created your monitor, enable it using an override for the group we created earlier.&lt;/p&gt;  &lt;p&gt;As last (optional) step I suggest to create a state view containing the Print Spooler instances and scoped to the group where we enabled the monitor.    &lt;br /&gt;&lt;a href="http://code4ward.net/cs2/blogs/code4ward/WindowsLiveWriter/BetterWindowsServiceMonitoringwithOperat_F758/image_20.png"&gt;&lt;img height="723" alt="image" src="http://code4ward.net/cs2/blogs/code4ward/WindowsLiveWriter/BetterWindowsServiceMonitoringwithOperat_F758/image_thumb_9.png" width="970" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Of course, it would be much better if that functionality and flexibility is provided by OpsMgr out of the box...&lt;/p&gt;  &lt;p&gt;cheers&lt;/p&gt;&lt;img src="http://code4ward.net/cs2/aggbug.aspx?PostID=1227" width="1" height="1"&gt;</content><author><name>StefanKoell</name><uri>http://code4ward.net/cs2/members/StefanKoell.aspx</uri></author><category term="Windows Management" scheme="http://code4ward.net/cs2/blogs/code4ward/archive/tags/Windows+Management/default.aspx" /></entry><entry><title>Merry Christmas and a happy, healthy and successful Year 2008</title><link rel="alternate" type="text/html" href="http://code4ward.net/cs2/blogs/code4ward/archive/2007/12/24/merry-christmas-and-a-happy-healthy-and-successful-year-2008.aspx" /><id>http://code4ward.net/cs2/blogs/code4ward/archive/2007/12/24/merry-christmas-and-a-happy-healthy-and-successful-year-2008.aspx</id><published>2007-12-24T14:45:00Z</published><updated>2007-12-24T14:45:00Z</updated><content type="html">&lt;p&gt;2007 was a roller coaster ride: my business and work was all about monitoring and operations manager 2007. My personal life changed dramatically when my son got 2 little sisters in August. Now we are preparing all the gifts for our first Christmas as a gang of five!&lt;/p&gt;
&lt;p&gt;For 2008 I am considering to make a commercial (shareware) version of Royal TS or whatever it will be called. If I really&amp;nbsp;do this, you can expect a first class,&amp;nbsp;versatile and powerful tool!&amp;nbsp;There will always be a free (maybe somehow limited) version and Royal TS will eventually just get bug fixes but no new features.&lt;/p&gt;
&lt;p&gt;Anyway, I wish you all nice and relaxing&amp;nbsp;holidays.&lt;/p&gt;
&lt;p&gt;cu&lt;/p&gt;
&lt;p&gt;cheers&amp;nbsp;&lt;/p&gt;&lt;img src="http://code4ward.net/cs2/aggbug.aspx?PostID=1085" width="1" height="1"&gt;</content><author><name>StefanKoell</name><uri>http://code4ward.net/cs2/members/StefanKoell.aspx</uri></author></entry><entry><title>Operations Manager Powershell Tasks</title><link rel="alternate" type="text/html" href="http://code4ward.net/cs2/blogs/code4ward/archive/2007/12/18/operations-manager-powershell-tasks.aspx" /><id>http://code4ward.net/cs2/blogs/code4ward/archive/2007/12/18/operations-manager-powershell-tasks.aspx</id><published>2007-12-18T13:00:26Z</published><updated>2007-12-18T13:00:26Z</updated><content type="html">&lt;p&gt;Once again, a little post to share with you guys about Operations Manager Tasks - this time using Powershell. First a little background story: Current version of Operations Manager 2007 (SP1RC) has still some nasty bugs and it seems that especially the events view doesn&amp;#39;t get much attention from the product team.&lt;/p&gt; &lt;p&gt;The event view &lt;strong&gt;doesn&amp;#39;t HTML-Encode&lt;/strong&gt; the event description in the details pane. Which is bad if you have to look at events (published exceptions for example) with fragments of XML or HTML included. This information just doesn&amp;#39;t appear in the preview pane.&lt;/p&gt; &lt;p&gt;So, the first thing which came to my mind is: Ok, then. How about some kind of console task which executes a quick Powershell command to dump out the event details using the Get-Event Cmd-Let.&lt;/p&gt; &lt;p&gt;Next Problem: You &lt;strong&gt;can&lt;/strong&gt; create an event task and put a dynamic parameter $ID$ in it. However, starting the task using the actions pane on the right always passes the same ID (I guess the ID from the first event selected when the view gets loaded) to the task - &lt;strong&gt;regardless which event was selected&lt;/strong&gt;!&lt;/p&gt; &lt;p&gt;Lucky me, there is a workaround: When you execute the task using the Actions menu in the console, the task will always get the ID from the selected event.&lt;/p&gt; &lt;p&gt;So, now the interesting stuff: How to setup such a task?&lt;/p&gt; &lt;ul&gt; &lt;li&gt;First create a console task for events using the authoring section in the console.&lt;/li&gt; &lt;li&gt;When defining the command, set the application to: &lt;strong&gt;C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;Set the parameter to: &lt;strong&gt;-PSConsoleFile Microsoft.EnterpriseManagement.OperationsManager.ClientShell.Console.psc1 -NoExit .\Microsoft.EnterpriseManagement.OperationsManager.ClientShell.Startup.ps1;Get-Event -Id $ID$&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;Set the working directory to: &lt;strong&gt;C:\Program Files\System Center Operations Manager 2007&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;Finally, &lt;strong&gt;uncheck &lt;/strong&gt;the &lt;strong&gt;&amp;quot;Display output when the task is run&amp;quot;&lt;/strong&gt; checkbox&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;That&amp;#39;s it. Enjoy...&lt;/p&gt;&lt;img src="http://code4ward.net/cs2/aggbug.aspx?PostID=1075" width="1" height="1"&gt;</content><author><name>StefanKoell</name><uri>http://code4ward.net/cs2/members/StefanKoell.aspx</uri></author><category term="Windows Management" scheme="http://code4ward.net/cs2/blogs/code4ward/archive/tags/Windows+Management/default.aspx" /></entry><entry><title>Royal TS 1.4</title><link rel="alternate" type="text/html" href="http://code4ward.net/cs2/blogs/code4ward/archive/2007/09/24/royal-ts-1-4.aspx" /><id>http://code4ward.net/cs2/blogs/code4ward/archive/2007/09/24/royal-ts-1-4.aspx</id><published>2007-09-24T13:24:00Z</published><updated>2007-09-24T13:24:00Z</updated><content type="html">&lt;p&gt;&amp;nbsp;So I did it...&lt;/p&gt;&lt;p&gt;I just released Version 1.4 and I&amp;#39;m totally excited what my user base or any new user will think of this release. I hope I will get a lot of feedback.&lt;/p&gt;&lt;p&gt;&amp;nbsp;Have fun...&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://code4ward.net/cs2/aggbug.aspx?PostID=687" width="1" height="1"&gt;</content><author><name>StefanKoell</name><uri>http://code4ward.net/cs2/members/StefanKoell.aspx</uri></author><category term="Royal TS 1.x" scheme="http://code4ward.net/cs2/blogs/code4ward/archive/tags/Royal+TS+1.x/default.aspx" /><category term="RoyalTS" scheme="http://code4ward.net/cs2/blogs/code4ward/archive/tags/RoyalTS/default.aspx" /></entry><entry><title>Set-NotificationForAlert</title><link rel="alternate" type="text/html" href="http://code4ward.net/cs2/blogs/code4ward/archive/2007/09/19/set-notificationforalert.aspx" /><id>http://code4ward.net/cs2/blogs/code4ward/archive/2007/09/19/set-notificationforalert.aspx</id><published>2007-09-19T11:42:00Z</published><updated>2007-09-19T11:42:00Z</updated><content type="html">&lt;p&gt;In MOM 2005 it was easy to notify someone on specific alerts. SCOM 2007 - with it&amp;#39;s subscription based system - cannot handle these kind of notifications. But the limitation is the user interface. Jakub from the SCOM 2007 product team released some &lt;a href="http://blogs.msdn.com/jakuboleksy/archive/2007/01/18/notification-subscriptions.aspx" target="_blank"&gt;very useful code&lt;/a&gt; which helped&amp;nbsp;to implement a notification based on the alert name. One problem of Jakubs code is, that it&amp;#39;s a C# program which is not very handy and that he creates most of the stuff in code which can be created with the UI.&lt;/p&gt;
&lt;p&gt;I translated the script to power shell, which should be much friendlier to use, deploy and let&amp;#39;s you quickly tweak some settings. The code below works for me (at least working with email notifications), but I have to admit, I didn&amp;#39;t test it that much. The script usage is pretty simple, but you have to do some stuff first:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Setup email notification&lt;/li&gt;
&lt;li&gt;Create at least one recipient&lt;/li&gt;
&lt;li&gt;The alert has to be raised at least once&lt;/li&gt;
&lt;li&gt;Change the $RMS variable in the script to your root management server&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Then, just execute it in Power Shell: &amp;quot;.C:\Set-NotificationForAlert.ps1 &amp;quot;This is a test alert&amp;quot; &amp;quot;This is a test notification recipient&amp;quot;&lt;/p&gt;
&lt;p&gt;Parameter 1: The name of the alert&lt;/p&gt;
&lt;p&gt;Parameter 2: The name of the recipient &lt;/p&gt;
&lt;div style="BORDER-RIGHT:gray 1px solid;PADDING-RIGHT:4px;BORDER-TOP:gray 1px solid;PADDING-LEFT:4px;FONT-SIZE:8pt;PADDING-BOTTOM:4px;MARGIN:20px 0px 10px;OVERFLOW:auto;BORDER-LEFT:gray 1px solid;WIDTH:85%;CURSOR:text;MAX-HEIGHT:400px;LINE-HEIGHT:12pt;PADDING-TOP:4px;BORDER-BOTTOM:gray 1px solid;FONT-FAMILY:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;HEIGHT:400px;"&gt;&lt;pre style="PADDING-RIGHT:0px;PADDING-LEFT:0px;FONT-SIZE:8pt;PADDING-BOTTOM:0px;MARGIN:0em;OVERFLOW:visible;WIDTH:100%;COLOR:black;BORDER-TOP-STYLE:none;LINE-HEIGHT:12pt;PADDING-TOP:0px;FONT-FAMILY:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;BORDER-RIGHT-STYLE:none;BORDER-LEFT-STYLE:none;BORDER-BOTTOM-STYLE:none;"&gt;## check &lt;span&gt;for&lt;/span&gt; parameters&lt;br /&gt;param(&lt;br /&gt;    [&lt;span&gt;string&lt;/span&gt;]$AlertName                 = $(&lt;span&gt;throw&lt;/span&gt; write-host &lt;span&gt;&amp;quot;You did not specify the -AlertName parameter.&amp;quot;&lt;/span&gt;),&lt;br /&gt;    [&lt;span&gt;string&lt;/span&gt;]$NotificationRecipientName = $(&lt;span&gt;throw&lt;/span&gt; write-host &lt;span&gt;&amp;quot;You did not specify the -NotificationRecipientName parameter. Use the Get-NotificationRecipient command to get a list of all registered notification recipients&amp;quot;&lt;/span&gt;)&lt;br /&gt;    )&lt;br /&gt;&lt;/pre&gt;&lt;pre style="PADDING-RIGHT:0px;PADDING-LEFT:0px;FONT-SIZE:8pt;PADDING-BOTTOM:0px;MARGIN:0em;OVERFLOW:visible;WIDTH:100%;COLOR:black;BORDER-TOP-STYLE:none;LINE-HEIGHT:12pt;PADDING-TOP:0px;FONT-FAMILY:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;BORDER-RIGHT-STYLE:none;BORDER-LEFT-STYLE:none;BORDER-BOTTOM-STYLE:none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="PADDING-RIGHT:0px;PADDING-LEFT:0px;FONT-SIZE:8pt;PADDING-BOTTOM:0px;MARGIN:0em;OVERFLOW:visible;WIDTH:100%;COLOR:black;BORDER-TOP-STYLE:none;LINE-HEIGHT:12pt;PADDING-TOP:0px;FONT-FAMILY:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;BORDER-RIGHT-STYLE:none;BORDER-LEFT-STYLE:none;BORDER-BOTTOM-STYLE:none;"&gt;$RMS = &amp;quot;RootManagementServerName&amp;quot;&lt;/pre&gt;&lt;pre style="PADDING-RIGHT:0px;PADDING-LEFT:0px;FONT-SIZE:8pt;PADDING-BOTTOM:0px;MARGIN:0em;OVERFLOW:visible;WIDTH:100%;COLOR:black;BORDER-TOP-STYLE:none;LINE-HEIGHT:12pt;PADDING-TOP:0px;FONT-FAMILY:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;BORDER-RIGHT-STYLE:none;BORDER-LEFT-STYLE:none;BORDER-BOTTOM-STYLE:none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="PADDING-RIGHT:0px;PADDING-LEFT:0px;FONT-SIZE:8pt;PADDING-BOTTOM:0px;MARGIN:0em;OVERFLOW:visible;WIDTH:100%;COLOR:black;BORDER-TOP-STYLE:none;LINE-HEIGHT:12pt;PADDING-TOP:0px;FONT-FAMILY:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;BORDER-RIGHT-STYLE:none;BORDER-LEFT-STYLE:none;BORDER-BOTTOM-STYLE:none;"&gt;&lt;p&gt;write-Host &lt;br /&gt;write-Host &lt;span&gt;&amp;quot;Executing Set-NotificationForAlert.ps1 ...&amp;quot;&lt;/span&gt;&lt;br /&gt;write-Host &lt;br /&gt;&lt;br /&gt;## prepare OpsMgr shell&lt;br /&gt;&lt;br /&gt;&lt;span&gt;if&lt;/span&gt; ((Get-PSSnapin | Where-Object {$_.Name -eq &lt;span&gt;&amp;#39;Microsoft.EnterpriseManagement.OperationsManager.Client&amp;#39;&lt;/span&gt;}) -eq $&lt;span&gt;null&lt;/span&gt;) {&lt;br /&gt;    Write-Host&lt;br /&gt;    Write-Host &lt;span&gt;&amp;quot;File OpsMgrV3.ps1 loaded.&amp;quot;&lt;/span&gt;&lt;br /&gt;    Write-Host &lt;span&gt;&amp;quot;Initializing shell for operations manager...&amp;quot;&lt;/span&gt;&lt;br /&gt;    Write-Host &lt;span&gt;&amp;quot;Add Microsoft.EnterpriseManagement.OperationsManager.Client snap in.&amp;quot;&lt;/span&gt;&lt;br /&gt;    Add-PSSnapin Microsoft.EnterpriseManagement.OperationsManager.Client -ErrorAction SilentlyContinue -ErrorVariable Err&lt;br /&gt;    &lt;span&gt;if&lt;/span&gt; ($Err) { $(&lt;span&gt;throw&lt;/span&gt; write-Host $Err) }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span&gt;if&lt;/span&gt; ((Get-ManagementGroupConnection | Where-Object {$_.ManagementServerName -eq $RMS}) -eq $&lt;span&gt;null&lt;/span&gt;) {&lt;br /&gt;    Write-Host &lt;span&gt;&amp;quot;Connect to Management Server: $RMS&amp;quot;&lt;/span&gt;&lt;br /&gt;    New-ManagementGroupConnection $RMS -ErrorAction SilentlyContinue -ErrorVariable Err&lt;br /&gt;    &lt;span&gt;if&lt;/span&gt; ($Err) { $(&lt;span&gt;throw&lt;/span&gt; write-Host $Err) }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span&gt;if&lt;/span&gt; ((Get-PSDrive | Where-Object {$_.Name -eq &lt;span&gt;&amp;#39;Monitoring&amp;#39;&lt;/span&gt;}) -eq $&lt;span&gt;null&lt;/span&gt;) {&lt;br /&gt;    Write-Host &lt;span&gt;&amp;quot;Create Monitoring drive from Provider.&amp;quot;&lt;/span&gt;&lt;br /&gt;    New-PSDrive -Name: Monitoring -PSProvider: OperationsManagerMonitoring -Root: \ -ErrorAction SilentlyContinue -ErrorVariable Err&lt;br /&gt;    &lt;span&gt;if&lt;/span&gt; ($Err) { $(&lt;span&gt;throw&lt;/span&gt; write-Host $Err) }&lt;br /&gt;    Write-Host &lt;span&gt;&amp;quot;Operations manager shell initialized.&amp;quot;&lt;/span&gt;&lt;br /&gt;    Write-Host&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Set-Location Monitoring:\$RMS&lt;br /&gt;&lt;br /&gt;$Alerts = Get-Alert | &lt;span&gt;where&lt;/span&gt; {$_.Name -eq $AlertName}&lt;br /&gt;&lt;span&gt;if&lt;/span&gt; ($Alerts.ProblemId -eq $&lt;span&gt;null&lt;/span&gt;)&lt;br /&gt;{&lt;br /&gt;    &lt;span&gt;if&lt;/span&gt; ($Alerts.Count -gt 0) &lt;br /&gt;    {&lt;br /&gt;        $ProblemID = $Alerts[0].ProblemId.ToString()&lt;br /&gt;    }&lt;br /&gt;    &lt;span&gt;else&lt;/span&gt;&lt;br /&gt;    {&lt;br /&gt;        &lt;span&gt;throw&lt;/span&gt; write-host &lt;span&gt;&amp;quot;No alert was found with the specified name&amp;quot;&lt;/span&gt;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;span&gt;else&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;    $ProblemId = $Alerts.ProblemId.ToString()&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;## load SDK assemblies&lt;br /&gt;[System.Reflection.Assembly]::LoadWithPartialName(&lt;span&gt;&amp;quot;Microsoft.EnterpriseManagement&amp;quot;&lt;/span&gt;)&lt;br /&gt;[System.Reflection.Assembly]::LoadWithPartialName(&lt;span&gt;&amp;quot;Microsoft.EnterpriseManagement.Configuration&amp;quot;&lt;/span&gt;)&lt;br /&gt;[System.Reflection.Assembly]::LoadWithPartialName(&lt;span&gt;&amp;quot;Microsoft.EnterpriseManagement.ConnectorFramework&amp;quot;&lt;/span&gt;)&lt;br /&gt;[System.Reflection.Assembly]::LoadWithPartialName(&lt;span&gt;&amp;quot;Microsoft.EnterpriseManagement.Monitoring&amp;quot;&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;## connect to management group&lt;br /&gt;$ManagementGroup = New-Object Microsoft.EnterpriseManagement.ManagementGroup($RMS)&lt;br /&gt;$ManagementGroup.Reconnect()&lt;br /&gt;&lt;br /&gt;$smtpAction      = $ManagementGroup.GetNotificationAction(&lt;span&gt;&amp;quot;DefaultSmtpAction&amp;quot;&lt;/span&gt;)&lt;br /&gt;$recipient       = $ManagementGroup.GetNotificationRecipient($NotificationRecipientName)&lt;br /&gt;$config&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = New-Object Microsoft.EnterpriseManagement.Administration.AlertChangedSubscriptionConfiguration([Microsoft.EnterpriseManagement.Administration.AlertSubscriptionConfigurationType]::Any)&lt;/p&gt;&lt;p&gt;$config.Criteria = &lt;span&gt;&amp;quot;&amp;lt;SimpleExpression&amp;gt;&amp;lt;ValueExpression&amp;gt;&amp;lt;Property&amp;gt;ProblemId&amp;lt;/Property&amp;gt;&amp;lt;/ValueExpression&amp;gt;&amp;lt;Operator&amp;gt;Equal&amp;lt;/Operator&amp;gt;&amp;lt;ValueExpression&amp;gt;&amp;lt;Value&amp;gt;$ProblemId&amp;lt;/Value&amp;gt;&amp;lt;/ValueExpression&amp;gt;&amp;lt;/SimpleExpression&amp;gt;&amp;quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;$config.ExpirationStartTime = Get-Date&lt;br /&gt;$config.PollingIntervalMinutes = 1&lt;br /&gt;&lt;br /&gt;$NewGuid         = [System.Guid]::NewGuid()&lt;br /&gt;$NewGuid         = $NewGuid.ToString().Replace(&lt;span&gt;&amp;#39;-&amp;#39;&lt;/span&gt;, &lt;span&gt;&amp;#39;_&amp;#39;&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;$Subscription    = New-Object Microsoft.EnterpriseManagement.Administration.AlertNotificationSubscription(&lt;span&gt;&amp;quot;STACustomSubscription$NewGuid&amp;quot;&lt;/span&gt;, $config)&lt;br /&gt;&lt;br /&gt;$Subscription.DisplayName = $NotificationRecipientName + &lt;span&gt;&amp;quot; - &amp;quot;&lt;/span&gt; + $AlertName&lt;br /&gt;$Subscription.ToRecipients.Add($recipient)&lt;br /&gt;$Subscription.Actions.Add($smtpAction)&lt;br /&gt;$ManagementGroup.InsertNotificationSubscription($Subscription)&lt;/p&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So, hopefully I can ease some pain with this...&lt;/p&gt;&lt;img src="http://code4ward.net/cs2/aggbug.aspx?PostID=679" width="1" height="1"&gt;</content><author><name>StefanKoell</name><uri>http://code4ward.net/cs2/members/StefanKoell.aspx</uri></author><category term="Windows Management" scheme="http://code4ward.net/cs2/blogs/code4ward/archive/tags/Windows+Management/default.aspx" /><category term="Development" scheme="http://code4ward.net/cs2/blogs/code4ward/archive/tags/Development/default.aspx" /></entry><entry><title>Royal TS 1.4 Coming Soon...</title><link rel="alternate" type="text/html" href="http://code4ward.net/cs2/blogs/code4ward/archive/2007/09/16/royal-ts-1-4-coming-soon.aspx" /><id>http://code4ward.net/cs2/blogs/code4ward/archive/2007/09/16/royal-ts-1-4-coming-soon.aspx</id><published>2007-09-16T20:16:00Z</published><updated>2007-09-16T20:16:00Z</updated><content type="html">&lt;img style="BORDER-RIGHT:0px;BORDER-TOP:0px;MARGIN:0px 0px 0px 20px;BORDER-LEFT:0px;BORDER-BOTTOM:0px;" height="480" alt="RTS14" src="http://code4ward.net/cs2/blogs/code4ward/WindowsLiveWriter/RoyalTS1.4ComingSoon_13A9E/RTS14_1.png" width="640" align="right" border="0" /&gt; 
&lt;p&gt;I got a lot of feedback recently about Royal TS, mostly about the .NET Framework 1.1 requirement. Because of my poor involvement in the Royal TS 2.0 project, I decided to dig out the &amp;quot;old&amp;quot; code base and do some dirty hacks to get some of your requested features out in the wild. So what changed?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Requires .NET Framework 2.0&lt;/li&gt;
&lt;li&gt;User Interface Upgrade&lt;br /&gt;I got rid of all 3rd Party controls and used only built-in controls (except for the Remote Desktop Control of course)&lt;/li&gt;
&lt;li&gt;No more duplicate connection names or folder names possible&lt;/li&gt;
&lt;li&gt;Connection list when a folder or the document is selected&lt;/li&gt;
&lt;li&gt;The connection list also features a search function&lt;/li&gt;
&lt;li&gt;Bulk-Edit (includes the ability to re-apply credentials to multiple connections - which is handy when you changed the password)&lt;/li&gt;
&lt;li&gt;Ability to send a message to a remote session and log off a remote session&lt;/li&gt;
&lt;li&gt;Some basic logging (double-click on the status bar)&lt;/li&gt;
&lt;li&gt;and more...&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;So stay tuned, this beast will be released soon...&lt;/p&gt;&lt;img src="http://code4ward.net/cs2/aggbug.aspx?PostID=676" width="1" height="1"&gt;</content><author><name>StefanKoell</name><uri>http://code4ward.net/cs2/members/StefanKoell.aspx</uri></author><category term="Development" scheme="http://code4ward.net/cs2/blogs/code4ward/archive/tags/Development/default.aspx" /><category term="Royal TS 1.x" scheme="http://code4ward.net/cs2/blogs/code4ward/archive/tags/Royal+TS+1.x/default.aspx" /><category term="RoyalTS" scheme="http://code4ward.net/cs2/blogs/code4ward/archive/tags/RoyalTS/default.aspx" /></entry><entry><title>Just testing Windows Live Writer</title><link rel="alternate" type="text/html" href="http://code4ward.net/cs2/blogs/code4ward/archive/2007/08/23/just-testing-windows-live-writer.aspx" /><id>http://code4ward.net/cs2/blogs/code4ward/archive/2007/08/23/just-testing-windows-live-writer.aspx</id><published>2007-08-23T20:46:12Z</published><updated>2007-08-23T20:46:12Z</updated><content type="html">&lt;p&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="101" alt="Page authoring" src="http://byfiles.storage.msn.com/y1pE9h6adBL5pbDHaUPbabMtvL7T6p1cvy_RMUWjbHhW_qr1UtVYOfCslqu6PPRpaYu" width="226" border="0" /&gt;&lt;/p&gt; &lt;p&gt;Really, setting &lt;a href="http://windowslivewriter.spaces.live.com/" target="_blank"&gt;it&lt;/a&gt; up was a pain in the a**. I guess because it&amp;#39;s still beta. However, I&amp;#39;ve done it and it&amp;#39;s working - hopefully...&lt;/p&gt;&lt;img src="http://code4ward.net/cs2/aggbug.aspx?PostID=652" width="1" height="1"&gt;</content><author><name>StefanKoell</name><uri>http://code4ward.net/cs2/members/StefanKoell.aspx</uri></author><category term="Windows Software" scheme="http://code4ward.net/cs2/blogs/code4ward/archive/tags/Windows+Software/default.aspx" /></entry><entry><title>SCOM 2007 Audit Collector in Untrusted Location</title><link rel="alternate" type="text/html" href="http://code4ward.net/cs2/blogs/code4ward/archive/2007/07/26/scom-2007-audit-collector-in-untrusted-location.aspx" /><id>http://code4ward.net/cs2/blogs/code4ward/archive/2007/07/26/scom-2007-audit-collector-in-untrusted-location.aspx</id><published>2007-07-26T14:21:00Z</published><updated>2007-07-26T14:21:00Z</updated><content type="html">&lt;p&gt;Clive Eastwood has an &lt;a class="" href="http://blogs.technet.com/cliveeastwood/archive/2007/05/11/how-to-configure-audit-collection-system-acs-to-use-certificate-based-authenication.aspx" target="_blank"&gt;excellent article&lt;/a&gt; how to setup Audit Collector Service using certificate based authentication.&lt;/p&gt;&lt;img src="http://code4ward.net/cs2/aggbug.aspx?PostID=624" width="1" height="1"&gt;</content><author><name>StefanKoell</name><uri>http://code4ward.net/cs2/members/StefanKoell.aspx</uri></author><category term="Windows Management" scheme="http://code4ward.net/cs2/blogs/code4ward/archive/tags/Windows+Management/default.aspx" /></entry><entry><title>Short Downtime, Community Server Update...</title><link rel="alternate" type="text/html" href="http://code4ward.net/cs2/blogs/code4ward/archive/2007/06/12/short-downtime-community-server-update.aspx" /><id>http://code4ward.net/cs2/blogs/code4ward/archive/2007/06/12/short-downtime-community-server-update.aspx</id><published>2007-06-12T16:32:00Z</published><updated>2007-06-12T16:32:00Z</updated><content type="html">&lt;p&gt;As some of you may already have noticed, code4ward was down for a couple of minutes. Now sporting a shiny, new &lt;a href="http://communityserver.org/r.ashx?1" target="_blank"&gt;Community Server 2007&lt;/a&gt; installation and some minor design changes. A big Kudos to the guys at &lt;a href="http://communityserver.org/r.ashx?2" target="_blank"&gt;telligent&lt;/a&gt; for the great piece of software...&lt;br /&gt;&lt;/p&gt;&lt;img src="http://code4ward.net/cs2/aggbug.aspx?PostID=570" width="1" height="1"&gt;</content><author><name>StefanKoell</name><uri>http://code4ward.net/cs2/members/StefanKoell.aspx</uri></author></entry><entry><title>IE Dev Toolbar - downloading right now...</title><link rel="alternate" type="text/html" href="http://code4ward.net/cs2/blogs/code4ward/archive/2007/05/11/ie-dev-toolbar-downloading-right-now.aspx" /><id>http://code4ward.net/cs2/blogs/code4ward/archive/2007/05/11/ie-dev-toolbar-downloading-right-now.aspx</id><published>2007-05-11T09:09:00Z</published><updated>2007-05-11T09:09:00Z</updated><content type="html">&lt;p&gt;Microsoft released their IE Add-On: &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=E59C3964-672D-4511-BB3E-2D5E1DB91038&amp;amp;displaylang=en"&gt;Developer Toolbar&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;Overview&lt;/h4&gt;&lt;a class="" name="Description"&gt;&lt;/a&gt;&lt;span&gt;&lt;br&gt;The
Internet Explorer Developer Toolbar provides several features for
exploring and understanding Web pages. These features enable you to:&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;ul&gt;&lt;li&gt;Explore and modify the document object model (DOM) of a Web page.&lt;/li&gt;&lt;li&gt;Locate and select specific elements on a Web page through a variety of techniques.&lt;/li&gt;&lt;li&gt;Selectively disable Internet Explorer settings.&lt;/li&gt;&lt;li&gt;View HTML object class names, ID's, and details such as link paths, tab index values, and access keys.&lt;/li&gt;&lt;li&gt;Outline tables, table cells, images, or selected tags.&lt;/li&gt;&lt;li&gt;Validate HTML, CSS, WAI, and RSS web feed links.&lt;/li&gt;&lt;li&gt;Display image dimensions, file sizes, path information, and alternate (ALT) text.&lt;/li&gt;&lt;li&gt;Immediately resize the browser window to a new resolution.&lt;/li&gt;&lt;li&gt;Selectively clear the browser cache and saved cookies. Choose from all objects or those associated with a given domain.&lt;/li&gt;&lt;li&gt;Display a fully featured design ruler to help accurately align and measure objects on your pages.&lt;/li&gt;&lt;li&gt;Find the style rules used to set specific style values on an element.&lt;/li&gt;&lt;li&gt;View the formatted and syntax colored source of HTML and CSS.&lt;/li&gt;&lt;/ul&gt;
&lt;br&gt;The Developer Toolbar can be pinned to the Internet Explorer browser window or floated separately.&lt;/span&gt;&lt;img src="http://code4ward.net/cs2/aggbug.aspx?PostID=520" width="1" height="1"&gt;</content><author><name>StefanKoell</name><uri>http://code4ward.net/cs2/members/StefanKoell.aspx</uri></author></entry><entry><title>Programmatic Group Membership Manipulation in SCOM 2007</title><link rel="alternate" type="text/html" href="http://code4ward.net/cs2/blogs/code4ward/archive/2007/05/03/manipulating-group-membership-in-scom-2007.aspx" /><id>http://code4ward.net/cs2/blogs/code4ward/archive/2007/05/03/manipulating-group-membership-in-scom-2007.aspx</id><published>2007-05-03T15:06:00Z</published><updated>2007-05-03T15:06:00Z</updated><content type="html">&lt;P&gt;Someone might ask: why the heck do I need that? And yes, I never thought that I will need it but I learned that in SCOM 2007 a group is not always a group.&lt;/P&gt;
&lt;P&gt;&lt;A class="" title="Jakub Oleksy" href="http://blogs.msdn.com/jakuboleksy/" target=_blank&gt;Jakub Oleksy&lt;/A&gt; helped me to understand and solve my problem and I am happy to share this information with you.&lt;/P&gt;
&lt;P&gt;The problem is, that groups created by the web application wizard can not be tweaked using the UI in SCOM 2007. It's not possible to create a dynamic membership rule. It's also not possible to assign a subgroup to such a group. So having a lot of servers and a lot of web applications it's not really fun to pick every single server in every single web application.&lt;/P&gt;
&lt;P&gt;Here my workaround:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Create a web application using the wizard&lt;BR&gt;A group named after your web application&amp;nbsp;with the suffix "watcher computers group" will be created&lt;/LI&gt;
&lt;LI&gt;Create your own computer group using the UI and define a dynamic membership rule&lt;/LI&gt;
&lt;LI&gt;Configure the script (the 3 lines at the beginning) and test (&lt;STRONG&gt;DO NOT RUN THIS UNTESTED IN PRODUCTION ENVIRONMENT!&lt;/STRONG&gt;)&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;This is just a proof-of-concept script to show how you can do stuff like this. According to Jakub there may be a fix in SP1 which enables you to utilize the group created by the web application wizard in a way to either create a dynamic membership rule or attaching a subgroup, or both.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Disclaimer:&lt;BR&gt;&lt;/U&gt;USE THIS AT YOUR OWN RISK. I AM NOT RESPONSIBLE FOR ANY DAMAGE THIS SCRIPT MAY CAUSE. THAT SAID, HAVE FUN!&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;PowerShell Source Code: &lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;DIV style="OVERFLOW-X:scroll;WIDTH:100%;"&gt;&lt;PRE&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$ManagementServer&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;ServerNameHere!&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$SourceGroupID&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; GetComputerGroupIDFromDisplayName(&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;DisplayName of SourceGroup&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;)
&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$DestinationGroupID&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; GetComputerGroupIDFromDisplayName(&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;WebAppName watcher computers group&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;)

&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; (CompareComputerGroupMembership(&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$SourceGroupID&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$DestinationGroupID&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;-eq&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#ff0000;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;)
{
    SyncComputerGroupMembership(&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$SourceGroupID&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$DestinationGroupID&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$ManagementServer&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;)
}

&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; SyncComputerGroupMembership([&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;string&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;] &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$SourceGroupID&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;, [&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;string&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;] &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$DestinationGroupID&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;, [&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;string&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;] &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$ManagmentServer&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;)
{
    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;#&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;# load SDK assemblies&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;    [System.Reflection.Assembly]::LoadWithPartialName(&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;Microsoft.EnterpriseManagement&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;)
    [System.Reflection.Assembly]::LoadWithPartialName(&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;Microsoft.EnterpriseManagement.Configuration&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;)
    [System.Reflection.Assembly]::LoadWithPartialName(&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;Microsoft.EnterpriseManagement.ConnectorFramework&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;)
    [System.Reflection.Assembly]::LoadWithPartialName(&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;Microsoft.EnterpriseManagement.Monitoring&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;)
    
    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;#&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;# connect to management group&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$ManagementGroup&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#008080;"&gt;New-Object&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; Microsoft.EnterpriseManagement.ManagementGroup(&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$ManagementServer&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;)

    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;#&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;# build include list xml items from source group childs&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$IncludeListXML&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;""&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;
    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$SourceGroupChilds&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#008080;"&gt;Get-ChildItem&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008080;"&gt;Get-MonitoringClass&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; where {&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$_&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;.Name &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;-eq&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$SourceGroupID&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;}) &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; Sort DisplayName
    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;foreach&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$SourceGroupChild&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$SourceGroupChilds&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;) { &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$IncludeListXML&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$IncludeListXML&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;&amp;lt;MonitoringObjectId&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$SourceGroupChild&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;.Id.ToString() &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;&amp;lt;/MonitoringObjectId&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;)}

    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;#&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;# get destination group's discovery configuration&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$DestinationGroup&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$ManagementGroup&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;.GetMonitoringClasses(&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$DestinationGroupID&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;)[&lt;/SPAN&gt;&lt;SPAN style="COLOR:#ff0000;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;]
    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$Discovery&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$DestinationGroup&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;.GetMonitoringDiscoveries()[&lt;/SPAN&gt;&lt;SPAN style="COLOR:#ff0000;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;]
    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$DiscoveryConfiguration&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$DestinationGroup&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;.GetMonitoringDiscoveries()[&lt;/SPAN&gt;&lt;SPAN style="COLOR:#ff0000;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;].DataSource.Configuration

    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;#&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;# create new discovery configuration&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$NewConfiguration&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;""&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;
    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$DiscoveryConfiguration&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;.IndexOf(&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;&amp;lt;IncludeList&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;-lt&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#ff0000;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;)
    {
        &lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;#&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;# include list present&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;        &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$Start&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$DiscoveryConfiguration&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;.IndexOf(&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;&amp;lt;MembershipRules&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#ff0000;"&gt;17&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;
        &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$NewConfiguration&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;&amp;lt;MembershipRule&amp;gt;&amp;lt;MonitoringClass&amp;gt;$MPElement[Name="Windows!Microsoft.Windows.Computer"]$&amp;lt;/MonitoringClass&amp;gt;&amp;lt;RelationshipClass&amp;gt;$MPElement[Name="SC!Microsoft.SystemCenter.ComputerGroupContainsComputer"]$&amp;lt;/RelationshipClass&amp;gt;&amp;lt;IncludeList&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;
        &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$NewConfiguration&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$NewConfiguration&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$IncludeListXML&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;&amp;lt;/IncludeList&amp;gt;&amp;lt;/MembershipRule&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;
        &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$NewConfiguration&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$DiscoveryConfiguration&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;.Substring(&lt;/SPAN&gt;&lt;SPAN style="COLOR:#ff0000;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$Start&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$NewConfiguration&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$DiscoveryConfiguration&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;.Substring(&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$Start&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;)
    }
    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;else&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;
    {
        &lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;#&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;# include list not present&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;        &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$Start&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$DiscoveryConfiguration&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;.IndexOf(&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;&amp;lt;IncludeList&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#ff0000;"&gt;13&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;
        &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$End&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$DiscoveryConfiguration&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;.IndexOf(&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;&amp;lt;/IncludeList&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;)
        &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$NewConfiguration&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$DiscoveryConfiguration&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;.Substring(&lt;/SPAN&gt;&lt;SPAN style="COLOR:#ff0000;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$Start&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$IncludeListXML&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$DiscoveryConfiguration&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;.Substring(&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$End&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;)
    } 
    

    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;#&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;# set new discovery configuration&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$Discovery&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;.Status &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; [Microsoft.EnterpriseManagement.Configuration.ManagementPackElementStatus]::PendingUpdate
    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$Discovery&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;.DataSource.Configuration &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$NewConfiguration&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;
    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$Discovery&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;.GetManagementPack().AcceptChanges()
    
}

&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; GetComputerGroupIDFromDisplayName([&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;string&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;] &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$GroupDisplayName&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;)
{
    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;#&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;# returns the ID (name property) of the computer group specified by display name&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;return&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008080;"&gt;Get-MonitoringClass&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; where {&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$_&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;.DisplayName &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;-eq&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$GroupDisplayName&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;}).Name
}

&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; CompareComputerGroupMembership([&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;string&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;] &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$GroupID1&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;, [&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;string&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;] &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$GroupID2&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;)
{
    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;#&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;# use this function to compare the membership of 2 computer groups&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;#&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;# 2 parameters, IDs of the groups to compare&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;#&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;# returns 1 if the membership of the groups is identical, otherwise 0&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008000;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;    
    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$GroupID1Members&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#008080;"&gt;Get-ChildItem&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008080;"&gt;Get-MonitoringClass&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; where {&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$_&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;.Name &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;-eq&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$GroupID1&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;}) &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; Sort Id
    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$GroupID2Members&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#008080;"&gt;Get-ChildItem&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="COLOR:#008080;"&gt;Get-MonitoringClass&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; where {&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$_&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;.Name &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;-eq&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$GroupID2&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;}) &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; Sort Id
    
    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$GroupID1MembersString&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;""&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;
    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;foreach&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$Member1&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$GroupID1Members&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;) { &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$GroupID1MembersString&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$GroupID1MembersString&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$Member1&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;.Id.ToString() }

    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$GroupID2MembersString&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;""&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;
    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;foreach&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$Member2&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$GroupID2Members&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;) { &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$GroupID2MembersString&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$GroupID2MembersString&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$Member2&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;.Id.ToString() }

    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$GroupID1MembersString&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;-eq&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;$GroupID2MembersString&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt;) { &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;return&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#ff0000;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; }    &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;else&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; { &lt;/SPAN&gt;&lt;SPAN style="COLOR:#0000ff;"&gt;return&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:#ff0000;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="COLOR:#000000;"&gt; }
    
}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;img src="http://code4ward.net/cs2/aggbug.aspx?PostID=512" width="1" height="1"&gt;</content><author><name>StefanKoell</name><uri>http://code4ward.net/cs2/members/StefanKoell.aspx</uri></author><category term="Windows Management" scheme="http://code4ward.net/cs2/blogs/code4ward/archive/tags/Windows+Management/default.aspx" /><category term="Development" scheme="http://code4ward.net/cs2/blogs/code4ward/archive/tags/Development/default.aspx" /></entry></feed>