<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.pluralsight.com/community/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Matt&amp;#39;s Musings - All Comments</title><link>http://www.pluralsight.com/community/blogs/matt/default.aspx</link><description>BizTalk, Web Services, .Net and more</description><dc:language>en</dc:language><generator>CommunityServer 2008 SP1 (Build: 30619.63)</generator><item><title>re: MSDN Magazine article on building custom activities for workflows</title><link>http://www.pluralsight.com/community/blogs/matt/archive/2006/11/20/42286.aspx#52302</link><pubDate>Fri, 01 Aug 2008 10:54:39 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:52302</guid><dc:creator>Shane</dc:creator><description>&lt;p&gt;Thanks for posting - just found it over at MSDN.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=52302" width="1" height="1"&gt;</description></item><item><title>re: Understanding the FactHandle in a FactRetriever</title><link>http://www.pluralsight.com/community/blogs/matt/archive/2006/01/04/17825.aspx#52298</link><pubDate>Thu, 31 Jul 2008 16:42:21 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:52298</guid><dc:creator>Glenn Kees</dc:creator><description>&lt;p&gt;Awesome! &amp;nbsp;This is the only place I have come across such info...&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Glenn&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=52298" width="1" height="1"&gt;</description></item><item><title>re: PowerShell for BizTalk Server</title><link>http://www.pluralsight.com/community/blogs/matt/archive/2008/06/26/powershell-for-biztalk-server.aspx#52283</link><pubDate>Wed, 30 Jul 2008 15:02:09 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:52283</guid><dc:creator>matt-milner</dc:creator><description>&lt;p&gt;Moshe,&lt;/p&gt;
&lt;p&gt;Glad it worked and that I could help. &amp;nbsp;It wasn&amp;#39;t a bother at all, that&amp;#39;s why I posted this stuff and this is good conversation. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;On using the Enums, you are right that the text value would be better. &amp;nbsp;In PowerShell, the way you do this is to wrap the name in quotes:&lt;/p&gt;
&lt;p&gt;$null = $app.Stop(&amp;quot;StopAll&amp;quot;)&lt;/p&gt;
&lt;p&gt;Then Powershell will try to convert that string to an enum value. As long as the string you are using matches one of the allowed values, it works like a charm. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank for pointing that out, it is a nice improvement on the script for readability. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Matt&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=52283" width="1" height="1"&gt;</description></item><item><title>re: PowerShell for BizTalk Server</title><link>http://www.pluralsight.com/community/blogs/matt/archive/2008/06/26/powershell-for-biztalk-server.aspx#52282</link><pubDate>Wed, 30 Jul 2008 09:09:49 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:52282</guid><dc:creator>moshe ro</dc:creator><description>&lt;p&gt;Hi Matt.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m tring to implement the start function&lt;/p&gt;
&lt;p&gt;I tried to figure where did u get the &amp;quot;public enum &amp;quot; values ,but I didn&amp;#39;t find .&lt;/p&gt;
&lt;p&gt;I found in &lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/en-us/library/microsoft.biztalk.applicationdeployment.applicationstopoption.aspx"&gt;msdn.microsoft.com/.../microsoft.biztalk.applicationdeployment.applicationstopoption.aspx&lt;/a&gt; that &amp;quot;This enumeration supports the BizTalk Server 2006 infrastructure and is not intended to be used directly from your code.&amp;quot;&lt;/p&gt;
&lt;p&gt;My qeustion is ,How can I use the member name I.S.O the enum values ?&lt;/p&gt;
&lt;p&gt;I tried to run it like this way :&lt;/p&gt;
&lt;p&gt;$null = $app.Stop(StopAll) .&lt;/p&gt;
&lt;p&gt;But I got :&lt;/p&gt;
&lt;p&gt;Missing `)` in Method call .&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=52282" width="1" height="1"&gt;</description></item><item><title>re: PowerShell for BizTalk Server</title><link>http://www.pluralsight.com/community/blogs/matt/archive/2008/06/26/powershell-for-biztalk-server.aspx#52281</link><pubDate>Wed, 30 Jul 2008 06:23:30 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:52281</guid><dc:creator>moshe ro</dc:creator><description>&lt;p&gt;Hi Matt.&lt;/p&gt;
&lt;p&gt;I set the value to 15 (as you recommended) and it solved the problem :-) .&lt;/p&gt;
&lt;p&gt;Your implementation save me the amounr of code that involves the need to unenlist each orch within a given dll ,and the &amp;nbsp;dependency &amp;nbsp;calculation of each orchs (inside the given dll).&lt;/p&gt;
&lt;p&gt;I want to thank you ,and apologize for bothering you and your blog.&lt;/p&gt;
&lt;p&gt;thanx and regards &lt;/p&gt;
&lt;p&gt;moshe ro&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=52281" width="1" height="1"&gt;</description></item><item><title>re: PowerShell for BizTalk Server</title><link>http://www.pluralsight.com/community/blogs/matt/archive/2008/06/26/powershell-for-biztalk-server.aspx#52274</link><pubDate>Tue, 29 Jul 2008 19:54:40 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:52274</guid><dc:creator>matt-milner</dc:creator><description>&lt;p&gt;Moshe,&lt;/p&gt;
&lt;p&gt;that value comes from the enum ApplicationStopOption&lt;/p&gt;
&lt;p&gt;public enum ApplicationStopOption&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;DisableAllReceiveLocations = 8,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;StopAll = 0x3f,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;StopReferencedApplications = 0x20,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;UndeployAllPolicies = 0x10,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;UnenlistAllOrchestrations = 1,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;UnenlistAllSendPortGroups = 4,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;UnenlistAllSendPorts = 2&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;this enum supports the &amp;quot;flags&amp;quot; option so it can bitwised together. &amp;nbsp;You might want to try a value of 15 (0x0f) to stop everything but policies and referenced applications. &amp;nbsp;This may be part of your problem. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;The docs for the enum are at: &lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://technet.microsoft.com/en-us/library/microsoft.biztalk.explorerom.applicationstopoption.aspx"&gt;technet.microsoft.com/.../microsoft.biztalk.explorerom.applicationstopoption.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hope this helps. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Matt&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=52274" width="1" height="1"&gt;</description></item><item><title>re: PowerShell for BizTalk Server</title><link>http://www.pluralsight.com/community/blogs/matt/archive/2008/06/26/powershell-for-biztalk-server.aspx#52272</link><pubDate>Tue, 29 Jul 2008 19:24:29 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:52272</guid><dc:creator>moshe ro</dc:creator><description>&lt;p&gt;Hi Matt ,&lt;/p&gt;
&lt;p&gt;Thanx for your patience .&lt;/p&gt;
&lt;p&gt;I would appreciate ,if you just explain what is the &amp;quot;63&amp;quot;&lt;/p&gt;
&lt;p&gt;from $null = $app.Stop(63) stands for ? ,and what is the &lt;/p&gt;
&lt;p&gt;source of getting this value(63)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=52272" width="1" height="1"&gt;</description></item><item><title>re: PowerShell for BizTalk Server</title><link>http://www.pluralsight.com/community/blogs/matt/archive/2008/06/26/powershell-for-biztalk-server.aspx#52257</link><pubDate>Mon, 28 Jul 2008 18:07:45 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:52257</guid><dc:creator>matt-milner</dc:creator><description>&lt;p&gt;Moshe,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t see anything wrong with the script. &amp;nbsp;When I run with dependencies on my machine, I get that error regardless of whether I use the admin console or the script / API. &amp;nbsp;Keep in mind that the admin console does let you select (on another tab) referencing applications to stop when you stop one application. &amp;nbsp;If you have that set, it might be trying to stop both in the console, but not in the script. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure how your orchestrations reference each other (do they use a Call or Start orchestration) but that might have something to do with it as well. &amp;nbsp;In my tests I just use dependencies of artifacts that are found in the admin console; depending on a send port in another app for instance.&lt;/p&gt;
&lt;p&gt;Have you tried writing the script that unenlists the depending orchestrations first, then stopping your application? &amp;nbsp;That should definitely work. &lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure what other help I can give as I can&amp;#39;t reproduce your problem on my end. &amp;nbsp;Sorry. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Matt&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=52257" width="1" height="1"&gt;</description></item><item><title>re: PowerShell for BizTalk Server</title><link>http://www.pluralsight.com/community/blogs/matt/archive/2008/06/26/powershell-for-biztalk-server.aspx#52252</link><pubDate>Mon, 28 Jul 2008 14:01:25 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:52252</guid><dc:creator>moshe ro</dc:creator><description>&lt;p&gt;Hi Matt,&lt;/p&gt;
&lt;p&gt;After I did a full stop in the admin console to my application ,the other Orchs (EAI_ATGW*) status in my other application is still started.&lt;/p&gt;
&lt;p&gt;Is it possible that you copy the example code that I wrote on 23/7 ,and run it &amp;nbsp;? (perhaps something is missing in the script)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=52252" width="1" height="1"&gt;</description></item><item><title>Double Click on the .sln file doesn't open Visual Studio on Vista</title><link>http://www.pluralsight.com/community/blogs/matt/archive/2007/05/21/47446.aspx#52241</link><pubDate>Sun, 27 Jul 2008 07:02:20 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:52241</guid><dc:creator>CodeMetropolis</dc:creator><description>&lt;p&gt;Double Click on the .sln file doesn&amp;#39;t open Visual Studio on Vista&lt;/p&gt;
&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=52241" width="1" height="1"&gt;</description></item><item><title>re: PowerShell for BizTalk Server</title><link>http://www.pluralsight.com/community/blogs/matt/archive/2008/06/26/powershell-for-biztalk-server.aspx#52206</link><pubDate>Thu, 24 Jul 2008 15:58:59 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:52206</guid><dc:creator>matt-milner</dc:creator><description>&lt;p&gt;Moshe,&lt;/p&gt;
&lt;p&gt;After you do the full stop in the admin console, what is the state of the orchestrations in your other application that depends on the orchestration in the application you are stopping.&lt;/p&gt;
&lt;p&gt;EAI_ATGW_Orchs.Async_TGW_Main_Orch, EAI_ATGW_Orchs &lt;/p&gt;
&lt;p&gt;AND&lt;/p&gt;
&lt;p&gt;EAI_ATGW_Orchs.Async_TGW_Transportation_Orch, EAI_ATGW_Orchs&lt;/p&gt;
&lt;p&gt;Are they stopped or unenlisted? Perhaps the admin console is doing some work behind the scenes for you that you&amp;#39;ll need to do manually with the object model (i.e. stopping or unenlisting those orchestrations that depend on the one you are unenlisting). &amp;nbsp;&lt;/p&gt;
&lt;p&gt;As far as I know, choosing a specific application by name will not get more than one application, and as you can see from the script, it does not iterate over the results. &amp;nbsp;So any dependencies are baked into using explorer object model to manage applications. &amp;nbsp;In other words, I think you&amp;#39;d see this in a C# application as well. &amp;nbsp;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=52206" width="1" height="1"&gt;</description></item><item><title>re: PowerShell for BizTalk Server</title><link>http://www.pluralsight.com/community/blogs/matt/archive/2008/06/26/powershell-for-biztalk-server.aspx#52205</link><pubDate>Thu, 24 Jul 2008 15:39:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:52205</guid><dc:creator>moshe ro</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t think this is the case&lt;/p&gt;
&lt;p&gt;I have checked it:&lt;/p&gt;
&lt;p&gt;I verify that all the orchs are started .&lt;/p&gt;
&lt;p&gt;Then I made a stop (Full stop) to my specific application (using admin console).&lt;/p&gt;
&lt;p&gt;This stop (using admin console) &amp;nbsp;worked successfull&lt;/p&gt;
&lt;p&gt;without errors&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=52205" width="1" height="1"&gt;</description></item><item><title>re: PowerShell for BizTalk Server</title><link>http://www.pluralsight.com/community/blogs/matt/archive/2008/06/26/powershell-for-biztalk-server.aspx#52194</link><pubDate>Wed, 23 Jul 2008 19:22:27 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:52194</guid><dc:creator>matt-milner</dc:creator><description>&lt;p&gt;Moshe,&lt;/p&gt;
&lt;p&gt;It looks as if you might have case where an orchestration in another application has a dependency on an orchestration in your current application. If that is the case, then use the function to unenlist the relying orchestration, then stop your application. &amp;nbsp;A test for this would be to make sure the relying orchestration is started and try to do a stop of your application in the admin console. &amp;nbsp;You should get the same error. &amp;nbsp;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=52194" width="1" height="1"&gt;</description></item><item><title>re: PowerShell for BizTalk Server</title><link>http://www.pluralsight.com/community/blogs/matt/archive/2008/06/26/powershell-for-biztalk-server.aspx#52193</link><pubDate>Wed, 23 Jul 2008 19:10:59 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:52193</guid><dc:creator>moshe ro</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;you were write ,I run the script in 32 bit version of PowerShell ,and then it succeded to run .&lt;/p&gt;
&lt;p&gt;However ,when I tried to implement your code ,I got an answer that it failed .&lt;/p&gt;
&lt;p&gt;from the failure ,I understand that it tried to stop all the application ,while I tried to stop only spedific application (EAI_NumberManagement).&lt;/p&gt;
&lt;p&gt;This is the example :&lt;/p&gt;
&lt;p&gt;**********************&lt;/p&gt;
&lt;p&gt;[System.Reflection.Assembly]::LoadFrom(&amp;quot;C:\Program Files (x86)\Microsoft BizTalk Server 2006\Developer Tools\Microsoft.BizTalk.ExplorerOM.dll&amp;quot;)&lt;/p&gt;
&lt;p&gt;function Get-BTSConnectionString&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;	$group = Get-WmiObject MSBTS_GroupSetting -n root\MicrosoftBizTalkServer&lt;/p&gt;
&lt;p&gt;	$dbName = $group.MgmtDBName&lt;/p&gt;
&lt;p&gt;	$server = $group.MgmtDBServerName&lt;/p&gt;
&lt;p&gt;	[System.String]::Concat(&amp;quot;server=&amp;quot;, $server, &amp;quot;;database=&amp;quot;, $dbName, &amp;quot;;Integrated Security=SSPI&amp;quot;)&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;function StopBTSApplication&lt;/p&gt;
&lt;p&gt;{ &lt;/p&gt;
&lt;p&gt;	$appName=&amp;quot;EAI_NumberManagement&amp;quot;&lt;/p&gt;
&lt;p&gt;	$exp = New-Object Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer&lt;/p&gt;
&lt;p&gt;	$exp.ConnectionString = Get-BTSConnectionString&lt;/p&gt;
&lt;p&gt;	$app = $exp.Applications[$appName]&lt;/p&gt;
&lt;p&gt;	if($app -eq $null)&lt;/p&gt;
&lt;p&gt;	{&lt;/p&gt;
&lt;p&gt;		Write-Host &amp;quot;Application &amp;quot; $appName &amp;quot; not found&amp;quot; -fore Red&lt;/p&gt;
&lt;p&gt;	}&lt;/p&gt;
&lt;p&gt;	else&lt;/p&gt;
&lt;p&gt;	{&lt;/p&gt;
&lt;p&gt;		if($app.Status -ne 2)&lt;/p&gt;
&lt;p&gt;		{&lt;/p&gt;
&lt;p&gt;			#full stop of application&lt;/p&gt;
&lt;p&gt;			$null = $app.Stop(63)&lt;/p&gt;
&lt;p&gt;			$null = $exp.SaveChanges()&lt;/p&gt;
&lt;p&gt;			Write-Host &amp;quot;Stopped application: &amp;quot; $appName&lt;/p&gt;
&lt;p&gt;		}&lt;/p&gt;
&lt;p&gt;	}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;StopBTSApplication&lt;/p&gt;
&lt;p&gt;******************************&lt;/p&gt;
&lt;p&gt;The output was:&lt;/p&gt;
&lt;p&gt;Exception calling &amp;quot;SaveChanges&amp;quot; with &amp;quot;0&amp;quot; argument(s): &amp;quot;Could not stop orchestration &amp;#39;EAI_AQRetry_Orchs.ArmAQRetry_Orch,&lt;/p&gt;
&lt;p&gt;EAI_AQRetry_Orchs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=267fe1f0f0549c16&amp;#39;. Orchestration(s) &amp;#39;EAI_ATGW_Orchs&lt;/p&gt;
&lt;p&gt;.Async_TGW_Main_Orch : EAI_ATGW_Orchs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=267fe1f0f0549c16&amp;#39;, &amp;#39;EAI_ATGW_Or&lt;/p&gt;
&lt;p&gt;chs.Async_TGW_Transportation_Orch : EAI_ATGW_Orchs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=267fe1f0f0549c16&amp;#39;&lt;/p&gt;
&lt;p&gt;is(are) started which depend(s) upon this orchestration.&amp;quot;&lt;/p&gt;
&lt;p&gt;At C:\temp\stop_app.ps1:28 char:28&lt;/p&gt;
&lt;p&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $null = $exp.SaveChanges( &amp;lt;&amp;lt;&amp;lt;&amp;lt; )&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=52193" width="1" height="1"&gt;</description></item><item><title>re: PowerShell for BizTalk Server</title><link>http://www.pluralsight.com/community/blogs/matt/archive/2008/06/26/powershell-for-biztalk-server.aspx#51928</link><pubDate>Mon, 21 Jul 2008 23:22:56 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:51928</guid><dc:creator>Peter Golconda</dc:creator><description>&lt;p&gt;I could implement it and create an admin app (.net) for my company so that any support person (without much biztalk experience) will be able to support. &amp;nbsp;Thanks for &amp;nbsp;the code.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=51928" width="1" height="1"&gt;</description></item></channel></rss>