tag:blogger.com,1999:blog-61460766187228414182024-02-07T22:06:32.903-08:00Eldert GrootenboerEldert Grootenboerhttp://www.blogger.com/profile/11821643198024753393noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-6146076618722841418.post-47856406613678218942012-06-25T22:38:00.001-07:002012-06-25T22:38:36.954-07:00New URLFrom now on, my blog can be found on <a href="http://blog.eldert.net/">http://blog.eldert.net</a>.Eldert Grootenboerhttp://www.blogger.com/profile/11821643198024753393noreply@blogger.com0tag:blogger.com,1999:blog-6146076618722841418.post-77217635259326872722012-06-08T07:08:00.001-07:002012-06-08T07:41:32.216-07:00BizTalk360 and DTC<link href="BizTalk360%20and%20DTC_files/filelist.xml" rel="File-List"></link>
<link href="BizTalk360%20and%20DTC_files/themedata.thmx" rel="themeData"></link>
<link href="BizTalk360%20and%20DTC_files/colorschememapping.xml" rel="colorSchemeMapping"></link>
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-pitch:variable;
mso-font-signature:-536870145 1107305727 0 0 415 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-520092929 1073786111 9 0 415 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-parent:"";
margin-top:0cm;
margin-right:0cm;
margin-bottom:10.0pt;
margin-left:0cm;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
p.MsoNoSpacing, li.MsoNoSpacing, div.MsoNoSpacing
{mso-style-priority:1;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
.MsoChpDefault
{mso-style-type:export-only;
mso-default-props:yes;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
.MsoPapDefault
{mso-style-type:export-only;
margin-bottom:10.0pt;
line-height:115%;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;
mso-header-margin:35.4pt;
mso-footer-margin:35.4pt;
mso-paper-source:0;}
div.WordSection1
{page:WordSection1;}
-->
</style>
<br />
<div class="WordSection1">
<div class="MsoNoSpacing">
At one of our customers I have set up <a href="http://www.biztalk360.com/" target="_blank">BizTalk360</a> as their
BizTalk monitoring environment.<o:p></o:p></div>
<div class="MsoNoSpacing">
All in all, they are very happy with it, but we ran into
one problem.<o:p></o:p></div>
<div class="MsoNoSpacing">
When they tried to suspend or resume an instance, they
would get the following error:<o:p></o:p></div>
<div class="MsoNoSpacing">
<span class="GramE"><span style="color: red;">Unable to
enlist in the transaction.</span></span><span style="color: red;"><o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span class="SpellE"><span style="color: red;">System.Runtime.InteropServices.COMException</span></span><span style="color: red;"> (0x8004D00A): Unable to enlist in the transaction.<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span class="GramE"><span style="color: red;">at</span></span><span style="color: red;">
System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 <span class="SpellE">errorCode</span>, <span class="SpellE">IntPtr</span> <span class="SpellE">errorInfo</span>)<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span class="GramE"><span style="color: red;">at</span></span><span style="color: red;"> <span class="SpellE">System.Management.ManagementObject.InvokeMethod</span>(String
<span class="SpellE">methodName</span>, <span class="SpellE">ManagementBaseObject</span>
<span class="SpellE">inParameters</span>, <span class="SpellE">InvokeMethodOptions</span>
options)<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span class="GramE"><span style="color: red;">at</span></span><span style="color: red;"> <span class="SpellE">System.Management.ManagementObject.InvokeMethod</span>(String
<span class="SpellE">methodName</span>, Object[] <span class="SpellE">args</span>)<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span class="GramE"><span style="color: red;">at</span></span><span style="color: red;">
A.cf0555bb9c0f6a0aebd67da53b41e6535.cc49ef4e8476b31546c8cfd644bd22a66(String
c3ce089d4844970dd178d4bf819010021)<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span class="GramE"><span style="color: red;">at</span></span><span style="color: red;"> Kovai.BizTalk360.BusinessService.Main.BizTalkQueryBusinessService.ExecuteServiceInstanceOperation(ServiceInstances
<span class="SpellE">serviceInstances</span>, <span class="SpellE">ServiceInstanceOperation</span>
operation)<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span class="GramE"><span style="color: red;">at</span></span><span style="color: red;">
Kovai.BizTalk360.WCFService.BizTalkQueryService.ExecuteServiceInstanceOperation(BizTalkQueryServiceRequest
request, <span class="SpellE">ServiceInstances</span> <span class="SpellE">serviceInstances</span>,
<span class="SpellE">ServiceInstanceOperation</span> operation)<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
After some research, I found out this was a problem with
the DTC service, which was not enabled on the BizTalk360 machine.<o:p></o:p></div>
<div class="MsoNoSpacing">
To solve it, follow these steps (on Windows Server 2008
R2).<o:p></o:p></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
First <span class="GramE">open the</span> Component Services snap-in by
giving the command <span class="SpellE">dcomcnfg</span> in the start menu.<o:p></o:p></div>
<div class="MsoNoSpacing">
In the tree, open Component Services, Computers, My
Computer, Distributed Transaction Coordinator, and finally right-click on Local
DTC and select properties.<o:p></o:p></div>
<div class="MsoNoSpacing">
Go to the Security tab, enable Network DTC Access, Allow
Inbound and Allow Outbound, and click OK.<o:p></o:p></div>
<div class="MsoNoSpacing">
Now restart your BizTalk360 service, and things should be
working.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBIeORRTWr0e2fojCwR7iJ275FzUg3vT_gySG12QGZ_5-ibNWWtnVegETZmQ1VCoFycJVwilJ4TJd9uRPL34IraF4D20vMFEOk0I_rgDqx_e6GP5cqfYFgMgKyzK-o85NRkBiKkndIf0s/s1600/BizTalk+and+DTC.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBIeORRTWr0e2fojCwR7iJ275FzUg3vT_gySG12QGZ_5-ibNWWtnVegETZmQ1VCoFycJVwilJ4TJd9uRPL34IraF4D20vMFEOk0I_rgDqx_e6GP5cqfYFgMgKyzK-o85NRkBiKkndIf0s/s320/BizTalk+and+DTC.png" width="295" /></a></div>
</div>
</div>Eldert Grootenboerhttp://www.blogger.com/profile/11821643198024753393noreply@blogger.com0tag:blogger.com,1999:blog-6146076618722841418.post-5132904229831026602012-06-01T04:36:00.003-07:002012-06-08T07:13:00.640-07:00BizTalk Powershell Provider on Windows Server 2008 R2<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 14">
<meta name=Originator content="Microsoft Word 14">
<link rel=File-List href="BizTalk360%20and%20DTC_files/filelist.xml">
<!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Author>Eldert Grootenboer</o:Author>
<o:LastAuthor>Eldert Grootenboer</o:LastAuthor>
<o:Revision>4</o:Revision>
<o:TotalTime>8</o:TotalTime>
<o:Created>2012-06-08T14:04:00Z</o:Created>
<o:LastSaved>2012-06-08T14:12:00Z</o:LastSaved>
<o:Pages>1</o:Pages>
<o:Words>235</o:Words>
<o:Characters>1341</o:Characters>
<o:Company>Capgemini Netherlands</o:Company>
<o:Lines>11</o:Lines>
<o:Paragraphs>3</o:Paragraphs>
<o:CharactersWithSpaces>1573</o:CharactersWithSpaces>
<o:Version>14.00</o:Version>
</o:DocumentProperties>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]-->
<link rel=themeData href="BizTalk360%20and%20DTC_files/themedata.thmx">
<link rel=colorSchemeMapping
href="BizTalk360%20and%20DTC_files/colorschememapping.xml">
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:Zoom>80</w:Zoom>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:TrackMoves>false</w:TrackMoves>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-pitch:variable;
mso-font-signature:-536870145 1107305727 0 0 415 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-520092929 1073786111 9 0 415 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-parent:"";
margin-top:0cm;
margin-right:0cm;
margin-bottom:10.0pt;
margin-left:0cm;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
p.MsoNoSpacing, li.MsoNoSpacing, div.MsoNoSpacing
{mso-style-priority:1;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
.MsoChpDefault
{mso-style-type:export-only;
mso-default-props:yes;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
.MsoPapDefault
{mso-style-type:export-only;
margin-bottom:10.0pt;
line-height:115%;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;
mso-header-margin:35.4pt;
mso-footer-margin:35.4pt;
mso-paper-source:0;}
div.WordSection1
{page:WordSection1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin-top:0cm;
mso-para-margin-right:0cm;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0cm;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
</style>
<![endif]--><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US style='tab-interval:36.0pt'>
<div class=WordSection1>
<p class=MsoNoSpacing>Today I ran into a problem while trying to use the
BizTalk PowerShell Provider on a Windows Server R2 installation.<o:p></o:p></p>
<p class=MsoNoSpacing>I <span class=SpellE>allready</span> knew I would have to
use the 32 bit version when working with the <span class=GramE>provider,</span>
however on starting up the console I received the following message:<o:p></o:p></p>
<p class=MsoNoSpacing><span style='color:red'>Add-<span class=SpellE><span
class=GramE>PSSnapin</span></span><span class=GramE> :</span> Cannot load
Windows PowerShell snap-in <span class=SpellE>BizTalkFactory.Powershell.Extensions</span>
because of the following err or: Could not load file or assembly
'file:///C:\Program Files (x86)\<span class=SpellE>BizTalkFactory</span>
PowerShell Provider\<span class=SpellE>BizTalkFactory.P</span>
owerShell.Extensions.dll' or one of its dependencies. This assembly is built by
a runtime newer than the currently load <span class=SpellE><span class=GramE>ed</span></span>
runtime and cannot be loaded. At
C:\Users\Administrator\Documents\WindowsPowerShell\profile.ps1:5 char<span
class=GramE>:13</span> + Add-<span class=SpellE>PSSnapin</span>
<<<< <span class=SpellE>BizTalkFactory.Powershell.Extensions</span>
+ <span class=SpellE>CategoryInfo</span> : <span class=SpellE>InvalidArgument</span>:
(<span class=SpellE>BizTalkFactory.Powershell.Extensions:String</span>) [Add-<span
class=SpellE>PSSnapin</span>], <span class=SpellE>PSSnapInE</span> <span
class=SpellE>xception</span> + <span class=SpellE>FullyQualifiedErrorId</span>
: AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand<o:p></o:p></span></p>
<p class=MsoNoSpacing><span style='color:red'><o:p> </o:p></span></p>
<p class=MsoNoSpacing>In the documentation for the provider it states it
targets .NET 2.0, and that the configuration files should be changed to the
following:<o:p></o:p></p>
<p class=MsoNoSpacing><o:p> </o:p></p>
<p class=MsoNoSpacing><<span class=GramE>configuration</span>><o:p></o:p></p>
<p class=MsoNoSpacing><span style='mso-spacerun:yes'> </span><<span
class=GramE>startup</span>><o:p></o:p></p>
<p class=MsoNoSpacing><span style='mso-spacerun:yes'> </span><<span
class=SpellE>supportedRuntime</span> version="v4.0.30319" /><o:p></o:p></p>
<p class=MsoNoSpacing><span style='mso-spacerun:yes'> </span></startup><o:p></o:p></p>
<p class=MsoNoSpacing></configuration><o:p></o:p></p>
<p class=MsoNoSpacing><o:p> </o:p></p>
<p class=MsoNoSpacing>This did however not solve my problem.<o:p></o:p></p>
<p class=MsoNoSpacing>After further investigation I found out you actually need
following in the configuration file:<o:p></o:p></p>
<p class=MsoNoSpacing><o:p> </o:p></p>
<p class=MsoNoSpacing><<span class=GramE>configuration</span>><o:p></o:p></p>
<p class=MsoNoSpacing><span style='mso-spacerun:yes'> </span><startup
useLegacyV2RuntimeActivationPolicy="true"><o:p></o:p></p>
<p class=MsoNoSpacing><span style='mso-spacerun:yes'> </span><<span
class=SpellE>supportedRuntime</span> version="v4.0.30319" /><o:p></o:p></p>
<p class=MsoNoSpacing><span style='mso-spacerun:yes'> </span><<span
class=SpellE>supportedRuntime</span> version="v2.0.50727" /><o:p></o:p></p>
<p class=MsoNoSpacing><span style='mso-spacerun:yes'> </span></startup><o:p></o:p></p>
<p class=MsoNoSpacing></configuration></p>
</div>
</body>
</html>Eldert Grootenboerhttp://www.blogger.com/profile/11821643198024753393noreply@blogger.com0tag:blogger.com,1999:blog-6146076618722841418.post-51888074160232368862012-05-09T04:42:00.001-07:002012-05-09T04:48:17.434-07:00Automated BizTalk Deployment<link href="Automated%20BizTalk%20Deployment_files/filelist.xml" rel="File-List"></link>
<link href="Automated%20BizTalk%20Deployment_files/editdata.mso" rel="Edit-Time-Data"></link>
<link href="Automated%20BizTalk%20Deployment_files/item0001.xml" rel="dataStoreItem" target="Automated%20BizTalk%20Deployment_files/props002.xml"></link>
<link href="Automated%20BizTalk%20Deployment_files/themedata.thmx" rel="themeData"></link>
<link href="Automated%20BizTalk%20Deployment_files/colorschememapping.xml" rel="colorSchemeMapping"></link>
<w:latentstyles deflockedstate="false" defpriority="99" defqformat="false" defsemihidden="true" defunhidewhenused="false" latentstylecount="267">
<w:lsdexception locked="false" name="Normal" priority="0" qformat="true" semihidden="false">
<w:lsdexception locked="false" name="heading 1" priority="9" qformat="true" semihidden="false">
<w:lsdexception locked="false" name="heading 2" priority="9" qformat="true" semihidden="false">
<w:lsdexception locked="false" name="heading 3" priority="9" qformat="true">
<w:lsdexception locked="false" name="heading 4" priority="2" qformat="true">
<w:lsdexception locked="false" name="heading 5" priority="2" qformat="true">
<w:lsdexception locked="false" name="heading 6" priority="2" qformat="true">
<w:lsdexception locked="false" name="heading 7" priority="2" qformat="true">
<w:lsdexception locked="false" name="heading 8" priority="2" qformat="true">
<w:lsdexception locked="false" name="heading 9" priority="2" qformat="true">
<w:lsdexception locked="false" name="toc 1" priority="39" qformat="true">
<w:lsdexception locked="false" name="toc 2" priority="39" qformat="true">
<w:lsdexception locked="false" name="toc 3" priority="39" qformat="true">
<w:lsdexception locked="false" name="toc 4" priority="39" qformat="true">
<w:lsdexception locked="false" name="toc 5" priority="39" qformat="true">
<w:lsdexception locked="false" name="toc 6" priority="39" qformat="true">
<w:lsdexception locked="false" name="toc 7" priority="39" qformat="true">
<w:lsdexception locked="false" name="toc 8" priority="39" qformat="true">
<w:lsdexception locked="false" name="toc 9" priority="39" qformat="true">
<w:lsdexception locked="false" name="caption" priority="35" qformat="true">
<w:lsdexception locked="false" name="Title" priority="10" qformat="true">
<w:lsdexception locked="false" name="Default Paragraph Font" priority="1">
<w:lsdexception locked="false" name="Subtitle" priority="11" qformat="true">
<w:lsdexception locked="false" name="Hyperlink" priority="0">
<w:lsdexception locked="false" name="Strong" priority="22" qformat="true" semihidden="false">
<w:lsdexception locked="false" name="Emphasis" priority="20" qformat="true" semihidden="false">
<w:lsdexception locked="false" name="HTML Preformatted" priority="19" qformat="true" semihidden="false">
<w:lsdexception locked="false" name="Table Grid" priority="59" semihidden="false">
<w:lsdexception locked="false" name="No Spacing" priority="1" qformat="true">
<w:lsdexception locked="false" name="Light Shading" priority="60" semihidden="false">
<w:lsdexception locked="false" name="Light List" priority="61" semihidden="false">
<w:lsdexception locked="false" name="Light Grid" priority="62" semihidden="false">
<w:lsdexception locked="false" name="Medium Shading 1" priority="63" semihidden="false">
<w:lsdexception locked="false" name="Medium Shading 2" priority="64" semihidden="false">
<w:lsdexception locked="false" name="Medium List 1" priority="65" semihidden="false">
<w:lsdexception locked="false" name="Medium List 2" priority="66" semihidden="false">
<w:lsdexception locked="false" name="Medium Grid 1" priority="67" semihidden="false">
<w:lsdexception locked="false" name="Medium Grid 2" priority="68" semihidden="false">
<w:lsdexception locked="false" name="Medium Grid 3" priority="69" semihidden="false">
<w:lsdexception locked="false" name="Dark List" priority="70" semihidden="false">
<w:lsdexception locked="false" name="Colorful Shading" priority="71" semihidden="false">
<w:lsdexception locked="false" name="Colorful List" priority="72" semihidden="false">
<w:lsdexception locked="false" name="Colorful Grid" priority="73" semihidden="false">
<w:lsdexception locked="false" name="Light Shading Accent 1" priority="60" semihidden="false">
<w:lsdexception locked="false" name="Light List Accent 1" priority="61" semihidden="false">
<w:lsdexception locked="false" name="Light Grid Accent 1" priority="62" semihidden="false">
<w:lsdexception locked="false" name="Medium Shading 1 Accent 1" priority="63" semihidden="false">
<w:lsdexception locked="false" name="Medium Shading 2 Accent 1" priority="64" semihidden="false">
<w:lsdexception locked="false" name="Medium List 1 Accent 1" priority="65" semihidden="false">
<w:lsdexception locked="false" name="List Paragraph" priority="34" qformat="true" semihidden="false">
<w:lsdexception locked="false" name="Quote" priority="1" qformat="true" semihidden="false">
<w:lsdexception locked="false" name="Intense Quote" priority="30" qformat="true">
<w:lsdexception locked="false" name="Medium List 2 Accent 1" priority="66" semihidden="false">
<w:lsdexception locked="false" name="Medium Grid 1 Accent 1" priority="67" semihidden="false">
<w:lsdexception locked="false" name="Medium Grid 2 Accent 1" priority="68" semihidden="false">
<w:lsdexception locked="false" name="Medium Grid 3 Accent 1" priority="69" semihidden="false">
<w:lsdexception locked="false" name="Dark List Accent 1" priority="70" semihidden="false">
<w:lsdexception locked="false" name="Colorful Shading Accent 1" priority="71" semihidden="false">
<w:lsdexception locked="false" name="Colorful List Accent 1" priority="72" semihidden="false">
<w:lsdexception locked="false" name="Colorful Grid Accent 1" priority="73" semihidden="false">
<w:lsdexception locked="false" name="Light Shading Accent 2" priority="60" semihidden="false">
<w:lsdexception locked="false" name="Light List Accent 2" priority="61" semihidden="false">
<w:lsdexception locked="false" name="Light Grid Accent 2" priority="62" semihidden="false">
<w:lsdexception locked="false" name="Medium Shading 1 Accent 2" priority="63" semihidden="false">
<w:lsdexception locked="false" name="Medium Shading 2 Accent 2" priority="64" semihidden="false">
<w:lsdexception locked="false" name="Medium List 1 Accent 2" priority="65" semihidden="false">
<w:lsdexception locked="false" name="Medium List 2 Accent 2" priority="66" semihidden="false">
<w:lsdexception locked="false" name="Medium Grid 1 Accent 2" priority="67" semihidden="false">
<w:lsdexception locked="false" name="Medium Grid 2 Accent 2" priority="68" semihidden="false">
<w:lsdexception locked="false" name="Medium Grid 3 Accent 2" priority="69" semihidden="false">
<w:lsdexception locked="false" name="Dark List Accent 2" priority="70" semihidden="false">
<w:lsdexception locked="false" name="Colorful Shading Accent 2" priority="71" semihidden="false">
<w:lsdexception locked="false" name="Colorful List Accent 2" priority="72" semihidden="false">
<w:lsdexception locked="false" name="Colorful Grid Accent 2" priority="73" semihidden="false">
<w:lsdexception locked="false" name="Light Shading Accent 3" priority="60" semihidden="false">
<w:lsdexception locked="false" name="Light List Accent 3" priority="61" semihidden="false">
<w:lsdexception locked="false" name="Light Grid Accent 3" priority="62" semihidden="false">
<w:lsdexception locked="false" name="Medium Shading 1 Accent 3" priority="63" semihidden="false">
<w:lsdexception locked="false" name="Medium Shading 2 Accent 3" priority="64" semihidden="false">
<w:lsdexception locked="false" name="Medium List 1 Accent 3" priority="65" semihidden="false">
<w:lsdexception locked="false" name="Medium List 2 Accent 3" priority="66" semihidden="false">
<w:lsdexception locked="false" name="Medium Grid 1 Accent 3" priority="67" semihidden="false">
<w:lsdexception locked="false" name="Medium Grid 2 Accent 3" priority="68" semihidden="false">
<w:lsdexception locked="false" name="Medium Grid 3 Accent 3" priority="69" semihidden="false">
<w:lsdexception locked="false" name="Dark List Accent 3" priority="70" semihidden="false">
<w:lsdexception locked="false" name="Colorful Shading Accent 3" priority="71" semihidden="false">
<w:lsdexception locked="false" name="Colorful List Accent 3" priority="72" semihidden="false">
<w:lsdexception locked="false" name="Colorful Grid Accent 3" priority="73" semihidden="false">
<w:lsdexception locked="false" name="Light Shading Accent 4" priority="60" semihidden="false">
<w:lsdexception locked="false" name="Light List Accent 4" priority="61" semihidden="false">
<w:lsdexception locked="false" name="Light Grid Accent 4" priority="62" semihidden="false">
<w:lsdexception locked="false" name="Medium Shading 1 Accent 4" priority="63" semihidden="false">
<w:lsdexception locked="false" name="Medium Shading 2 Accent 4" priority="64" semihidden="false">
<w:lsdexception locked="false" name="Medium List 1 Accent 4" priority="65" semihidden="false">
<w:lsdexception locked="false" name="Medium List 2 Accent 4" priority="66" semihidden="false">
<w:lsdexception locked="false" name="Medium Grid 1 Accent 4" priority="67" semihidden="false">
<w:lsdexception locked="false" name="Medium Grid 2 Accent 4" priority="68" semihidden="false">
<w:lsdexception locked="false" name="Medium Grid 3 Accent 4" priority="69" semihidden="false">
<w:lsdexception locked="false" name="Dark List Accent 4" priority="70" semihidden="false">
<w:lsdexception locked="false" name="Colorful Shading Accent 4" priority="71" semihidden="false">
<w:lsdexception locked="false" name="Colorful List Accent 4" priority="72" semihidden="false">
<w:lsdexception locked="false" name="Colorful Grid Accent 4" priority="73" semihidden="false">
<w:lsdexception locked="false" name="Light Shading Accent 5" priority="60" semihidden="false">
<w:lsdexception locked="false" name="Light List Accent 5" priority="61" semihidden="false">
<w:lsdexception locked="false" name="Light Grid Accent 5" priority="62" semihidden="false">
<w:lsdexception locked="false" name="Medium Shading 1 Accent 5" priority="63" semihidden="false">
<w:lsdexception locked="false" name="Medium Shading 2 Accent 5" priority="64" semihidden="false">
<w:lsdexception locked="false" name="Medium List 1 Accent 5" priority="65" semihidden="false">
<w:lsdexception locked="false" name="Medium List 2 Accent 5" priority="66" semihidden="false">
<w:lsdexception locked="false" name="Medium Grid 1 Accent 5" priority="67" semihidden="false">
<w:lsdexception locked="false" name="Medium Grid 2 Accent 5" priority="68" semihidden="false">
<w:lsdexception locked="false" name="Medium Grid 3 Accent 5" priority="69" semihidden="false">
<w:lsdexception locked="false" name="Dark List Accent 5" priority="70" semihidden="false">
<w:lsdexception locked="false" name="Colorful Shading Accent 5" priority="71" semihidden="false">
<w:lsdexception locked="false" name="Colorful List Accent 5" priority="72" semihidden="false">
<w:lsdexception locked="false" name="Colorful Grid Accent 5" priority="73" semihidden="false">
<w:lsdexception locked="false" name="Light Shading Accent 6" priority="60" semihidden="false">
<w:lsdexception locked="false" name="Light List Accent 6" priority="61" semihidden="false">
<w:lsdexception locked="false" name="Light Grid Accent 6" priority="62" semihidden="false">
<w:lsdexception locked="false" name="Medium Shading 1 Accent 6" priority="63" semihidden="false">
<w:lsdexception locked="false" name="Medium Shading 2 Accent 6" priority="64" semihidden="false">
<w:lsdexception locked="false" name="Medium List 1 Accent 6" priority="65" semihidden="false">
<w:lsdexception locked="false" name="Medium List 2 Accent 6" priority="66" semihidden="false">
<w:lsdexception locked="false" name="Medium Grid 1 Accent 6" priority="67" semihidden="false">
<w:lsdexception locked="false" name="Medium Grid 2 Accent 6" priority="68" semihidden="false">
<w:lsdexception locked="false" name="Medium Grid 3 Accent 6" priority="69" semihidden="false">
<w:lsdexception locked="false" name="Dark List Accent 6" priority="70" semihidden="false">
<w:lsdexception locked="false" name="Colorful Shading Accent 6" priority="71" semihidden="false">
<w:lsdexception locked="false" name="Colorful List Accent 6" priority="72" semihidden="false">
<w:lsdexception locked="false" name="Colorful Grid Accent 6" priority="73" semihidden="false">
<w:lsdexception locked="false" name="Subtle Emphasis" priority="19" qformat="true">
<w:lsdexception locked="false" name="Intense Emphasis" priority="21" qformat="true">
<w:lsdexception locked="false" name="Subtle Reference" priority="31" qformat="true">
<w:lsdexception locked="false" name="Intense Reference" priority="32" qformat="true">
<w:lsdexception locked="false" name="Book Title" priority="33" qformat="true">
<w:lsdexception locked="false" name="Bibliography" priority="37">
</w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:lsdexception></w:latentstyles>
<link href="Automated%20BizTalk%20Deployment_files/plchdr.htm" rel="plchdr"></link>
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;
mso-font-charset:2;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:0 268435456 0 0 -2147483648 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-pitch:variable;
mso-font-signature:-536870145 1107305727 0 0 415 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-520092929 1073786111 9 0 415 0;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-520081665 -1073717157 41 0 66047 0;}
@font-face
{font-family:"Segoe UI";
panose-1:2 11 5 2 4 2 4 2 2 3;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-520084737 -1073683329 41 0 479 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-priority:1;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-parent:"";
margin-top:0cm;
margin-right:0cm;
margin-bottom:10.0pt;
margin-left:0cm;
mso-pagination:widow-orphan;
font-size:11.0pt;
mso-bidi-font-size:10.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
h1
{mso-style-priority:9;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-link:"Heading 1 Char";
mso-style-next:Normal;
margin-top:24.0pt;
margin-right:0cm;
margin-bottom:0cm;
margin-left:0cm;
margin-bottom:.0001pt;
line-height:115%;
mso-pagination:widow-orphan lines-together;
page-break-after:avoid;
mso-outline-level:1;
font-size:14.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#365F91;
mso-themecolor:accent1;
mso-themeshade:191;
mso-font-kerning:0pt;
font-weight:bold;}
h2
{mso-style-priority:9;
mso-style-qformat:yes;
mso-style-link:"Heading 2 Char";
mso-style-next:Normal;
margin-top:10.0pt;
margin-right:0cm;
margin-bottom:0cm;
margin-left:0cm;
margin-bottom:.0001pt;
line-height:115%;
mso-pagination:widow-orphan lines-together;
page-break-after:avoid;
mso-outline-level:2;
font-size:13.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#4F81BD;
mso-themecolor:accent1;
font-weight:bold;}
h3
{mso-style-priority:9;
mso-style-qformat:yes;
mso-style-link:"Heading 3 Char";
mso-style-next:Normal;
margin-top:10.0pt;
margin-right:0cm;
margin-bottom:0cm;
margin-left:0cm;
margin-bottom:.0001pt;
line-height:115%;
mso-pagination:widow-orphan lines-together;
page-break-after:avoid;
mso-outline-level:3;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#4F81BD;
mso-themecolor:accent1;
font-weight:bold;}
h4
{mso-style-priority:8;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-next:Normal;
margin-top:10.0pt;
margin-right:0cm;
margin-bottom:0cm;
margin-left:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
mso-outline-level:4;
font-size:11.0pt;
mso-bidi-font-size:14.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#17365D;
mso-themecolor:text2;
mso-themeshade:191;
font-weight:normal;}
h5
{mso-style-priority:9;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-next:Normal;
margin-top:10.0pt;
margin-right:0cm;
margin-bottom:0cm;
margin-left:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
mso-outline-level:5;
font-size:11.0pt;
mso-bidi-font-size:14.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#17365D;
mso-themecolor:text2;
mso-themeshade:191;
font-weight:normal;
font-style:italic;}
h6
{mso-style-priority:10;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-next:Normal;
margin-top:10.0pt;
margin-right:0cm;
margin-bottom:0cm;
margin-left:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
mso-outline-level:6;
font-size:10.0pt;
mso-bidi-font-size:13.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#17365D;
mso-themecolor:text2;
mso-themeshade:191;
font-weight:bold;}
a:link, span.MsoHyperlink
{mso-style-unhide:no;
mso-style-parent:"";
color:#003366;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-noshow:yes;
mso-style-priority:99;
mso-style-unhide:no;
color:purple;
mso-themecolor:followedhyperlink;
text-decoration:underline;
text-underline:single;}
p
{mso-style-priority:1;
mso-style-unhide:no;
margin-top:0cm;
margin-right:0cm;
margin-bottom:10.0pt;
margin-left:0cm;
mso-pagination:widow-orphan;
font-size:11.0pt;
mso-bidi-font-size:10.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-noshow:yes;
mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;}
span.MsoPlaceholderText
{mso-style-noshow:yes;
mso-style-priority:99;
mso-style-unhide:no;
color:gray;}
p.MsoNoSpacing, li.MsoNoSpacing, div.MsoNoSpacing
{mso-style-priority:1;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-link:"List Paragraph Char";
margin-top:0cm;
margin-right:0cm;
margin-bottom:10.0pt;
margin-left:36.0pt;
mso-add-space:auto;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst
{mso-style-priority:34;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-link:"List Paragraph Char";
mso-style-type:export-only;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
mso-add-space:auto;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
{mso-style-priority:34;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-link:"List Paragraph Char";
mso-style-type:export-only;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
mso-add-space:auto;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast
{mso-style-priority:34;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-link:"List Paragraph Char";
mso-style-type:export-only;
margin-top:0cm;
margin-right:0cm;
margin-bottom:10.0pt;
margin-left:36.0pt;
mso-add-space:auto;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
p.MsoQuote, li.MsoQuote, div.MsoQuote
{mso-style-priority:1;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-next:Normal;
margin-top:0cm;
margin-right:36.0pt;
margin-bottom:10.0pt;
margin-left:36.0pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
mso-bidi-font-size:10.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;
color:black;
mso-themecolor:text1;}
p.Publishwithline, li.Publishwithline, div.Publishwithline
{mso-style-name:"Publish with line";
mso-style-noshow:yes;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:16.0pt;
mso-bidi-font-size:19.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#17365D;
mso-themecolor:text2;
mso-themeshade:191;
font-weight:bold;}
p.PublishStatus, li.PublishStatus, div.PublishStatus
{mso-style-name:"Publish Status";
mso-style-noshow:yes;
mso-style-unhide:no;
margin-top:6.0pt;
margin-right:0cm;
margin-bottom:2.0pt;
margin-left:0cm;
mso-pagination:widow-orphan;
background:#FDEB9F;
border:none;
mso-border-alt:solid #FDBD5E .5pt;
padding:0cm;
mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt;
font-size:9.0pt;
mso-bidi-font-size:13.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
p.PublishStatusAccessible, li.PublishStatusAccessible, div.PublishStatusAccessible
{mso-style-name:PublishStatus_Accessible;
mso-style-noshow:yes;
mso-style-unhide:no;
margin-top:6.0pt;
margin-right:0cm;
margin-bottom:2.0pt;
margin-left:0cm;
mso-pagination:widow-orphan;
border:none;
mso-border-alt:solid #FDBD5E .5pt;
padding:0cm;
mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt;
font-size:9.0pt;
mso-bidi-font-size:13.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
p.Account, li.Account, div.Account
{mso-style-name:Account;
mso-style-noshow:yes;
mso-style-unhide:no;
mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:3.6pt 63.35pt;
font-size:9.0pt;
mso-bidi-font-size:12.0pt;
font-family:"Segoe UI","sans-serif";
mso-fareast-font-family:"Segoe UI";
color:#4F81BD;}
p.Categories, li.Categories, div.Categories
{mso-style-name:Categories;
mso-style-noshow:yes;
mso-style-unhide:no;
mso-style-parent:Account;
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:3.6pt 63.35pt;
font-size:9.0pt;
mso-bidi-font-size:12.0pt;
font-family:"Segoe UI","sans-serif";
mso-fareast-font-family:"Segoe UI";
color:#4F81BD;}
p.PadderBetweenTitleandProperties, li.PadderBetweenTitleandProperties, div.PadderBetweenTitleandProperties
{mso-style-name:"Padder Between Title and Properties";
mso-style-noshow:yes;
mso-style-unhide:no;
margin-top:0cm;
margin-right:0cm;
margin-bottom:1.0pt;
margin-left:0cm;
mso-pagination:widow-orphan;
font-size:1.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
p.PadderBetweenControlandBody, li.PadderBetweenControlandBody, div.PadderBetweenControlandBody
{mso-style-name:"Padder Between Control and Body";
mso-style-noshow:yes;
mso-style-unhide:no;
mso-style-next:Normal;
margin-top:0cm;
margin-right:0cm;
margin-bottom:6.0pt;
margin-left:0cm;
mso-pagination:widow-orphan;
font-size:1.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
p.underline, li.underline, div.underline
{mso-style-name:underline;
mso-style-noshow:yes;
mso-style-unhide:no;
mso-style-parent:"";
margin-top:2.0pt;
margin-right:0cm;
margin-bottom:0cm;
margin-left:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
border:none;
mso-border-bottom-alt:solid #4F81BD 1.0pt;
mso-border-bottom-themecolor:accent1;
padding:0cm;
mso-padding-alt:0cm 0cm 2.0pt 0cm;
font-size:1.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Balloon Text";
mso-ansi-font-size:8.0pt;
mso-bidi-font-size:8.0pt;
font-family:"Tahoma","sans-serif";
mso-ascii-font-family:Tahoma;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Tahoma;
mso-bidi-font-family:Tahoma;}
span.Heading1Char
{mso-style-name:"Heading 1 Char";
mso-style-priority:9;
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Heading 1";
mso-ansi-font-size:14.0pt;
mso-bidi-font-size:14.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#365F91;
mso-themecolor:accent1;
mso-themeshade:191;
font-weight:bold;}
span.Heading2Char
{mso-style-name:"Heading 2 Char";
mso-style-priority:9;
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Heading 2";
mso-ansi-font-size:13.0pt;
mso-bidi-font-size:13.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#4F81BD;
mso-themecolor:accent1;
font-weight:bold;}
span.Heading3Char
{mso-style-name:"Heading 3 Char";
mso-style-priority:9;
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"Heading 3";
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:major-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:major-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:major-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:major-bidi;
color:#4F81BD;
mso-themecolor:accent1;
font-weight:bold;}
p.XML, li.XML, div.XML
{mso-style-name:XML;
mso-style-priority:1;
mso-style-unhide:no;
mso-style-parent:"List Paragraph";
mso-style-link:"XML Char";
margin-top:0cm;
margin-right:0cm;
margin-bottom:10.0pt;
margin-left:36.0pt;
mso-add-space:auto;
text-indent:-18.0pt;
line-height:115%;
mso-pagination:widow-orphan;
mso-list:l1 level1 lfo1;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
p.XMLCxSpFirst, li.XMLCxSpFirst, div.XMLCxSpFirst
{mso-style-name:XMLCxSpFirst;
mso-style-priority:1;
mso-style-unhide:no;
mso-style-parent:"List Paragraph";
mso-style-link:"XML Char";
mso-style-type:export-only;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
mso-add-space:auto;
text-indent:-18.0pt;
line-height:115%;
mso-pagination:widow-orphan;
mso-list:l1 level1 lfo1;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
p.XMLCxSpMiddle, li.XMLCxSpMiddle, div.XMLCxSpMiddle
{mso-style-name:XMLCxSpMiddle;
mso-style-priority:1;
mso-style-unhide:no;
mso-style-parent:"List Paragraph";
mso-style-link:"XML Char";
mso-style-type:export-only;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
mso-add-space:auto;
text-indent:-18.0pt;
line-height:115%;
mso-pagination:widow-orphan;
mso-list:l1 level1 lfo1;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
p.XMLCxSpLast, li.XMLCxSpLast, div.XMLCxSpLast
{mso-style-name:XMLCxSpLast;
mso-style-priority:1;
mso-style-unhide:no;
mso-style-parent:"List Paragraph";
mso-style-link:"XML Char";
mso-style-type:export-only;
margin-top:0cm;
margin-right:0cm;
margin-bottom:10.0pt;
margin-left:36.0pt;
mso-add-space:auto;
text-indent:-18.0pt;
line-height:115%;
mso-pagination:widow-orphan;
mso-list:l1 level1 lfo1;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
span.ListParagraphChar
{mso-style-name:"List Paragraph Char";
mso-style-priority:34;
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-link:"List Paragraph";
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;}
span.XMLChar
{mso-style-name:"XML Char";
mso-style-priority:1;
mso-style-unhide:no;
mso-style-locked:yes;
mso-style-parent:"List Paragraph Char";
mso-style-link:XML;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
.MsoChpDefault
{mso-style-type:export-only;
mso-default-props:yes;
mso-bidi-font-size:10.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
.MsoPapDefault
{mso-style-type:export-only;
margin-bottom:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;
mso-header-margin:36.0pt;
mso-footer-margin:36.0pt;
mso-paper-source:0;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1600917486;
mso-list-type:hybrid;
mso-list-template-ids:-964102328 479652672 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:54.0pt;
text-indent:-18.0pt;
font-family:Symbol;
color:windowtext;}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:90.0pt;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:126.0pt;
text-indent:-18.0pt;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:162.0pt;
text-indent:-18.0pt;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:198.0pt;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:234.0pt;
text-indent:-18.0pt;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:270.0pt;
text-indent:-18.0pt;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:306.0pt;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:342.0pt;
text-indent:-18.0pt;
font-family:Wingdings;}
@list l1
{mso-list-id:1910075756;
mso-list-type:hybrid;
mso-list-template-ids:1602392584 -775684000 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l1:level1
{mso-level-number-format:bullet;
mso-level-style-link:XML;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;
color:windowtext;}
@list l1:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l1:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
@list l1:level4
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l1:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l1:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
@list l1:level7
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l1:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l1:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
-->
</style>
<br />
<div class="WordSection1">
<w:sdt contentlocked="t" id="89512093" sdtgroup="t" sdtlocked="t"><span style="font-family: "Calibri","sans-serif"; font-size: 1pt;"><w:sdtpr></w:sdtpr><w:sdt docpart="89512082" id="89512082" storeitemid="X_B7A08954-8428-4B3B-B25E-1613674EFA19" text="t" title="Post Title" xpath="/ns0:BlogPostInfo/ns0:PostTitle"></w:sdt></span>
</w:sdt>
<br />
<h1>
Introduction</h1>
<div class="MsoNormal">
At one of our customers, I set up a BizTalk environment with
several applications, like applications for warehouse, subsidiary and customer
interfaces. Some of these applications also use 2 separate servers, one in the
internal network, and one in the DMZ network. These servers have completely
different ports; for example. <span class="GramE">the</span> DMZ server has ports
connected to the outside world, which aren’t present on the internal server.
Also, some applications are dependent on others, so deploying and <span class="SpellE">undeploying</span> has to be done in a specific order. To make
this easy<span class="GramE">, I</span>
have set up a fully automatic BizTalk build and deployment setup. This is done
by using PowerShell in combination with the BizTalk Deployment Framework. For
my own reference, as well as for helping others set up an automated BizTalk
deployment, I wrote this document. A basic understanding of BizTalk and
PowerShell is needed to work with these examples. Special thanks go out to the
blog of <a href="https://randypaulo.wordpress.com/2012/01/31/automating-silent-install-biztalk-deployment-framework-btdf-using-powershell/">Randy
Paulo</a>.<br />
<a name='more'></a></div>
<h1>
BizTalk Software Factory</h1>
<div class="MsoNormal">
Although not necessary, the <a href="https://encrypted.google.com/url?sa=t&rct=j&q=biztalk%20software%20factory&source=web&cd=1&ved=0CE0QFjAA&url=http%3A%2F%2Fbsf.codeplex.com%2F&ei=3-pUT5rzG46z8QPYlPnwBQ&usg=AFQjCNEaF3Wix8j4bsQRS4PhH9qBJNLgtg&cad=rja">BizTalk
Software Factory</a> is a big help for creating BizTalk applications. When
creating a new BizTalk solution with the BSF, it will create projects for all
the different artifacts (pipelines, orchestrations, schema’s, etc.), as well as
set up default BizTalk Deployment Framework items.<b><span style="color: #4f81bd; font-size: 13pt;"><o:p></o:p></span></b></div>
<h1>
BizTalk Deployment Framework</h1>
<div class="MsoNormal">
The <a href="http://biztalkdeployment.codeplex.com/">BizTalk
Deployment Framework</a> is a framework with which MSI’s can be created used
for simple BizTalk deployments. The MSI’s include all the artifacts, as well as
port bindings. By using place holders, the same binding file can be used for
multiple environments, like development, test and production.</div>
<div class="MsoNormal">
When you have created a new solution using the BTDF, you
should start looking through your <span class="SpellE">Deployment.btdfproj</span>
file and make changes where appropriate. Changes that should be made:</div>
<div class="MsoListParagraphCxSpFirst" style="mso-list: l1 level1 lfo1; text-indent: -18.0pt;">
<span style="font-family: Symbol;">·<span style="font: 7pt "Times New Roman";">
</span></span><span class="SpellE">EnableSideBySide</span>
should be set to false if you do not want to run multiple instances of the
application, leave this on true if you want to run multiple versions side by
side.</div>
<div class="MsoListParagraphCxSpMiddle" style="mso-list: l1 level1 lfo1; text-indent: -18.0pt;">
<span style="font-family: Symbol;">·<span style="font: 7pt "Times New Roman";">
</span></span>Add <span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt; line-height: 115%;"><</span><span class="SpellE"><span style="color: #a31515; font-family: "Courier New"; font-size: 9pt; line-height: 115%;">SkipIISReset</span></span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt; line-height: 115%;">></span><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 9pt; line-height: 115%;">true</span></b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt; line-height: 115%;"></</span><span class="SpellE"><span style="color: #a31515; font-family: "Courier New"; font-size: 9pt; line-height: 115%;">SkipIISReset</span></span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt; line-height: 115%;">></span><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 10pt; line-height: 115%;"> </span></b>if you are not
making use of IIS.</div>
<div class="MsoListParagraphCxSpMiddle" style="mso-list: l1 level1 lfo1; text-indent: -18.0pt;">
<span style="font-family: Symbol;">·<span style="font: 7pt "Times New Roman";">
</span></span>Add <span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt; line-height: 115%;"><</span><span class="SpellE"><span style="color: #a31515; font-family: "Courier New"; font-size: 9pt; line-height: 115%;">ApplyXmlEscape</span></span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt; line-height: 115%;">></span><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 9pt; line-height: 115%;">true</span></b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt; line-height: 115%;"></</span><span class="SpellE"><span style="color: #a31515; font-family: "Courier New"; font-size: 9pt; line-height: 115%;">ApplyXmlEscape</span></span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt; line-height: 115%;">></span> if you want to have <span class="SpellE">unescaped</span> XML for better readability.</div>
<div class="MsoListParagraphCxSpMiddle" style="mso-list: l1 level1 lfo1; text-indent: -18.0pt;">
<span style="font-family: Symbol;">·<span style="font: 7pt "Times New Roman";">
</span></span>Add <span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt; line-height: 115%;"><</span><span style="color: #a31515; font-family: "Courier New"; font-size: 9pt; line-height: 115%;">RequireXmlPreprocessDirectives</span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt; line-height: 115%;">></span><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 9pt; line-height: 115%;">false</span></b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt; line-height: 115%;"></</span><span style="color: #a31515; font-family: "Courier New"; font-size: 9pt; line-height: 115%;">RequireXmlPreprocessDirectives</span><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt; line-height: 115%;">></span> so you do not need to have <b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt; line-height: 115%;">#<span class="SpellE">ifdef</span></span></b>
around macros being substituted in PortBindingsMaster.xml and other <span class="SpellE">XMLPreprocess'd</span> files.</div>
<div class="MsoListParagraphCxSpMiddle" style="mso-list: l1 level1 lfo1; text-indent: -18.0pt;">
<span style="font-family: Symbol;">·<span style="font: 7pt "Times New Roman";">
</span></span>Set <span class="SpellE">UseIsolatedAppDomain</span>
to false if the application does not need to run isolated.</div>
<div class="MsoListParagraphCxSpMiddle" style="mso-list: l1 level1 lfo1; text-indent: -18.0pt;">
<span style="font-family: Symbol;">·<span style="font: 7pt "Times New Roman";">
</span></span>If you do not want the receive locations to
automatically start after deployment, for example to make sure everything was
deployed correctly before starting to process the messages, add the following
line:</div>
<div class="MsoListParagraphCxSpLast">
<span style="color: blue; font-family: "Courier New"; font-size: 9pt; line-height: 115%;"><</span><span style="color: #a31515; font-family: "Courier New"; font-size: 9pt; line-height: 115%;">EnableAllReceiveLocationsOnDeploy</span><span style="color: blue; font-family: "Courier New"; font-size: 9pt; line-height: 115%;">></span><span style="font-family: "Courier New"; font-size: 9pt; line-height: 115%;">false<span style="color: blue;"></</span><span style="color: #a31515;">EnableAllReceiveLocationsOnDeploy</span><span style="color: blue;">></span></span><span style="font-size: 9pt; line-height: 115%;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;">
Remove the <Transforms>
and <Components> elements, we will be using another item group for this.
After your <<span class="SpellE"><span style="color: #a31515; font-family: "Courier New"; font-size: 9pt;">PropertyGroup</span></span> <span style="color: red; font-family: "Courier New"; font-size: 9pt;">Condition</span><span style="color: blue; font-family: "Courier New"; font-size: 9pt;">="'$(Configuration)'
== 'Server'"></span> group, add the following (substitute or remove
where needed):<span style="color: blue; font-family: "Courier New"; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoListParagraph" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 9pt;"><</span><span style="color: #a31515; font-family: "Courier New"; font-size: 9pt;">ItemGroup</span><span style="color: blue; font-family: "Courier New"; font-size: 9pt;">><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;">
<span style="color: blue; font-family: "Courier New"; font-size: 9pt;"> <</span><span style="color: #a31515; font-family: "Courier New"; font-size: 9pt;">Transforms</span><span style="color: blue; font-family: "Courier New"; font-size: 9pt;"> </span><span style="color: red; font-family: "Courier New"; font-size: 9pt;">Include</span><span style="color: blue; font-family: "Courier New"; font-size: 9pt;">=</span><span style="font-family: "Courier New"; font-size: 9pt;">"<span style="color: blue;">Company.Application.SubApplication1.Maps.dll</span>"<span style="color: blue;">><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 9pt;"> <</span><span style="color: #a31515; font-family: "Courier New"; font-size: 9pt;">LocationPath</span><span style="color: blue; font-family: "Courier New"; font-size: 9pt;">><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 9pt;"> </span><span style="font-family: "Courier New"; font-size: 9pt;">..\Company.Application.SubApplication1.Maps\bin\$(Configuration)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Courier New"; font-size: 9pt;"> <span style="color: blue;"></</span><span style="color: #a31515;">LocationPath</span><span style="color: blue;">><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;">
<span style="color: blue; font-family: "Courier New"; font-size: 9pt;"> </</span><span style="color: #a31515; font-family: "Courier New"; font-size: 9pt;">Transforms</span><span style="color: blue; font-family: "Courier New"; font-size: 9pt;">><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;">
<span style="color: blue; font-family: "Courier New"; font-size: 9pt;"> <</span><span style="color: #a31515; font-family: "Courier New"; font-size: 9pt;">Components</span><span style="color: blue; font-family: "Courier New"; font-size: 9pt;"> </span><span style="color: red; font-family: "Courier New"; font-size: 9pt;">Include</span><span style="color: blue; font-family: "Courier New"; font-size: 9pt;">
=</span><span style="font-family: "Courier New"; font-size: 9pt;">"<span style="color: blue;">Company.Application.SubApplication1.BusinessComponents.dll</span>"<span style="color: blue;">> <o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 9pt;"> <</span><span style="color: #a31515; font-family: "Courier New"; font-size: 9pt;">LocationPath</span><span style="color: blue; font-family: "Courier New"; font-size: 9pt;">> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 9pt;"> </span><span style="font-family: "Courier New"; font-size: 9pt;">..\Company.Application.SubApplication1.BusinessComponents\bin\$(Configuration)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Courier New"; font-size: 9pt;"> <span style="color: blue;"></</span><span style="color: #a31515;">LocationPath</span><span style="color: blue;">><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;">
<span style="color: blue; font-family: "Courier New"; font-size: 9pt;"> </</span><span style="color: #a31515; font-family: "Courier New"; font-size: 9pt;">Components</span><span style="color: blue; font-family: "Courier New"; font-size: 9pt;">><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;">
<span style="color: blue; font-family: "Courier New"; font-size: 9pt;"> <</span><span style="color: #a31515; font-family: "Courier New"; font-size: 9pt;">Components</span><span style="color: blue; font-family: "Courier New"; font-size: 9pt;"> </span><span style="color: red; font-family: "Courier New"; font-size: 9pt;">Include</span><span style="color: blue; font-family: "Courier New"; font-size: 9pt;">
=</span><span style="font-family: "Courier New"; font-size: 9pt;">"<span style="color: blue;">Company.Application.SubApplication1.PipelineComponents.dll</span>"<span style="color: blue;">><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;">
<span style="color: blue; font-family: "Courier New"; font-size: 9pt;"> <</span><span style="color: #a31515; font-family: "Courier New"; font-size: 9pt;">LocationPath</span><span style="color: blue; font-family: "Courier New"; font-size: 9pt;">><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;">
<span style="color: blue; font-family: "Courier New"; font-size: 9pt;"> </span><span style="font-family: "Courier New"; font-size: 9pt;">..\Company.Application.SubApplication1.PipelineComponents\bin\$(Configuration)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;">
<span style="font-family: "Courier New"; font-size: 9pt;"> <span style="color: blue;"></</span><span style="color: #a31515;">LocationPath</span><span style="color: blue;">><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;">
<span style="color: blue; font-family: "Courier New"; font-size: 9pt;"> </</span><span style="color: #a31515; font-family: "Courier New"; font-size: 9pt;">Components</span><span style="color: blue; font-family: "Courier New"; font-size: 9pt;">><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;">
<span style="color: blue; font-family: "Courier New"; font-size: 9pt;"> <</span><span style="color: #a31515; font-family: "Courier New"; font-size: 9pt;">Schemas</span><span style="color: blue; font-family: "Courier New"; font-size: 9pt;"> </span><span style="color: red; font-family: "Courier New"; font-size: 9pt;">Include</span><span style="color: blue; font-family: "Courier New"; font-size: 9pt;">
=</span><span style="font-family: "Courier New"; font-size: 9pt;">"<span style="color: blue;">Company.Application.SubApplication1.Schemas.dll</span>"<span style="color: blue;">><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;">
<span style="color: blue; font-family: "Courier New"; font-size: 9pt;"> <</span><span style="color: #a31515; font-family: "Courier New"; font-size: 9pt;">LocationPath</span><span style="color: blue; font-family: "Courier New"; font-size: 9pt;">><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;">
<span style="color: blue; font-family: "Courier New"; font-size: 9pt;"> </span><span style="font-family: "Courier New"; font-size: 9pt;">..\Company.Application.SubApplication1.Schemas\bin\$(Configuration)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;">
<span style="font-family: "Courier New"; font-size: 9pt;"> <span style="color: blue;"></</span><span style="color: #a31515;">LocationPath</span><span style="color: blue;">><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;">
<span style="color: blue; font-family: "Courier New"; font-size: 9pt;"> </</span><span style="color: #a31515; font-family: "Courier New"; font-size: 9pt;">Schemas</span><span style="color: blue; font-family: "Courier New"; font-size: 9pt;">><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;">
<span style="color: blue; font-family: "Courier New"; font-size: 9pt;"> <</span><span style="color: #a31515; font-family: "Courier New"; font-size: 9pt;">Orchestrations</span><span style="color: blue; font-family: "Courier New"; font-size: 9pt;"> </span><span style="color: red; font-family: "Courier New"; font-size: 9pt;">Include</span><span style="color: blue; font-family: "Courier New"; font-size: 9pt;">
=</span><span style="font-family: "Courier New"; font-size: 9pt;">"<span style="color: blue;">Company.Application.SubApplication1.Orchestrations.dll</span>"<span style="color: blue;">><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;">
<span style="color: blue; font-family: "Courier New"; font-size: 9pt;"> <</span><span style="color: #a31515; font-family: "Courier New"; font-size: 9pt;">LocationPath</span><span style="color: blue; font-family: "Courier New"; font-size: 9pt;">><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;">
<span style="color: blue; font-family: "Courier New"; font-size: 9pt;"> </span><span style="font-family: "Courier New"; font-size: 9pt;">..\Company.Application.SubApplication1.Orchestrations\bin\$(Configuration)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;">
<span style="font-family: "Courier New"; font-size: 9pt;"> <span style="color: blue;"></</span><span style="color: #a31515;">LocationPath</span><span style="color: blue;">><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;">
<span style="color: blue; font-family: "Courier New"; font-size: 9pt;"> </</span><span style="color: #a31515; font-family: "Courier New"; font-size: 9pt;">Orchestrations</span><span style="color: blue; font-family: "Courier New"; font-size: 9pt;">><o:p></o:p></span></div>
<div class="MsoListParagraph">
<span style="color: blue; font-family: "Courier New"; font-size: 9pt; line-height: 115%;"></</span><span style="color: #a31515; font-family: "Courier New"; font-size: 9pt; line-height: 115%;">ItemGroup</span><span style="color: blue; font-family: "Courier New"; font-size: 9pt; line-height: 115%;">><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;">
Change <<span style="color: #a31515; font-family: "Courier New"; font-size: 9pt;">PortBindings</span>><span style="font-family: "Courier New"; font-size: 9pt;">PortBindingsMaster.xml</span></<span style="color: #a31515; font-family: "Courier New"; font-size: 9pt;">PortBindings</span>> to <<span style="color: #a31515; font-family: "Courier New"; font-size: 9pt;">PortBindings</span>><span style="font-family: "Courier New"; font-size: 9pt;">PortBindings.xml</span></<span style="color: #a31515; font-family: "Courier New"; font-size: 9pt;">PortBindings</span>>, so the PortBindingsMaster.xml
file will be copied when deploying, and you can use the place holders for the
different environments.<span style="color: blue; font-family: "Courier New";"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;">
Change <<span style="color: #a31515; font-family: "Courier New"; font-size: 9pt;">FilesToXmlPreprocess</span>> </<span style="color: #a31515; font-family: "Courier New"; font-size: 9pt;">FilesToXmlPreprocess</span>> to <<span style="color: #a31515; font-family: "Courier New"; font-size: 9pt;">FilesToXmlPreprocess</span>><span style="font-family: "Courier New"; font-size: 9pt;">PortBindings.xml</span></<span style="color: #a31515; font-family: "Courier New"; font-size: 9pt;">FilesToXmlPreprocess</span>>, so the place holders will get the correct values when deployed.<span style="color: blue; font-family: "Courier New";"><o:p></o:p></span></div>
<div class="MsoListParagraphCxSpFirst" style="mso-list: l1 level1 lfo1; text-indent: -18.0pt;">
<span style="font-family: Symbol;">·<span style="font: 7pt "Times New Roman";">
</span></span>Make sure to set a unique
ProductID and ProductUpgradeCode.<span style="color: blue; font-family: "Courier New";"><o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto; mso-layout-grid-align: none; mso-list: l1 level1 lfo1; text-autospace: none; text-indent: -18.0pt;">
<span style="font-family: Symbol; font-size: 10pt;">·<span style="font: 7pt "Times New Roman";">
</span></span>If your application
references other application (like an application with shared objects, or the
BizTalk EDI application), add the following:<span style="font-family: "Courier New"; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoListParagraphCxSpLast" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 8pt;"><</span><span style="color: #a31515; font-family: "Courier New"; font-size: 8pt;">ItemGroup</span><span style="color: blue; font-family: "Courier New"; font-size: 8pt;">><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 8pt;"> <</span><span style="color: #a31515; font-family: "Courier New"; font-size: 8pt;">AppsToReference</span><span style="color: blue; font-family: "Courier New"; font-size: 8pt;"> </span><span style="color: red; font-family: "Courier New"; font-size: 8pt;">Include</span><span style="color: blue; font-family: "Courier New"; font-size: 8pt;">=</span><span style="font-family: "Courier New"; font-size: 8pt;">"<span style="color: blue;"> Company.Application.SharedObjects</span>"<span style="color: blue;">/></span></span><span style="font-family: "Courier New"; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoListParagraphCxSpFirst" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 8pt;"><</span><span style="color: #a31515; font-family: "Courier New"; font-size: 8pt;">AppsToReference</span><span style="color: blue; font-family: "Courier New"; font-size: 8pt;"> </span><span style="color: red; font-family: "Courier New"; font-size: 8pt;">Include</span><span style="color: blue; font-family: "Courier New"; font-size: 8pt;">=</span><span style="font-family: "Courier New"; font-size: 8pt;">"<span style="color: blue;">BizTalk EDI Application</span>"<span style="color: blue;">/><o:p></o:p></span></span></div>
<div class="MsoListParagraphCxSpLast">
<span style="color: blue; font-family: "Courier New"; font-size: 8pt; line-height: 115%;"></</span><span style="color: #a31515; font-family: "Courier New"; font-size: 8pt; line-height: 115%;">ItemGroup</span><span style="color: blue; font-family: "Courier New"; font-size: 8pt; line-height: 115%;">><o:p></o:p></span></div>
<div class="MsoNormal">
Now to be able to
automatically create the ports and receive locations, we will need a port
bindings file. To create this, first deploy the application as you would
normally do, and create all ports and such. Now export a bindings file. To make
sure the bindings file can be used by the BTDF, run the following command from
the commandline: <i style="mso-bidi-font-style: normal;">ElementTunnel.exe /i:ExportedBindingsFile.xml
/x:adapterXPaths.txt /o:PortBindingsMaster.xml /decode</i>. ElementTunnel and adapterXPaths.txt
can be found in the BTDF installation folder under <i style="mso-bidi-font-style: normal;">Framework\DeployTools</i>. When done, add the created PortBindingsMaster.xml
to the BizTalk solution.<o:p></o:p></div>
<div class="MsoNormal">
To be able to use this
binding file in multiple environments, open the file and replace settings that
can be different for the environments by placeholders. The placeholder should
be in a format like ${PlaceHolderName}. You will probably want to do this for
all addresses, but may also want to do this for timeouts, ports, usernames etc.<o:p></o:p></div>
<div class="MsoNormal">
Once you have added all
placeholders in the PortBindingsMaster.xml file, you can open the SettingsFileGenerator.xml
file with Microsoft Excel, and add all the placeholders you just created to
this file. If you do not see this file in your solution, just choose to add an
existing file in your solution, and choose it from <i style="mso-bidi-font-style: normal;">{Solution Folder}\Deployment\EnvironmentSettings</i>. Here you can add
the placeholders in the left most column, and add the respective values in the
other columns. One important thing here is to make sure the Settings File Name
is the same in all your SettingsFileGenerator files, otherwise our PowerShell
script will have a problem later on.<o:p></o:p></div>
<h1>
PowerShell</h1>
<div class="MsoNormal">
For automating the building and deployment of your BizTalk
applications, you will be using PowerShell scripts. First make sure PowerShell
is enabled on your servers. We will need to adjust the execution policy to make
sure we can run all necessary commands. Open a new PowerShell command line and
execute the following command: <i style="mso-bidi-font-style: normal;">Set-<span class="SpellE">ExecutionPolicy</span> Unrestricted</i>. Next we will install the <a href="http://psbiztalk.codeplex.com/">BizTalk PowerShell Provider</a> so we can
use PowerShell to work with BizTalk. Simply choose default settings for the
installation.</div>
<h3>
Build script</h3>
<div class="MsoNormal">
We will start with a script that builds the BizTalk
applications and copies the resulting installation files to a directory. You
can also choose to copy the files to a shared folder, so they can be used by
all your servers. We will also archive the older installations, so we can
revert to a previous set of applications. </div>
<div class="MsoNormal">
We start with creating a function that will build the
project. This is done using <span class="SpellE">MSBuild</span>.</div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">#</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">This</span>
script is used to build the BizTalk solutions and create the MSI Installer
packages.</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">After</span>
this is done all necessary files will be copied to a location accessible to all
BizTalk servers.</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">#</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Functions</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">#</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Function</span></span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"> rebuilds a project in the given mode</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Project</span></span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"> is the name of the project</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">#</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">function</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">RebuildProject</span> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$project</b></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Write to the prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-<span class="GramE">Host<b><span style="color: navy;">(</span></b></span></span><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$mode</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" "</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$project</b></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">Set</span>
the directory of the project</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">solutionDir</span></b> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$</b></span></span><span class="SpellE"><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">baseDir</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$project</b> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">Set</span>
the solution file to be used</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">solutionFile</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$project</b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">".<span class="SpellE">sln</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Set options for the <span class="SpellE">MSBuild</span> process</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$options</b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$verbosity</b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"/<span class="SpellE">nologo</span>
/<span class="SpellE">p<span class="GramE">:Configuration</span></span>="</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$mode</b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">This</span>
will use <span class="SpellE">MSBuild</span> to clean the output directory of the
solution</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$clean</b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE"><span class="GramE">msbuild</span></span></b><span class="GramE"> <b><span style="color: navy;">+</span></b></span>
</span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" "</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">solutionFile</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" "</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$options</b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" /<span class="SpellE">t:Clean</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">This</span>
will use <span class="SpellE">MSBuild</span> to build the solution</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$build</b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE"><span class="GramE">msbuild</span></span></b><span class="GramE"> <b><span style="color: navy;">+</span></b></span>
</span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" "</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">solutionFile</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" "</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$options</b> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Go to the directory of the
solution</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: #0080ff; font-family: "Courier New"; font-size: 8pt;">cd</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">solutionDir</span></b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Clean the solution output
directory</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Invoke-Expression</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$clean</b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Build the solution</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Invoke-Expression</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$build</b><o:p></o:p></span></div>
<div class="MsoNormal">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
The next function will create the MSI installers. This is
done by using <span class="SpellE">MSBuild</span> in conjunction with the BizTalk
Deployment Framework. After the installers have been created, they are being
copied to a directory specified in your properties.<span style="font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">#</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Function</span></span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"> builds the MSI installer</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Project</span></span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"> is the name of the project</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="SpellE">DeploymentType</span></span></span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"> can be used to create extra MSI packages for different
deployment environments for the same application</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># For</span></span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">
example, a LAN and DMZ server with different ports for the same application</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># The</span></span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">
name of the BTDF project file should be something like <span class="SpellE">Company.BizTalk.Test.Lan.Deployment.btdfproj</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">#</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">function</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">BuildMsi</span> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$project</span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">,</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">deploymentType</span></b></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Check if a deployment type
was provided</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">if</span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b></span><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">deploymentType</span></span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ne <b>$null</b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">and <b>$<span class="SpellE">deploymentType</span></b>
</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ne </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">""</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># If so, it should be
proceeded by a dot</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">deploymentType</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"."</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">deploymentType</span></b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">The</span>
directory of the deployment files</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">solutionDir</span></b>
</span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$</b></span></span><span class="SpellE"><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">baseDir</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$project</b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"\"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$project</b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">".Deployment"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">The</span>
directory where the installer will be built</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">msiDir</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">solutionDir</span></b>
</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"\bin\"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$mode</b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">The</span>
location of the BTDF project file</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">solutionFile</span></b>
</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">solutionDir</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"\"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$project</b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">deploymentType</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">".<span class="SpellE">Deployment.btdfproj</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Options used by <span class="SpellE">MSBuild</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$options</b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" /<span class="SpellE">nologo</span> /<span class="SpellE">t<span class="GramE">:Installer</span></span> /<span class="SpellE">p:Configuration</span>="</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$mode</b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Use <span class="SpellE">MSBuild</span>
to build the installer</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$build</b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">msbuild</span></b>
</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" "</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">solutionFile</span></b>
</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" "</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$options</b> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">#
Build the installer</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Invoke-Expression</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$build</b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Copy the installer to the directory
containing all installation files</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Copy-Item</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">msiDir</span></span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"\*.<span class="SpellE">msi</span>"</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">installersDir</span></b><o:p></o:p></span></div>
<div class="MsoNormal">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
Now we create a function that will copy any additional files
we want to the same location as where the installers are being placed. In this
case, we copy the PowerShell script that will be used to deploy the
applications.</div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Copy additional files to
the directory containing all installation files</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">function</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">CopyAdditionalFiles</span></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">()</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Copy script used to do
deployment</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Copy-Item</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">serverDeployFile</span></b> <b>$<span class="SpellE">installersDir</span></b><o:p></o:p></span></div>
<div class="MsoNormal">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-size: 8pt;">}</span></b><span style="font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
The last function we need to create is used to make a backup
of the old installers. This way, you will always have the possibility to revert
to a previous installation if something is incorrect.</div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Create a backup of the
current installers</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">function</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">BackupInstallers</span></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">()</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Get the <span class="SpellE">currect</span>
date and time</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">currentDateTime</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Get-Date</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">format s</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">).</span></b><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Replace</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">":"</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">,</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">""</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">Set</span>
the directory where we will want to store the backup</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">backupDir</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">installersDir</span></b>
</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"\History\"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">currentDateTime</span></b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Create backup directory</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">New-Item</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">backupDir</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: #0080ff; font-family: "Courier New"; font-size: 8pt;">type</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> directory<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Copy all the MSI and
PowerShell files from the directory containing all installation files to the
backup directory</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Copy-Item</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">installersDir</span></span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"\*.<span class="SpellE">msi</span>"</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">backupDir</span></b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Copy-Item</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">installersDir</span></span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"\*.ps1"</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">backupDir</span></b><o:p></o:p></span></div>
<div class="MsoNormal">
<span style="background: none repeat scroll 0% 0% white; font-size: 8pt;">}</span><span style="font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
Now that we have created all functions, we will set the
properties that are used in the script.</div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">################################
Set your own properties here ##################################</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Parameters</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Base directory where all
the related files can be found</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">baseDir</span></span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"C:\Source\Company\"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Build mode for building the
BizTalk applications, can be Release or Debug</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$mode</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Release"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Directory where the
finished MSI installers will be placed</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">installersDir</span></span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"C:\Installers"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Location of the PowerShell
script used to do deployment on the servers</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">Will</span>
be copied to the finished installers directory</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">serverDeployFile</span></span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">baseDir</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Additional\Power shell\Deploy.ps1"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">Used</span>
applications</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Location of <span class="SpellE">MSBuild</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">msbuild</span></span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">#</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">The</span>
verbosity level <span class="SpellE">posible</span> values are:</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># The available verbosity
levels are <span class="GramE">q[</span><span class="SpellE">uiet</span>], m[<span class="SpellE">inimal</span>], n[<span class="SpellE">ormal</span>], d[<span class="SpellE">etailed</span>], and <span class="SpellE">diag</span>[<span class="SpellE">nostic</span>]</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">#</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$verbosity</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" /<span class="SpellE">v<span class="GramE">:q</span></span> "</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">################################
Done ##########################################################</span><span style="font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
Finally, we use all this to do the actual work. Start by
creating a backup of your old installers.</div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Do work</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Backup old
installers"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Do Backup</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">BackupInstallers</span></span><span style="font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 115%;">
<span style="font-size: 8pt; line-height: 115%;">Next we build the BizTalk applications. By doing this, we
always make sure the applications are built in the correct order. Add a line
for each of your applications.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Building the
solutions"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">################ Set your own
projects here ###############</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Build solutions</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">RebuildProject</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"<span class="SpellE">Company.BizTalk.CommonFiles</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">RebuildProject</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Company.BizTalk.Test1"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">RebuildProject</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Company.BizTalk.Test2"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">#########################
Done ############################</span><span style="font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
Now that the applications are built, we can create the MSI
installers. For our customer, for some applications we wanted different
versions for the LAN (internal) and DMZ servers, which is also being handled
here.</div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-<span class="GramE">Host<b><span style="color: navy;">(</span></b></span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Building
MSI packages"</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Fore <span class="SpellE">DarkGreen</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">################ Set your own
projects here ###############</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Create MSI installers</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">BuildMsi</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"<span class="SpellE">Company.BizTalk.CommonFiles</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">BuildMsi</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Company.BizTalk.Test1"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">BuildMsi</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Company.BizTalk.Test2"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"<span class="SpellE">Lan</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">BuildMsi</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Company.BizTalk.Test2"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"<span class="SpellE">Dmz</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">#######################
Finished ##########################</span><span style="color: green; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
When this has been done, we copy any additional files we may
need to the output folder. When this is done, the application is finished, and
will wait for the user to press a key before it exits. This is done so the user
can check for any errors.<o:p></o:p></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-<span class="GramE">Host<b><span style="color: navy;">(</span></b></span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Copying
additional files"</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Fore <span class="SpellE">DarkGreen</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Copy additional files</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">CopyAdditionalFiles</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-<span class="GramE">Host<b><span style="color: navy;">(</span></b></span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Press
any key to exit..."</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Fore White<o:p></o:p></span></div>
<div class="MsoNormal">
<b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$null</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE"><span class="GramE">host<span style="color: navy;">.</span><span style="font-weight: normal;">UI</span><span style="color: navy;">.</span><span style="font-weight: normal;">RawUI</span><span style="color: navy;">.</span><span style="font-weight: normal;">ReadKey</span></span></span></b></span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"<span class="SpellE">NoEcho,IncludeKeyDown</span>"</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><br />
<b><span style="color: #4f81bd;"><o:p></o:p></span></b></div>
<h3>
Deploy script</h3>
<div class="MsoNormal">
After copying the files we just created to the server where
we want to do the deployment, we will want to automate this deployment as well.
I created a script for this as well. We start with initializing the PowerShell
provider, so we can use all the functions provided.</div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">#</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Function initializes the
PowerShell for BizTalk provider.</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">#</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">function</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">InitPowerShellForBizTalk</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Check if the snap-in is <span class="SpellE">allready</span> loaded</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">if</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Get-<span class="SpellE">PSSnapin</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Name <span class="SpellE">BizTalkFactory<b><span style="color: navy;">.</span></b>PowerShell<b><span style="color: navy;">.</span></b>Extensions</span>
</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ErrorAction</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">SilentlyContinue</span></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">eq</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$null</b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">If</span>
not, add the snap-in<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Initializing PowerShell
provider"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ForegroundColor</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> Cyan<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Add-<span class="SpellE">PSSnapIn</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">BizTalkFactory<b><span style="color: navy;">.</span></b>PowerShell<b><span style="color: navy;">.</span></b>Extensions</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Set locations</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">Function</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">Biztalk</span></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">:</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Set</span></span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">-Location</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">Biztalk</span></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">:</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">Function</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">Biztalk</span></span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">:</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">\</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Set</span></span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">-Location</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">Biztalk</span></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">:</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">\ </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Set aliases</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Set-Alias</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> Enlist-<span class="SpellE">SendPort</span> Stop-<span class="SpellE">SendPort</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><b><span style="color: navy; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></b></div>
<div class="MsoNoSpacing">
Now we create a function that is used to determine the
path of the <span class="SpellE">MSBuild</span> application. I found that with <span class="SpellE">MSBuild</span> 4 we get an error if we want to deploy to the SSO
as well, so we will need to use version 3.5. The error I got was as following<span class="GramE">:</span><br />
<span style="color: #595959; font-size: 8pt;">The "<span class="SpellE">UpdateSSOConfigItem</span>" task failed
unexpectedly.\r<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span class="SpellE"><span style="color: #595959; font-size: 8pt;">System.ArgumentNullException</span></span><span style="color: #595959; font-size: 8pt;">:
Value cannot be null.\r<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="color: #595959; font-size: 8pt;">Parameter name: s\r<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="color: #595959; font-size: 8pt;"> <span class="GramE">at</span> System.IO.<span class="SpellE">StringReader</span>..<span class="SpellE"><span class="GramE">ctor</span></span><span class="GramE">(</span>String
s)\r<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="color: #595959; font-size: 8pt;"> <span class="GramE">at</span> <span class="SpellE">SSOSettingsFileManager.SSOSettingsFileReader.Read</span>(String
<span class="SpellE">affiliateApplication</span>)\r<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="color: #595959; font-size: 8pt;"> <span class="GramE">at</span> <span class="SpellE">DeploymentFramework.BuildTasks.UpdateSSOConfigItem.Execute</span>()\r<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 115%;">
<br />
The code for the method is as following:</div>
<div class="MsoNormal" style="line-height: 115%;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt; line-height: 115%;">#<br />
# <span class="GramE">This</span> script is used to build the BizTalk solutions
and create the MSI Installer packages.<br />
# <span class="GramE">After</span> this is done all necessary files will be
copied to a location accessible to all BizTalk servers.<br />
#</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt; line-height: 115%;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Functions</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">#</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Get</span></span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">
the path of the <span class="SpellE">MSBuild</span> application</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">#</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">function</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">GetMSBuildPath</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">#
Check if the <span class="SpellE">MSBuild</span> executable can be found</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">if</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Test-Path</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Join-Path</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">env<span style="color: navy;">:</span><span style="font-weight: normal;">windir</span></span></b> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Microsoft.NET\Framework\v3.5\MSBuild.exe"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">))</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">If</span> so, set the executable to be used</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">BTDFMSBuildPath</span></b>
</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Join-Path</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">env<span class="GramE"><span style="color: navy;">:</span><span style="font-weight: normal;">windir</span></span></span></b> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Microsoft.NET\Framework\v3.5\MSBuild.exe"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" Using <span class="SpellE">MSBuild</span> $<span class="SpellE">dotNetVersion</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ForegroundColor</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">DarkGray</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">return</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">BTDFMSBuildPath</span></b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">else</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Error</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"
<span class="SpellE">MSBuild</span></span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;"> not
found."</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">return</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">""</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}<o:p></o:p></span></b></div>
<div class="MsoNormal">
Using the BizTalk Deployment Framework, we don’t just deploy
the applications, but we install them as well. However, before installing and
deploying the new version, we have to undeploy and <span class="SpellE">deinstall</span>
the old one first. This function is used to do just that. <o:p></o:p></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">#</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Function removes an
application from the system</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">#</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">function</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">RemoveApplication</span></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">([</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">string</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">]</span></b><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">applicationName</span></span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">,</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">[</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">string</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">]</span></b><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">versionNumber</span></span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">,</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">[</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">string</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">]</span></b><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">guid</span></span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-<span class="GramE">Host<b><span style="color: navy;">(</span></b></span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">""</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-<span class="GramE">Host<b><span style="color: navy;">(</span></b></span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Removing
application "</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">ApplicationName</span></b></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Fore Cyan<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">Set</span>
the folder where the installation was installed</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">applicationInstallFolder</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">applicationInstallPath</span></b>
</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"\"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">applicationName</span></b>
</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"\"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">versionNumber</span></b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-<span class="GramE">Host<b><span style="color: navy;">(</span></b></span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"<span class="SpellE">Undeploying</span> application"</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">The</span>
script to be executed for <span class="SpellE">undeploying</span> the application</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$script</b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">#Assign MS Build <span class="SpellE">Params</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">BTDFMSBuildPath</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">GetMSBuildPath</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$parms</b></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"DeployBizTalkMgmtDB=$BTDeployMgmtDB<span class="GramE">;Configuration</span>=Server"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$logger</b></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"<span class="SpellE">FileLogger<span class="GramE">,Microsoft.Build.Engine</span>;logfile</span>=`""
+ ( Join-Path $<span class="SpellE">applicationInstallFolder</span> "</span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">DeployResults</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">\DeployResults</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">.</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">txt</span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" ) + "</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">`</span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">""</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">btdfFile</span></b></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"`"" <span class="GramE">+ (</span>Join-Path $<span class="SpellE">applicationInstallFolder</span> ("</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Deployment\</span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" + $<span class="SpellE">applicationName</span> + "</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">.</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Deployment</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">.</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">btdfproj</span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">")) + "</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">`</span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">""</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">args</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"/<span class="GramE">p:</span>{1} /<span class="SpellE">target:Undeploy</span>
/l:{2} {0}"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">f <b>$<span class="SpellE">btdfFile</span></b></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">,</span></b><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">parms</span></span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">,</span></b><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$logger</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" Executing <span class="SpellE">MSBuild</span> from: $<span class="SpellE">BTDFMSBuildPath</span><span class="GramE">"<span style="color: black;">
</span><b><span style="color: navy;">-</span></b></span></span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ForegroundColor</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> Cyan<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" <span class="SpellE">ArgList</span>:
$<span class="SpellE">args</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ForegroundColor</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">DarkGray</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Get <span class="SpellE">MSBuild</span>
<span class="GramE">return</span> code</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">exitCode</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Start-Process </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">FilePath</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">BTDFMSBuildPath</span></b>
</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ArgumentList</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">args</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Wait </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Passthru</span></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">).</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ExitCode</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" Exit Code: $<span class="SpellE">exitCode</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">""</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"
Copying</span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;"> Log file."</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Copy to log file</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">args</span></b> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"</span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">Deployment\Framework\<span class="SpellE">CopyDeployResults.msbuild</span> /<span class="SpellE">nologo</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> Start-Process </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">FilePath</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">BTDFMSBuildPath</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ArgumentList</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">args</span></b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Check if <span class="SpellE">MSBuild</span> was <span class="SpellE">succesful</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">if</span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b></span><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">exitCode</span></span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ne </span><span style="background: none repeat scroll 0% 0% white; color: #ff8000; font-family: "Courier New"; font-size: 8pt;">0</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">If</span> not, write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Error</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" Error while calling <span class="SpellE">MSBuild</span>, Exit Code: $<span class="SpellE">exitCode</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">Do</span> not continue</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">return</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Execute the <span class="SpellE">MSBuild</span> command</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> Invoke-Command </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">scriptblock</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$script</b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-<span class="GramE">Host<b><span style="color: navy;">(</span></b></span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Uninstalling
application <span class="SpellE">Company.BizTalk</span>."</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">applicationName</span></b></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">The</span>
script to be executed for uninstalling the application</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$script</b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># The MSI <span class="GramE">file</span>
for the application to be uninstalled</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">msiFile</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"<span class="SpellE">Company.BizTalk</span>."</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">applicationName</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"-"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">VersionNumber</span></b>
</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">".<span class="SpellE">msi</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">Uninstall</span>
arguments for the MSI file</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">args</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"/<span class="SpellE">qn</span> /<span class="GramE">x
"</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">guid</span></b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"
Uninstalling</span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;"> MSI File.."</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ForegroundColor</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> Cyan<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" MSI</span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">
File: $<span class="SpellE">msiFile</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ForegroundColor</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">DarkGray</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" <span class="SpellE">Args</span>: $<span class="SpellE">args</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ForegroundColor</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">DarkGray</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Get the return code</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">exitCode</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Start-Process </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">FilePath</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"msiexec.exe"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ArgumentList</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">args</span></b>
</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Wait
</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Passthru</span></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">).</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ExitCode</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" Exit Code: $<span class="SpellE">exitCode</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Check if uninstalling was <span class="SpellE">succesful</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">if</span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b></span><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">exitCode</span></span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ne </span><span style="background: none repeat scroll 0% 0% white; color: #ff8000; font-family: "Courier New"; font-size: 8pt;">0</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">If</span> not, write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Error</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Uninstalling $<span class="SpellE">msiFile</span> failed<span class="GramE">!,</span> Exit Code: $<span class="SpellE">exitCode</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">Do</span> not continue</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">return</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"
Uninstalled</span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;"> MSI success.."</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ForegroundColor</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> Green<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">""</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Execute the uninstall
command</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> Invoke-Command </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">scriptblock</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$script</b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Removing finished"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Fore <span class="SpellE">DarkCyan</span><o:p></o:p></span></div>
<div class="MsoNormal">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-size: 8pt;">}</span></b><span style="font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 115%;">
Now we will create the function
that does the installation and deployment of the new version of the
application.<span style="color: #7f7f7f; font-family: "Courier New"; font-size: 8pt; line-height: 115%;"><o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="background: none repeat scroll 0% 0% white; color: green;">#</span><span style="background: none repeat scroll 0% 0% white; color: black;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Function installs an
application on the system</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">#</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">function</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">InstallApplication</span></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">([</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">string</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">]</span></b><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">applicationName</span></span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">,</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">[</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">string</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">]</span></b><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$version</span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">,</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">[</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">string</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">]</span></b><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$environment</span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># The MSI <span class="GramE">file</span>
of the application to be installed</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">msiFile</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">applicationName</span></b>
</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"-"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$version</b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">".<span class="SpellE">msi</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">The</span>
location where the application should be installed</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">applicationInstallFolder</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">applicationInstallPath</span></b>
</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"\"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">ApplicationName</span></b>
</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"\"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$version</b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">The</span>
script to be executed for installing the application</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$script</b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Arguments used for
installing the application</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">args</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"-<span class="SpellE">i</span> $<span class="SpellE">msiFile</span>
INSTALLDIR=`"</span><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">applicationInstallFolder</span></span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">`</span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" /<span class="SpellE">qn</span>
/<span class="SpellE">norestart</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"
Installing</span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;"> MSI File.."</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ForegroundColor</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> Cyan<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" MSI</span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">
File: $<span class="SpellE">msiFile</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ForegroundColor</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">DarkGray</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" <span class="SpellE">Args</span>: $<span class="SpellE">args</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ForegroundColor</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">DarkGray</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Get the exit code from the
MSI installation</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">exitCode</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Start-Process </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">FilePath</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"msiexec.exe"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ArgumentList</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">args</span></b>
</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Wait
</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Passthru</span></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">).</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ExitCode</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" Exit Code: $<span class="SpellE">exitCode</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Check if installing was <span class="SpellE">succesful</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">if</span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b></span><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">exitCode</span></span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ne </span><span style="background: none repeat scroll 0% 0% white; color: #ff8000; font-family: "Courier New"; font-size: 8pt;">0</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">If</span> not, write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Error</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Uninstalling $<span class="SpellE">msiFile</span> failed<span class="GramE">!,</span> Exit Code: $<span class="SpellE">exitCode</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">Do</span> not continue</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">return</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"
Uninstalled</span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;"> MSI success.."</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ForegroundColor</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> Green<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">""</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Execute the install command</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> Invoke-Command </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">scriptblock</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$script</b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">The</span>
script to be executed for deploying the application</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$script</b></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Run <span class="SpellE">environmentSettingsExporter</span>,
this one generates the xml file</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="SpellE">F.e</span>.
Exported_DevSettings.xml, Exported_TestSettings.xml etc<span class="GramE">..</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">args</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"`"" + (Join-Path $<span class="SpellE">applicationInstallFolder</span>
"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Deployment\<span class="SpellE">environmentSettings</span>\SettingsFileGenerator</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">.</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">xml</span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">") + "</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">`</span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">""</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">+</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" Deployment\<span class="SpellE">environmentSettings</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">exePath</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"`"" +
(Join-Path $<span class="SpellE">applicationInstallFolder</span> "</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">\Deployment\Framework\DeployTools\environmentSettingsExporter</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">.</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">exe</span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">") + "</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">`</span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">""</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"
Generating</span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;"> environment Settings
File.."</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ForegroundColor</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> Cyan<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" Location: $<span class="SpellE">exePath</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ForegroundColor</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">DarkGray</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" <span class="SpellE">Args</span></span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">: $<span class="SpellE">args</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ForegroundColor</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">DarkGray</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Get the exit code</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">exitCode</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Start-Process </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">FilePath</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">exePath</span></b>
</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ArgumentList</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">args</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Wait </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">PassThru</span></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">).</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ExitCode</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" Exit Code: $<span class="SpellE">exitCode</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Check if exporting the
environment settings was <span class="SpellE">succesful</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">if</span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b></span><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">exitCode</span></span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ne </span><span style="background: none repeat scroll 0% 0% white; color: #ff8000; font-family: "Courier New"; font-size: 8pt;">0</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Write to
prompt if this failed</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Error</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" Generating environment
Settings File failed<span class="GramE">!,</span> Exit Code: $<span class="SpellE">exitCode</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">Do</span> not continue</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">return</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"
Generated</span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;"> environment Settings File.
"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ForegroundColor</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> Green<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">""</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">Set</span>
the environment variables ENV_SETTINGS and BT_DEPLOY_MGMT_DB</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">settingsFile</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Deployment\<span class="SpellE">environmentSettings</span>\Exported<span class="GramE">_{</span>0}Settings.xml"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">f <b>$environment</b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">EnvSettings</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Join-Path</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">applicationInstallFolder</span></b> <b>$<span class="SpellE">settingsFile</span></b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"
Setting</span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;"> environment Variables"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ForegroundColor</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> Cyan<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" ENV_SETTINGS = $<span class="SpellE">EnvSettings</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ForegroundColor</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">DarkGray</span></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">;</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Set environment settings</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Set-Item</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">Env</span></span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">:</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">\</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ENV_SETTINGS </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Value <b>$<span class="SpellE">EnvSettings</span></b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" BT_DEPLOY_MGMT_DB = $<span class="SpellE">BTDeployMgmtDB</span><span class="GramE">"<span style="color: black;">
</span><b><span style="color: navy;">-</span></b></span></span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ForegroundColor</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">DarkGray</span></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">;</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Set BT_DEPLOY_MGMT_DB</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Set-Item</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">Env</span></span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">:</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">\</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">BT_DEPLOY_MGMT_DB </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Value <b>$<span class="SpellE">BTDeployMgmtDB</span></b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"
<span class="SpellE">Setted</span></span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">
environment Variables"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ForegroundColor</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> Green<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">""</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Assign <span class="SpellE">MSBuild</span>
parameters</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">BTDFMSBuildPath</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">GetMSBuildPath</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$parms</b></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"DeployBizTalkMgmtDB=$BTDeployMgmtDB<span class="GramE">;Configuration</span>=Server;SkipUndeploy=$SkipUndeploy"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$logger</b></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"<span class="SpellE">FileLogger<span class="GramE">,Microsoft.Build.Engine</span>;logfile</span>=`""
+ ( Join-Path $<span class="SpellE">applicationInstallFolder</span> "</span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">DeployResults</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">\DeployResults</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">.</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">txt</span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" ) + "</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">`</span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">""</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">btdfFile</span></b></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"`"" <span class="GramE">+ (</span>Join-Path $<span class="SpellE">applicationInstallFolder</span> ("</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Deployment\</span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" + $<span class="SpellE">ApplicationName</span> + "</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">.</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Deployment</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">.</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">btdfproj</span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">")) + "</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">`</span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">""</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">args</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"/<span class="GramE">p:</span>{1} /l:{2} {0}"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">f <b>$<span class="SpellE">btdfFile</span></b></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">,</span></b><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">parms</span></span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">,</span></b><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$logger</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" Executing <span class="SpellE">MSBuild</span> from: $<span class="SpellE">BTDFMSBuildPath</span><span class="GramE">"<span style="color: black;">
</span><b><span style="color: navy;">-</span></b></span></span><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ForegroundColor</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> Cyan<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" <span class="SpellE">ArgList</span>:
$<span class="SpellE">args</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ForegroundColor</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">DarkGray</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">get</span>
<span class="SpellE">MSBuild</span> return code</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">exitCode</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Start-Process </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">FilePath</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">BTDFMSBuildPath</span></b>
</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ArgumentList</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">args</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Wait </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Passthru</span></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">).</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ExitCode</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" Exit Code: $<span class="SpellE">exitCode</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">""</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Check if <span class="SpellE">MSBuild</span> was <span class="SpellE">succesful</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">if</span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b></span><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">exitCode</span></span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ne </span><span style="background: none repeat scroll 0% 0% white; color: #ff8000; font-family: "Courier New"; font-size: 8pt;">0</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">If</span> not, write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Error</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" Error while calling <span class="SpellE">MSBuild</span>, Exit Code: $<span class="SpellE">exitCode</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">Do</span> not continue</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">return</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"
Copying</span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;"> Log file."</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Copy Log File</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">args</span></b> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"</span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">Deployment\Framework\<span class="SpellE">CopyDeployResults.msbuild</span> /<span class="SpellE">nologo</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> Start-Process </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">FilePath</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">BTDFMSBuildPath</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ArgumentList</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">args</span></b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"
Running</span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;"> MS Build and
deploying.."</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ForegroundColor</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> Cyan<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Execute the script</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> Invoke-Command </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">scriptblock</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$script</b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"
Deployed</span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;"> application"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ForegroundColor</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> Green<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="background: none repeat scroll 0% 0% white; font-size: 8pt;">}</span><span style="font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
Also we need a function used to add assemblies as resources
to the BizTalk applications.</div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">#</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Function adds an assembly
resource to the provided BizTalk application</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">#</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">function</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">AddAssemblyResource</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="SpellE"><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">param</span></span></span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">[</span></b><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Parameter</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Position</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: #ff8000; font-family: "Courier New"; font-size: 8pt;">0</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">,</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Mandatory</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">true<span style="color: navy;">,</span><span style="font-weight: normal;">HelpMessage</span></span></span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"An application name should be provided"</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)]</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">[</span></b><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Alias</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"application"</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)]</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">[</span></b><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">string</span></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">]</span></b><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">applicationName</span></span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">,</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">[</span></b><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Parameter</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Position</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: #ff8000; font-family: "Courier New"; font-size: 8pt;">1</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">,</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Mandatory</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">true<span style="color: navy;">,</span><span style="font-weight: normal;">HelpMessage</span></span></span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Please provide a valid resource"</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)]</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">[</span></b><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Alias</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"res"</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)]</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">[</span></b><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">string</span></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">]</span></b><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$resource</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">#
Add the resource to the application, overwriting if it <span class="SpellE">allready</span>
exists</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">New-Item</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Path BizTalk</span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">:</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">\</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Applications\<b>$<span class="SpellE">applicationName</span></b>\Resources\<span class="SpellE">NameIgnored</span> `<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ItemType</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">System<b><span style="color: navy;">.</span></b>BizTalk<span class="GramE"><b><span style="color: navy;">:</span></b>Assembly</span></span> `<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">SourceLocation</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$resource</b>
`<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">GacOnAdd</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> `<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Overwrite</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><b><span style="color: navy; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
Now that we have created all the functions, we will
set the properties that are being used throughout the script.<b><span style="color: navy; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">################################
Set your own properties here ##################################</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Parameters</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Base path for application
installs</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">[</span></b><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">string</span></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">]</span></b><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">applicationInstallPath</span></span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"C:\Program Files"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">The</span>
environment to which we want to deploy (<span class="SpellE">f.e</span>.
production or test</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">[</span></b><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">string</span></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">]</span></b><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">deploymentEnvironment</span></span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Boolean indicating if we
want to deploy to the management database</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">[</span></b><span class="SpellE"><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">bool</span></span></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">]</span></b><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">BTDeployMgmtDB</span></span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$true</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Boolean indicating if we
want to skip <span class="SpellE">undeploying</span> when doing the deployment
(can normally be set to true, since we do <span class="SpellE">undeployment</span>
manually)</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">[</span></b><span class="SpellE"><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">bool</span></span></span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">]</span></b><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">SkipUndeploy</span></span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$true</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal">
<span style="background: none repeat scroll 0% 0% white; color: green; font-size: 8pt;">################################ Done
##########################################################</span></div>
<div class="MsoNormal">
Because we had the different types of servers, we want to be
able to set on which server we are deploying. The next command reads the input
of the user for this.</div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">Let</span>
the user select the type of deployment they want to do</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">function</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">SelectDeploymentType</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">Get</span>
input from the user</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">dType</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Read-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">prompt </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"What type of deployment
do you want to do? LAN / DMZ / OTHER"</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ForegroundColor</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> Green<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Check what type of
deployment the user selected</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">switch</span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b></span><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">dType</span></span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"LAN"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">return</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">dType</span></b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"DMZ"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">return</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">dType</span></b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"OTHER"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">return</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">dType</span></b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="GramE">default</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Error</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"
Please</span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;"> provide a valid deployment
type!"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">return</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">SelectDeploymentType</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}<br style="mso-special-character: line-break;" />
<br style="mso-special-character: line-break;" />
<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: 115%;">
We also want to let the user set
the environment we are going to deploy to.<span style="line-height: 115%;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">Let</span>
the user select what type of environment they want to deploy to</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">function</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">SelectDeploymentEnvironment</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">Get</span>
input from the user</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">dEnvironment</span></b> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Read-Host</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">prompt </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"What type of environment
do you want to deploy to? DEV / TEST / ACCEPT / PROD"</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">ForegroundColor</span></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> Green<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Check what type of environment the user
selected<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">switch</span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b></span><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">dEnvironment</span></span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"DEV"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">deploymentEnvironment</span></b>
</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">dEnvironment</span></b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"TEST"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">deploymentEnvironment</span></b>
</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">dEnvironment</span></b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"ACCEPT"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">deploymentEnvironment</span></b>
</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">dEnvironment</span></b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"PROD"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">deploymentEnvironment</span></b>
</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">dEnvironment</span></b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="GramE">default</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-Error</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"
Please</span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;"> provide a valid
environment!"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">return</span></b></span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">SelectDeploymentEnvironment</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNoSpacing">
Before we start the deployment, we initialize the BizTalk
PowerShell provider.</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Initialize the PowerShell
for BizTalk provider</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span class="SpellE"><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">InitPowerShellForBizTalk</span></span><span style="font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
Now we start <span class="SpellE">undeploying</span> and
removing the applications. The applications that will be removed are determined
by the server we are deploying to. Also, make sure you use the correct GUID’s <span class="GramE">here,</span> it should be the ones you set in the BTDF project, as
it is used to determine the application to be uninstalled.</div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Get the type of deployment
we want to do</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">deploymentType</span></span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">SelectDeploymentType</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Get the environment we want
to deploy to</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNoSpacing">
<b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">deploymentEnvironment</span></span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">SelectDeploymentEnvironment</span></span><span style="color: #7f7f7f; font-family: "Courier New"; font-size: 8pt;"><br style="mso-special-character: line-break;" />
<br style="mso-special-character: line-break;" />
</span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Write to prompt</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-<span class="GramE">Host<b><span style="color: navy;">(</span></b></span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Redeploying
applications from <span class="SpellE">Msi</span> files..."</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Fore <span class="SpellE">DarkGreen</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">################ Set your own
projects here ###############</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">Uninstall</span>
the applications, make sure you use the GUID's you used in your BTDF project
file</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">switch</span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b></span><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">deploymentType</span></span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">################ Set your own
projects here ###############</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="color: grey; font-family: "Courier New"; font-size: 8pt;">"LAN"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">RemoveApplication</span> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Company.BizTalk.Test2.Lan"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"1.0"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"{850AF064-2DF2-4572-84FB-B6578565CC02}"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">RemoveApplication</span> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Company.BizTalk.Test1"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"1.0"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"{B60DF0FB-FDD6-4e9b-86A1-D37F777B4916}"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">RemoveApplication</span> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"<span class="SpellE">Company.BizTalk.Common</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"1.0"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"{DB073B98-310B-49C2-9128-1792900A2B62}"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="color: grey; font-family: "Courier New"; font-size: 8pt;">"DMZ"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">RemoveApplication</span> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Company.BizTalk.Test2.Dmz"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"1.0"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"{850AF064-2DF2-4572-84FB-B6578565CC02}"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">RemoveApplication</span> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"<span class="SpellE">Company.BizTalk.Common</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"1.0"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"{DB073B98-310B-49C2-9128-1792900A2B62}"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="color: grey; font-family: "Courier New"; font-size: 8pt;">"OTHER"<span style="background: none repeat scroll 0% 0% white;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">RemoveApplication</span> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Company.BizTalk.Test2"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"1.0"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"{850AF064-2DF2-4572-84FB-B6578565CC02}"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">RemoveApplication</span> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Company.BizTalk.Test1"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"1.0"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"{B60DF0FB-FDD6-4e9b-86A1-D37F777B4916}"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">RemoveApplication</span> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"<span class="SpellE">Company.BizTalk.Common</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"1.0"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"{DB073B98-310B-49C2-9128-1792900A2B62}"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">######################### Done
############################</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
Now we can install and deploy the new version of the
applications, this is also done by checking which server we are deploying to.</div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># Install the application</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: blue; font-family: "Courier New"; font-size: 8pt;">switch</span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b></span><b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$<span class="SpellE">deploymentType</span></span></b><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">################ Set your own
projects here ###############</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="color: grey; font-family: "Courier New"; font-size: 8pt;">"LAN"<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">InstallApplication</span> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"<span class="SpellE">Company.BizTalk.Common</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"1.0"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">deploymentEnvironment</span></b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">InstallApplication</span> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Company.BizTalk.Test1"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"1.0"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">deploymentEnvironment</span></b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">InstallApplication</span> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Company.BizTalk.Test2.Lan"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"1.0"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">deploymentEnvironment</span></b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="color: grey; font-family: "Courier New"; font-size: 8pt;">"DMZ"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">InstallApplication</span> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"<span class="SpellE">Company.BizTalk.Common</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"1.0"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">deploymentEnvironment</span></b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">InstallApplication</span> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Company.BizTalk.Test2.Dmz"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"1.0"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">deploymentEnvironment</span><o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span></b><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># In the DMZ, we also want to add the resource used for
SFTP communication</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">AddAssemblyResource</span> </span><span class="GramE"><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">" <span class="SpellE">Company.BizTalk.Common</span></span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"C:\Program
Files\EldoS\BizCrypto.BizTalk\Assemblies\NET_20\BT2009\BizCrypto.BizTalk.DefaultPropertySchemas.dll"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="color: grey; font-family: "Courier New"; font-size: 8pt;">"OTHER"<span style="background: none repeat scroll 0% 0% white;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">{</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">InstallApplication</span> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"<span class="SpellE">Company.BizTalk.Common</span>"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"1.0"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">deploymentEnvironment</span></b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">InstallApplication</span> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Company.BizTalk.Test1"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"1.0"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">deploymentEnvironment</span></b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <span class="SpellE">InstallApplication</span> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Company.BizTalk.Test2"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"1.0"</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE">deploymentEnvironment</span></b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;">#########################
Done ############################</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
<b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">}</span></b><span style="font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
Now we are finished. Here we also wait for input from the
user, so the output from the application can be reviewed.<span style="color: #7f7f7f; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: green; font-family: "Courier New"; font-size: 8pt;"># <span class="GramE">Do</span>
not close until the user presses a key</span><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: none repeat scroll 0% 0% white; color: #8000ff; font-family: "Courier New"; font-size: 8pt;">Write-<span class="GramE">Host<b><span style="color: navy;">(</span></b></span></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"Press
any key to exit..."</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">-</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">Fore White<o:p></o:p></span></div>
<div class="MsoNormal">
<b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;">$null</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> </span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">=</span></b><span style="background: none repeat scroll 0% 0% white; color: black; font-family: "Courier New"; font-size: 8pt;"> <b>$<span class="SpellE"><span class="GramE">host<span style="color: navy;">.</span><span style="font-weight: normal;">UI</span><span style="color: navy;">.</span><span style="font-weight: normal;">RawUI</span><span style="color: navy;">.</span><span style="font-weight: normal;">ReadKey</span></span></span></b></span><span class="GramE"><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">(</span></b></span><span style="background: none repeat scroll 0% 0% white; color: grey; font-family: "Courier New"; font-size: 8pt;">"<span class="SpellE">NoEcho,IncludeKeyDown</span>"</span><b><span style="background: none repeat scroll 0% 0% white; color: navy; font-family: "Courier New"; font-size: 8pt;">)</span></b><span style="font-size: 8pt;"><o:p></o:p></span></div>
</div>Eldert Grootenboerhttp://www.blogger.com/profile/11821643198024753393noreply@blogger.com0tag:blogger.com,1999:blog-6146076618722841418.post-30656757262878732762012-05-09T04:32:00.001-07:002012-05-09T04:32:32.556-07:00Place root element in filenameTo be able to see what type of message is in a file coming out of BizTalk, I created an encoding pipeline that includes the root element in the name of the file. Here is the execute method that I used.
<style type="text/css">
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: Consolas, "Courier New", Courier, Monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #a31515; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
<br />
<pre class="csharpcode"><span class="rem">/// <summary></span>
<span class="rem">/// IComponent.Execute method is used to initiate the processing of the message in </span>
<span class="rem">/// this pipeline component.</span>
<span class="rem">/// </summary></span>
<span class="rem">/// <param name="pc">Pipeline context.</param></span>
<span class="rem">/// <param name="inmsg">Input message.</param></span>
<span class="rem">/// <returns>Original input message.</returns></span>
<span class="kwrd">public</span> Microsoft.BizTalk.Message.Interop.IBaseMessage Execute(IPipelineContext pc,
IBaseMessage pInMsg)
{
<span class="rem">// Create a new XML document</span>
XmlDocument xmlDocument = <span class="kwrd">new</span> XmlDocument();
<span class="rem">// Get the XML data from the message</span>
xmlDocument.Load(pInMsg.BodyPart.Data);
<span class="rem">// Set the filename, starting with the root element, and adding a GUID to make</span>
<span class="rem">// sure the filename is unique</span>
<span class="kwrd">string</span> filename = String.Format(<span class="str">"{0}-{1}.xml"</span>,
xmlDocument.DocumentElement.LocalName, Guid.NewGuid()).ToUpperInvariant();
<span class="rem">// To be able to use the filename in the BizTalk file adapter properties, we</span>
<span class="rem">// promote ReceivedFileName</span>
<span class="rem">// This gives us the %SourceFileName% parameter we can use as the filename for</span>
<span class="rem">// the file adapter</span>
pInMsg.Context.Promote(<span class="str">"ReceivedFileName"</span>,
<span class="str">"http://schemas.microsoft.com/BizTalk/2003/file-properties"</span>,
navisionFilename);
<span class="rem">// Go back to the start of the message</span>
pInMsg.BodyPart.Data.Position = 0;
<span class="rem">// Continue processing the message</span>
<span class="kwrd">return</span> pInMsg;
}</pre>Eldert Grootenboerhttp://www.blogger.com/profile/11821643198024753393noreply@blogger.com0tag:blogger.com,1999:blog-6146076618722841418.post-25538605834660408362012-05-09T04:31:00.002-07:002012-05-09T04:31:50.015-07:00Add NamespacesAt our customer, we are using several BizTalk solutions to seperate different BizTalk applications. For example, we have an own application for interfaces for the warehouse system, subsidiaries, suppliers, etc. We also have one application with shared resources like mappings and schemas. When receiving files from Navision, they don't have a namespace, so we need to add this ourselves. We do this in the receive pipeline. Now to be able to use one pipeline to receive multiple types of messages, my collegue Rex van der Laan created a pipeline component that can add namespaces depending on the root element of the message. Here is the code that does this.
<style type="text/css">
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: Consolas, "Courier New", Courier, Monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #a31515; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
<br />
<div style="height: 400px; overflow: auto; width: 625px;">
<table cellpadding="0" cellspacing="0" style="width: 250px;">
<tbody>
<tr>
<td><pre class="csharpcode"><span class="kwrd">using</span> System;
<span class="kwrd">using</span> System.ComponentModel;
<span class="kwrd">using</span> System.IO;
<span class="kwrd">using</span> System.Reflection;
<span class="kwrd">using</span> System.Xml;
<span class="kwrd">using</span> Microsoft.BizTalk.Component.Interop;
<span class="kwrd">using</span> Microsoft.BizTalk.Message.Interop;
<span class="kwrd">namespace</span> Company.BizTalk.PipelineComponents
{
<span class="rem">/// <summary></span>
<span class="rem">/// Custom component for adding a default namespace to a document.</span>
<span class="rem">/// It is possible to define a namespace for an explicit root element by defining </span>
<span class="rem">/// the root element and the namespace like this:</span>
<span class="rem">/// RootElement1 = Navision_SOC</span>
<span class="rem">/// Namespace1 = http://www.business.com/BizTalk/Common/v100</span>
<span class="rem">/// Adds namespace http://www.business.com/BizTalk/Common/v100 to an XmL document</span>
<span class="rem">/// with rootelement Navision_SOC.</span>
<span class="rem">/// RootElement1 and RootElement2 in combination with Namespace1 and Namespace2 </span>
<span class="rem">/// work simular.</span>
<span class="rem">/// It is also possible to define a default namespace.</span>
<span class="rem">/// If a rootelement isn't defined to by one of the above rootelements, then the</span>
<span class="rem">/// default namespace is used.</span>
<span class="rem">/// </summary></span>
[ComponentCategory(CategoryTypes.CATID_PipelineComponent)]
[System.Runtime.InteropServices.Guid(<span class="str">"6BC4F961-EF65-4190-BC6D-F57AA063D938"</span>)]
[ComponentCategory(CategoryTypes.CATID_Decoder)]
<span class="kwrd">public</span> <span class="kwrd">class</span> NamespaceAdderComponent :
Microsoft.BizTalk.Component.Interop.IComponent,
IBaseComponent, IPersistPropertyBag, IComponentUI
{
<span class="preproc">#region</span> Properties
<span class="rem">/// <summary></span>
<span class="rem">/// First root element to look for.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">private</span> <span class="kwrd">string</span> _RootElement1;
<span class="rem">/// <summary></span>
<span class="rem">/// First root element to look for.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> <span class="kwrd">string</span> RootElement1
{
<span class="kwrd">get</span>
{
<span class="kwrd">return</span> _RootElement1;
}
<span class="kwrd">set</span>
{
_RootElement1 = value;
}
}
<span class="rem">/// <summary></span>
<span class="rem">/// Namespace to be used for the first defined root element.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">private</span> <span class="kwrd">string</span> _Namespace1;
<span class="rem">/// <summary></span>
<span class="rem">/// Namespace to be used for the first defined root element.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> <span class="kwrd">string</span> Namespace1
{
<span class="kwrd">get</span>
{
<span class="kwrd">return</span> _Namespace1;
}
<span class="kwrd">set</span>
{
_Namespace1 = value;
}
}
<span class="rem">/// <summary></span>
<span class="rem">/// Second root element to look for.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">private</span> <span class="kwrd">string</span> _RootElement2;
<span class="rem">/// <summary></span>
<span class="rem">/// Second root element to look for.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> <span class="kwrd">string</span> RootElement2
{
<span class="kwrd">get</span>
{
<span class="kwrd">return</span> _RootElement2;
}
<span class="kwrd">set</span>
{
_RootElement2 = value;
}
}
<span class="rem">/// <summary></span>
<span class="rem">/// Namespace to be used for the second defined root element.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">private</span> <span class="kwrd">string</span> _Namespace2;
<span class="rem">/// <summary></span>
<span class="rem">/// Namespace to be used for the second defined root element.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> <span class="kwrd">string</span> Namespace2
{
<span class="kwrd">get</span>
{
<span class="kwrd">return</span> _Namespace2;
}
<span class="kwrd">set</span>
{
_Namespace2 = value;
}
}
<span class="rem">/// <summary></span>
<span class="rem">/// Namespace to be used if root element does not match any of the previous</span>
<span class="rem">/// root elements.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">private</span> <span class="kwrd">string</span> _DefaultNamespace;
<span class="rem">/// <summary></span>
<span class="rem">/// Namespace to be used if root element does not match any of the previous </span>
<span class="rem">/// root elements.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> <span class="kwrd">string</span> DefaultNamespace
{
<span class="kwrd">get</span>
{
<span class="kwrd">return</span> _DefaultNamespace;
}
<span class="kwrd">set</span>
{
_DefaultNamespace = value;
}
}
<span class="preproc">#endregion</span>
<span class="preproc">#region</span> IBaseComponent members
<span class="rem">/// <summary></span>
<span class="rem">/// Name of the component</span>
<span class="rem">/// </summary></span>
[Browsable(<span class="kwrd">false</span>)]
<span class="kwrd">public</span> <span class="kwrd">string</span> Name
{
<span class="kwrd">get</span>
{
<span class="kwrd">return</span> <span class="str">"NamespaceAdderComponent"</span>;
}
}
<span class="rem">/// <summary></span>
<span class="rem">/// Version of the component</span>
<span class="rem">/// </summary></span>
[Browsable(<span class="kwrd">false</span>)]
<span class="kwrd">public</span> <span class="kwrd">string</span> Version
{
<span class="kwrd">get</span>
{
<span class="kwrd">return</span> <span class="str">"1.0.0.0"</span>;
}
}
<span class="rem">/// <summary></span>
<span class="rem">/// Description of the component</span>
<span class="rem">/// </summary></span>
[Browsable(<span class="kwrd">false</span>)]
<span class="kwrd">public</span> <span class="kwrd">string</span> Description
{
<span class="kwrd">get</span>
{
<span class="kwrd">return</span> <span class="str">"Adds a namespace to the root element, using the root element"</span>
+ <span class="str">"to decide what namespace to add"</span>;
}
}
<span class="preproc">#endregion</span>
<span class="preproc">#region</span> IPersistPropertyBag members
<span class="rem">/// <summary></span>
<span class="rem">/// Gets class ID of component for usage from unmanaged code.</span>
<span class="rem">/// </summary></span>
<span class="rem">/// <param name="classid">Class ID of the component.</param></span>
<span class="kwrd">public</span> <span class="kwrd">void</span> GetClassID(<span class="kwrd">out</span> System.Guid classid)
{
classid = <span class="kwrd">new</span> System.Guid(<span class="str">"6BC4F961-EF65-4190-BC6D-F57AA063D938"</span>);
}
<span class="rem">/// <summary></span>
<span class="rem">/// Not implemented.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> <span class="kwrd">void</span> InitNew()
{
}
<span class="rem">/// <summary></span>
<span class="rem">/// Loads configuration properties for the component.</span>
<span class="rem">/// </summary></span>
<span class="rem">/// <param name="pb">Configuration property bag.</param></span>
<span class="rem">/// <param name="errlog">Error status.</param></span>
<span class="kwrd">public</span> <span class="kwrd">virtual</span> <span class="kwrd">void</span> Load(Microsoft.BizTalk.Component.Interop.IPropertyBag pb,
<span class="kwrd">int</span> errlog)
{
<span class="kwrd">object</span> val = <span class="kwrd">null</span>;
<span class="rem">// Read the first root element from the property bag</span>
val = <span class="kwrd">this</span>.ReadPropertyBag(pb, <span class="str">"RootElement1"</span>);
<span class="kwrd">if</span> (val != <span class="kwrd">null</span>)
{
<span class="kwrd">this</span>._RootElement1 = ((<span class="kwrd">string</span>)(val));
}
<span class="rem">// Read the first namespace from the property bag</span>
val = <span class="kwrd">this</span>.ReadPropertyBag(pb, <span class="str">"Namespace1"</span>);
<span class="kwrd">if</span> (val != <span class="kwrd">null</span>)
{
<span class="kwrd">this</span>._Namespace1 = ((<span class="kwrd">string</span>)(val));
}
<span class="rem">// Read the second root element from the property bag</span>
val = <span class="kwrd">this</span>.ReadPropertyBag(pb, <span class="str">"RootElement2"</span>);
<span class="kwrd">if</span> (val != <span class="kwrd">null</span>)
{
<span class="kwrd">this</span>._RootElement2 = ((<span class="kwrd">string</span>)(val));
}
<span class="rem">// Read the second namespace from the property bag</span>
val = <span class="kwrd">this</span>.ReadPropertyBag(pb, <span class="str">"Namespace2"</span>);
<span class="kwrd">if</span> (val != <span class="kwrd">null</span>)
{
<span class="kwrd">this</span>._Namespace2 = ((<span class="kwrd">string</span>)(val));
}
<span class="rem">// Read the default root element from the property bag</span>
val = <span class="kwrd">this</span>.ReadPropertyBag(pb, <span class="str">"DefaultNamespace"</span>);
<span class="kwrd">if</span> (val != <span class="kwrd">null</span>)
{
<span class="kwrd">this</span>.DefaultNamespace = ((<span class="kwrd">string</span>)(val));
}
}
<span class="rem">/// <summary></span>
<span class="rem">/// Saves the current component configuration into the property bag.</span>
<span class="rem">/// </summary></span>
<span class="rem">/// <param name="pb">Configuration property bag.</param></span>
<span class="rem">/// <param name="fClearDirty">Not used.</param></span>
<span class="rem">/// <param name="fSaveAllProperties">Not used.</param></span>
<span class="kwrd">public</span> <span class="kwrd">virtual</span> <span class="kwrd">void</span> Save(Microsoft.BizTalk.Component.Interop.IPropertyBag pb,
<span class="kwrd">bool</span> fClearDirty, <span class="kwrd">bool</span> fSaveAllProperties)
{
<span class="rem">// Save the first root element</span>
<span class="kwrd">this</span>.WritePropertyBag(pb, <span class="str">"RootElement1"</span>, <span class="kwrd">this</span>.RootElement1);
<span class="rem">// Save the first namespace</span>
<span class="kwrd">this</span>.WritePropertyBag(pb, <span class="str">"Namespace1"</span>, <span class="kwrd">this</span>.Namespace1);
<span class="rem">// Save the second root element</span>
<span class="kwrd">this</span>.WritePropertyBag(pb, <span class="str">"RootElement2"</span>, <span class="kwrd">this</span>.RootElement2);
<span class="rem">// Save the second namespace</span>
<span class="kwrd">this</span>.WritePropertyBag(pb, <span class="str">"Namespace2"</span>, <span class="kwrd">this</span>.Namespace2);
<span class="rem">// Save the default root element</span>
<span class="kwrd">this</span>.WritePropertyBag(pb, <span class="str">"DefaultNamespace"</span>, <span class="kwrd">this</span>.Namespace2);
}
<span class="preproc">#region</span> utility functionality
<span class="rem">/// <summary></span>
<span class="rem">/// Reads property value from property bag.</span>
<span class="rem">/// </summary></span>
<span class="rem">/// <param name="pb">Property bag.</param></span>
<span class="rem">/// <param name="propName">Name of property.</param></span>
<span class="rem">/// <returns>Value of the property.</returns></span>
<span class="kwrd">private</span> <span class="kwrd">object</span> ReadPropertyBag(
Microsoft.BizTalk.Component.Interop.IPropertyBag pb, <span class="kwrd">string</span> propName)
{
<span class="kwrd">object</span> val = <span class="kwrd">null</span>;
<span class="kwrd">try</span>
{
pb.Read(propName, <span class="kwrd">out</span> val, 0);
}
<span class="kwrd">catch</span> (System.ArgumentException)
{
<span class="kwrd">return</span> val;
}
<span class="kwrd">catch</span> (System.Exception e)
{
<span class="kwrd">throw</span> <span class="kwrd">new</span> System.ApplicationException(e.Message);
}
<span class="kwrd">return</span> val;
}
<span class="rem">/// <summary></span>
<span class="rem">/// Writes property values into a property bag.</span>
<span class="rem">/// </summary></span>
<span class="rem">/// <param name="pb">Property bag.</param></span>
<span class="rem">/// <param name="propName">Name of property.</param></span>
<span class="rem">/// <param name="val">Value of property.</param></span>
<span class="kwrd">private</span> <span class="kwrd">void</span> WritePropertyBag(
Microsoft.BizTalk.Component.Interop.IPropertyBag pb, <span class="kwrd">string</span> propName,
<span class="kwrd">object</span> val)
{
<span class="kwrd">try</span>
{
pb.Write(propName, <span class="kwrd">ref</span> val);
}
<span class="kwrd">catch</span> (System.Exception e)
{
<span class="kwrd">throw</span> <span class="kwrd">new</span> System.ApplicationException(e.Message);
}
}
<span class="preproc">#endregion</span>
<span class="preproc">#endregion</span>
<span class="preproc">#region</span> IComponentUI members
<span class="rem">/// <summary></span>
<span class="rem">/// Component icon to use in BizTalk Editor.</span>
<span class="rem">/// </summary></span>
[Browsable(<span class="kwrd">false</span>)]
<span class="kwrd">public</span> IntPtr Icon
{
<span class="kwrd">get</span>
{
<span class="kwrd">return</span> IntPtr.Zero;
}
}
<span class="rem">/// <summary></span>
<span class="rem">/// The Validate method is called by the BizTalk Editor during the build </span>
<span class="rem">/// of a BizTalk project.</span>
<span class="rem">/// </summary></span>
<span class="rem">/// <param name="obj">An Object containing the configuration properties.</span>
<span class="rem">/// </param></span>
<span class="rem">/// <returns>The IEnumerator enables the caller to enumerate through a </span>
<span class="rem">/// collection of strings containing error messages. These error messages </span>
<span class="rem">/// appear as compiler error messages. To report successful property </span>
<span class="rem">/// validation, the method should return an empty enumerator.</returns></span>
<span class="kwrd">public</span> System.Collections.IEnumerator Validate(<span class="kwrd">object</span> obj)
{
<span class="kwrd">return</span> <span class="kwrd">null</span>;
}
<span class="preproc">#endregion</span>
<span class="preproc">#region</span> IComponent members
<span class="rem">/// <summary></span>
<span class="rem">/// IComponent.Execute method is used to initiate</span>
<span class="rem">/// the processing of the message in this pipeline component.</span>
<span class="rem">/// </summary></span>
<span class="rem">/// <param name="pc">Pipeline context.</param></span>
<span class="rem">/// <param name="inmsg">Input message.</param></span>
<span class="rem">/// <returns>Original input message.</returns></span>
<span class="kwrd">public</span> Microsoft.BizTalk.Message.Interop.IBaseMessage Execute(
Microsoft.BizTalk.Component.Interop.IPipelineContext pc,
Microsoft.BizTalk.Message.Interop.IBaseMessage inmsg)
{
<span class="rem">// Create the message that will be sent out when processing is done</span>
IBaseMessage pOutMessage = <span class="kwrd">null</span>;
<span class="rem">// Create an empty XML document</span>
XmlDocument xmlDocument = <span class="kwrd">new</span> XmlDocument();
<span class="rem">// Boolean indicating if the namespace has been set</span>
<span class="kwrd">bool</span> isNamespaceSet = <span class="kwrd">false</span>;
<span class="kwrd">try</span>
{
<span class="rem">// Get the data of the XML message</span>
xmlDocument.Load(inmsg.BodyPart.Data);
}
<span class="kwrd">catch</span> (Exception e)
{
<span class="kwrd">throw</span> <span class="kwrd">new</span> Exception(<span class="str">"Error converting message to xml"</span>, e);
}
<span class="rem">// Check if we specified the first root element</span>
<span class="rem">// If we did, check if it is this document's root element</span>
<span class="kwrd">if</span> (!<span class="kwrd">string</span>.IsNullOrEmpty(_RootElement1)
&& xmlDocument.DocumentElement.Name == _RootElement1 )
{
<span class="rem">// Set the namespace for this message</span>
pOutMessage = SetNamespace(inmsg, xmlDocument, _Namespace1);
<span class="rem">// The namespace has been set</span>
isNamespaceSet = <span class="kwrd">true</span>;
}
<span class="rem">// Check if the namespace was allready set earlier</span>
<span class="rem">// If not, check if we specified a second root element</span>
<span class="rem">// If we did, check if it is this document's root element</span>
<span class="kwrd">if</span> (!isNamespaceSet
&& !<span class="kwrd">string</span>.IsNullOrEmpty(_RootElement2)
&& xmlDocument.DocumentElement.Name == _RootElement2)
{
<span class="rem">// Set the namespace for this message</span>
pOutMessage = SetNamespace(inmsg, xmlDocument, _Namespace2);
<span class="rem">// The namespace has been set</span>
isNamespaceSet = <span class="kwrd">true</span>;
}
<span class="rem">// Check if the namespace was allready set earlier</span>
<span class="kwrd">if</span> (!isNamespaceSet)
{
<span class="rem">// Set the namespace for this message</span>
pOutMessage = SetNamespace(inmsg,_DefaultNamespace,
xmlDocument);
}
<span class="rem">// Check if setting the namespace went ok</span>
<span class="kwrd">if</span> (pOutMessage == <span class="kwrd">null</span>)
{
<span class="rem">// If not, set the output message to be the same as the input message</span>
pOutMessage = inmsg;
}
<span class="rem">// Go to the start of the output message</span>
pOutMessage.BodyPart.Data.Position = 0;
<span class="rem">// Return the message for further processing in the pipeline</span>
<span class="kwrd">return</span> pOutMessage;
}
<span class="rem">/// <summary></span>
<span class="rem">/// Set the namespace of a XML message.</span>
<span class="rem">/// </summary></span>
<span class="rem">/// <param name="pInMessage">The message in which we want to set the </span>
<span class="rem">/// namespace.</param></span>
<span class="rem">/// <param name="defaultNamespace">The namespace we want to set.</param></span>
<span class="rem">/// <param name="XmlDocument">The data of the xml message.</param></span>
<span class="rem">/// <returns>Original input message.</returns></span>
<span class="kwrd">private</span> IBaseMessage SetNamespace(IBaseMessage pInMessage,
<span class="kwrd">string</span> defaultNamespace,XmlDocument xmlDocument)
{
<span class="rem">// Check if a namespace was provided</span>
<span class="kwrd">if</span> (!<span class="kwrd">string</span>.IsNullOrEmpty(defaultNamespace))
{
<span class="rem">// Used to set the namespace</span>
<span class="kwrd">string</span> systemPropertiesNamespace =
<span class="str">"http://schemas.microsoft.com/BizTalk/2003/system-properties"</span>;
<span class="rem">// Promotion of the messagetype</span>
<span class="kwrd">string</span> messageType = defaultNamespace + <span class="str">"#"</span> +
xmlDocument.DocumentElement.Name;
pInMessage.Context.Promote(<span class="str">"MessageType"</span>,
systemPropertiesNamespace, messageType);
<span class="rem">// Used to set the xmlns namespace</span>
<span class="kwrd">string</span> xmlnsNS = <span class="str">"http://www.w3.org/2000/xmlns/"</span>;
<span class="rem">// Add the namespace to the xml document</span>
XmlAttribute attributeNode = xmlDocument.CreateAttribute(<span class="str">"xmlns"</span>,
xmlnsNS);
attributeNode.Value = defaultNamespace;
xmlDocument.DocumentElement.SetAttributeNode(attributeNode);
<span class="rem">// We will write the new XML into the message</span>
pInMessage.BodyPart.Data = <span class="kwrd">new</span> MemoryStream();
<span class="rem">// Save the XML into the message</span>
xmlDocument.Save(pInMessage.BodyPart.Data);
<span class="rem">// Go to the start of the message</span>
pInMessage.BodyPart.Data.Position = 0;
}
<span class="rem">// Return the message</span>
<span class="kwrd">return</span> pInMessage;
}
<span class="preproc">#endregion</span>
}
}</pre>
</td>
</tr>
</tbody></table>
</div>Eldert Grootenboerhttp://www.blogger.com/profile/11821643198024753393noreply@blogger.com0tag:blogger.com,1999:blog-6146076618722841418.post-89472393783968639562012-05-09T04:29:00.000-07:002012-05-09T04:49:36.499-07:00File SplitterFor one of the interfaces I was working on we get a flat file with information for multiple identifiers. We needed to split this file so that we only have 1 identifier per file. For this we create a new disassemble pipeline component.
We will add 2 attributes to the class. The first is StartIndex, an integer which will define the location of a unique identifier in the file, for example a identifiercode. The second is Length, an integer that indicates how long the identifier is.
Also add a Queue to the class, which will hold the new messages.
<style type="text/css">
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: Consolas, "Courier New", Courier, Monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #a31515; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
<br />
<div style="height: 400px; overflow: auto; width: 625px;">
<table cellpadding="0" cellspacing="0" style="width: 250px;">
<tbody>
<tr>
<td><pre class="csharpcode"><span class="rem">/// <summary></span>
<span class="rem">/// Split an incoming message.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> <span class="kwrd">class</span> FileSplitter : IBaseComponent,
IDisassemblerComponent,
IComponentUI,
IPersistPropertyBag
{
<span class="rem">/// <summary></span>
<span class="rem">/// Used to hold disassembled messages.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">private</span> System.Collections.Queue qOutputMsgs =
<span class="kwrd">new</span> System.Collections.Queue();
<span class="rem">/// <summary></span>
<span class="rem">/// Namespace used to set the promoted properties.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">private</span> <span class="kwrd">string</span> systemPropertiesNamespace =
<span class="str">@"http://schemas.microsoft.com/BizTalk/2003/system-properties"</span>;
<span class="rem">/// <summary></span>
<span class="rem">/// The start index of the identifier.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">private</span> <span class="kwrd">int</span> _startIndex;
<span class="rem">/// <summary></span>
<span class="rem">/// The start index of the identifier.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> <span class="kwrd">int</span> StartIndex
{
<span class="kwrd">get</span>
{
<span class="kwrd">return</span> _startIndex;
}
<span class="kwrd">set</span>
{
_startIndex = value;
}
}
<span class="rem">/// <summary></span>
<span class="rem">/// The length of the identifier.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">private</span> <span class="kwrd">int</span> _length;
<span class="rem">/// <summary></span>
<span class="rem">/// The length of the identifier.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> <span class="kwrd">int</span> Length
{
<span class="kwrd">get</span>
{
<span class="kwrd">return</span> _length;
}
<span class="kwrd">set</span>
{
_length = value;
}
}
}</pre>
</td>
</tr>
</tbody></table>
</div>
<br />
<a name='more'></a><br /><br />
Now we will create the disassemble method, this is called in the disassemble stage of the pipeline. Here we will read in the message line by line, and check in each line if the identifier in it is the same as the identifier in the previous line. If it is the same, we add it to the current message, if not, we create a new message.
<br />
<div style="height: 400px; overflow: auto; width: 625px;">
<table cellpadding="0" cellspacing="0" style="width: 250px;">
<tbody>
<tr>
<td><pre class="csharpcode">
<span class="rem">/// <summary></span>
<span class="rem">/// Disassemble method is used to initiate the disassembling of the </span>
<span class="rem">/// message in this pipeline component.</span>
<span class="rem">/// </summary></span>
<span class="rem">/// <param name="pc">Pipeline context.</param></span>
<span class="rem">/// <param name="inmsg">Input message.</param></span>
<span class="kwrd">public</span> <span class="kwrd">void</span> Disassemble(IPipelineContext pContext, IBaseMessage pInMsg)
{
<span class="rem">// The namespace in which the new messages should be</span>
<span class="kwrd">string</span> namespaceURI =
<span class="str">"http://www.company.com/BizTalk/Application/v1"</span>;
<span class="rem">// The root element for the new messages</span>
<span class="kwrd">string</span> rootElement = <span class="str">"File_Incoming"</span>;
<span class="rem">// Stringbuilder used to create the new message</span>
StringBuilder messageString = <span class="kwrd">new</span> StringBuilder();
<span class="rem">// Stream that will hold the original message's data</span>
Stream originalMessageStream;
<span class="rem">// Get the original file name</span>
<span class="kwrd">string</span> srcFileName = pInMsg.Context.Read(<span class="str">"ReceivedFileName"</span>,
<span class="str">"http://schemas.microsoft.com/BizTalk/2003/"</span>
+ <span class="str">"file-properties"</span>).ToString().Replace(<span class="str">".txt"</span>, <span class="str">""</span>);
<span class="rem">// Counter to make the outgoing filename unique</span>
<span class="kwrd">int</span> count = 0;
<span class="kwrd">try</span>
{
<span class="rem">// Fetch original message's data</span>
originalMessageStream = pInMsg.BodyPart.GetOriginalDataStream();
}
<span class="kwrd">catch</span> (Exception ex)
{
<span class="rem">// Something went wrong</span>
<span class="kwrd">throw</span> <span class="kwrd">new</span> ApplicationException(<span class="str">"Error in reading original
message: "</span> + ex.Message);
}
<span class="kwrd">try</span>
{
<span class="rem">// Create a StreamReader to read the original message's data</span>
StreamReader sr = <span class="kwrd">new</span> StreamReader(originalMessageStream);
<span class="rem">// The identifier for the last line</span>
<span class="kwrd">string</span> curIdentifier = <span class="kwrd">string</span>.Empty;
<span class="rem">// Go through all the lines in the original message</span>
while (sr.Peek() >= 0)
{
<span class="rem">// Read the next line</span>
<span class="kwrd">string</span> line = sr.ReadLine();
<span class="rem">// Get the identifier in this line</span>
<span class="kwrd">string</span> identifier = line.Substring(_startIndex, _length);
<span class="rem">// Check if this is the same identifier as in the previous </span>
<span class="rem">// line</span>
<span class="kwrd">if</span> (!identifier.Equals(curIdentifier))
{
<span class="rem">// If not, close current identifier if any</span>
<span class="rem">// This prevents an empty message to be created the</span>
<span class="rem">// first time we come here</span>
<span class="kwrd">if</span> (!<span class="kwrd">string</span>.IsNullOrEmpty(curIdentifier))
{
<span class="rem">// Queue the message</span>
CreateOutgoingMessage(pContext,
messageString.ToString(), namespaceURI,
rootElement,
String.Format(<span class="str">"{0}_{1}"</span>, srcFileName, count));
<span class="rem">// Clear the message for the next message</span>
messageString.Remove(0, messageString.Length);
<span class="rem">// Next message will be in a unique file</span>
count++;
}
<span class="rem">// From now on we want to compare to this identifier</span>
curIdentifier = identifier;
}
<span class="rem">// Add the line to the current message</span>
messageString.Append(line + Environment.NewLine);
}
<span class="rem">// Close current identifier if any</span>
<span class="kwrd">if</span> (!<span class="kwrd">string</span>.IsNullOrEmpty(curIdentifier))
{
<span class="rem">// Queue the message</span>
CreateOutgoingMessage(pContext, messageString.ToString(),
namespaceURI, rootElement,
String.Format(<span class="str">"{0}_{1}"</span>, srcFileName, count));
}
<span class="rem">// Close the StreamReader</span>
sr.Close();
}
<span class="kwrd">catch</span> (Exception ex)
{
<span class="rem">// Something went wrong</span>
<span class="kwrd">throw</span> <span class="kwrd">new</span> ApplicationException(<span class="str">"Error in writing outgoing "</span>
+ <span class="str">"messages: "</span> + ex.Message);
}
<span class="kwrd">finally</span>
{
<span class="rem">// Close the StringBuilder</span>
messageString = <span class="kwrd">null</span>;
}
}</pre>
</td>
</tr>
</tbody></table>
</div>
<br />
Now we will implement the GetNext method. This method is used in the pipeline to pass the messages to the next stage.
<br />
<pre class="csharpcode"><span class="rem">/// <summary></span>
<span class="rem">/// Used to pass output messages to next stage.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> IBaseMessage GetNext(IPipelineContext pContext)
{
<span class="rem">// Check if there any messages in the queue</span>
<span class="kwrd">if</span> (qOutputMsgs.Count > 0)
{
<span class="rem">// Get the next message</span>
<span class="kwrd">return</span> (IBaseMessage)qOutputMsgs.Dequeue();
}
<span class="kwrd">return</span> <span class="kwrd">null</span>;
}</pre>
<br />
Finally we have to create the method that puts the messages in the queue.
<br />
<div style="height: 400px; overflow: auto; width: 625px;">
<table cellpadding="0" cellspacing="0" style="width: 250px;">
<tbody>
<tr>
<td><pre class="csharpcode"><span class="rem">/// <summary></span>
<span class="rem">/// Queue outgoing messages.</span>
<span class="rem">/// </summary></span>
<span class="rem">/// <param name="pContext">Pipeline context.</param></span>
<span class="rem">/// <param name="messageString">The string with the new (debatched) message.</param></span>
<span class="rem">/// <param name="namespaceURI">The namespace we want to use for the message.</param></span>
<span class="rem">/// <param name="rootElement">The root element for the message.</param></span>
<span class="rem">/// <param name="sourceFileName">The file name we want to use for the new</span>
<span class="rem">message.</param></span>
<span class="kwrd">private</span> <span class="kwrd">void</span> CreateOutgoingMessage(IPipelineContext pContext,
String messageString, <span class="kwrd">string</span> namespaceURI, <span class="kwrd">string</span> rootElement,
<span class="kwrd">string</span> sourceFileName)
{
<span class="rem">// The message to be put in the queue for further processing in </span>
<span class="rem">// the pipeline</span>
IBaseMessage outMsg;
<span class="kwrd">try</span>
{
<span class="rem">// Create outgoing message</span>
outMsg = pContext.GetMessageFactory().CreateMessage();
<span class="rem">// Add the body part</span>
outMsg.AddPart(<span class="str">"Body"</span>,
pContext.GetMessageFactory().CreateMessagePart(), <span class="kwrd">true</span>);
<span class="rem">// Add the namespace and root element</span>
outMsg.Context.Promote(<span class="str">"MessageType"</span>,
systemPropertiesNamespace, namespaceURI + <span class="str">"#"</span>
+ rootElement.Replace(<span class="str">"ns0:"</span>, <span class="str">""</span>));
<span class="rem">// Set the filename to be used, this can be used in BizTalk</span>
<span class="rem">// by using the %SourceFileName% identifier</span>
outMsg.Context.Promote(<span class="str">"ReceivedFileName"</span>,
<span class="str">"http://schemas.microsoft.com/BizTalk/2003/file-properties"</span>,
sourceFileName);
<span class="rem">// Get the outgoing message as bytes</span>
<span class="kwrd">byte</span>[] bufferOutgoingMessage =
System.Text.ASCIIEncoding.ASCII.GetBytes(messageString);
<span class="rem">// Set the data of the outgoing message</span>
outMsg.BodyPart.Data = <span class="kwrd">new</span> MemoryStream(bufferOutgoingMessage);
<span class="rem">// Place the message in the queue</span>
qOutputMsgs.Enqueue(outMsg);
}
<span class="kwrd">catch</span> (Exception ex)
{
<span class="rem">// Something went wrong</span>
<span class="kwrd">throw</span> <span class="kwrd">new</span> ApplicationException(<span class="str">"Error in queueing outgoing "</span>
+ <span class="str">"messages: "</span> + ex.Message);
}
}</pre>
</td>
</tr>
</tbody></table>
</div>
And finally, the whole class.
<br />
<div style="height: 400px; overflow: auto; width: 625px;">
<table cellpadding="0" cellspacing="0" style="width: 250px;">
<tbody>
<tr>
<td><pre class="csharpcode"><span class="kwrd">using</span> System;
<span class="kwrd">using</span> System.IO;
<span class="kwrd">using</span> System.Text;
<span class="kwrd">using</span> System.ComponentModel;
<span class="kwrd">using</span> Microsoft.BizTalk.Component.Interop;
<span class="kwrd">using</span> Microsoft.BizTalk.Message.Interop;
<span class="kwrd">namespace</span> Company.BizTalk.Other.PipelineComponents
{
[ComponentCategory(CategoryTypes.CATID_PipelineComponent)]
[ComponentCategory(CategoryTypes.CATID_DisassemblingParser)]
[System.Runtime.InteropServices.Guid(<span class="str">"F0DF352C-657B-42AD-A26D-730E8031CD42"</span>)]
<span class="rem">/// <summary></span>
<span class="rem">/// Split an incoming message.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> <span class="kwrd">class</span> FileSplitter : IBaseComponent,
IDisassemblerComponent,
IComponentUI,
IPersistPropertyBag
{
<span class="rem">/// <summary></span>
<span class="rem">/// Used to hold disassembled messages.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">private</span> System.Collections.Queue qOutputMsgs =
<span class="kwrd">new</span> System.Collections.Queue();
<span class="rem">/// <summary></span>
<span class="rem">/// Namespace used to set the promoted properties.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">private</span> <span class="kwrd">string</span> systemPropertiesNamespace =
<span class="str">@"http://schemas.microsoft.com/BizTalk/2003/system-properties"</span>;
<span class="rem">/// <summary></span>
<span class="rem">/// The start index of the identifier.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">private</span> <span class="kwrd">int</span> _startIndex;
<span class="rem">/// <summary></span>
<span class="rem">/// The start index of the identifier.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> <span class="kwrd">int</span> StartIndex
{
<span class="kwrd">get</span>
{
<span class="kwrd">return</span> _startIndex;
}
<span class="kwrd">set</span>
{
_startIndex = value;
}
}
<span class="rem">/// <summary></span>
<span class="rem">/// The length of the identifier.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">private</span> <span class="kwrd">int</span> _length;
<span class="rem">/// <summary></span>
<span class="rem">/// The length of the identifier.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> <span class="kwrd">int</span> Length
{
<span class="kwrd">get</span>
{
<span class="kwrd">return</span> _length;
}
<span class="kwrd">set</span>
{
_length = value;
}
}
}
<span class="rem">/// <summary></span>
<span class="rem">/// Default constructor</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> FileSplitter()
{
}
<span class="rem">/// <summary></span>
<span class="rem">/// Description of pipeline</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> <span class="kwrd">string</span> Description
{
<span class="kwrd">get</span>
{
<span class="kwrd">return</span> <span class="str">"Component to batch one flat file message into multiple
messages"</span>;
}
}
<span class="rem">/// <summary></span>
<span class="rem">/// Name of pipeline</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> <span class="kwrd">string</span> Name
{
<span class="kwrd">get</span>
{
<span class="kwrd">return</span> <span class="str">"FileSplitter"</span>;
}
}
<span class="rem">/// <summary></span>
<span class="rem">/// Pipeline version</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> <span class="kwrd">string</span> Version
{
<span class="kwrd">get</span>
{
<span class="kwrd">return</span> <span class="str">"1.0.0.0"</span>;
}
}
<span class="rem">/// <summary></span>
<span class="rem">/// Returns collecton of errors</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> System.Collections.IEnumerator Validate(<span class="kwrd">object</span> projectSystem)
{
<span class="kwrd">return</span> <span class="kwrd">null</span>;
}
<span class="rem">/// <summary></span>
<span class="rem">/// Returns icon of pipeline</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> System.IntPtr Icon
{
<span class="kwrd">get</span>
{
<span class="kwrd">return</span> <span class="kwrd">new</span> System.IntPtr();
}
}
<span class="rem">/// <summary></span>
<span class="rem">/// Class GUID</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> <span class="kwrd">void</span> GetClassID(<span class="kwrd">out</span> Guid classID)
{
classID = <span class="kwrd">new</span> Guid(<span class="str">"F0DF352C-657B-42AD-A26D-730E8031CD42"</span>);
}
<span class="rem">/// <summary></span>
<span class="rem">/// InitNew</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> <span class="kwrd">void</span> InitNew()
{
}
<span class="rem">/// <summary></span>
<span class="rem">/// Load property from property bag</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> <span class="kwrd">void</span> Load(IPropertyBag propertyBag, <span class="kwrd">int</span> errorLog)
{
<span class="kwrd">object</span> val = <span class="kwrd">null</span>;
<span class="kwrd">try</span>
{
propertyBag.Read(<span class="str">"StartIndex"</span>, <span class="kwrd">out</span> val, 0);
}
<span class="kwrd">catch</span> (ArgumentException)
{
val = 0;
}
<span class="kwrd">catch</span> (NullReferenceException)
{
val = 0;
}
<span class="kwrd">catch</span> (Exception ex)
{
<span class="kwrd">throw</span> <span class="kwrd">new</span> ApplicationException(ex.Message);
}
<span class="kwrd">if</span> (val != <span class="kwrd">null</span>)
{
<span class="kwrd">this</span>._startIndex = ((<span class="kwrd">int</span>)(val));
}
val = <span class="kwrd">null</span>;
<span class="kwrd">try</span>
{
propertyBag.Read(<span class="str">"Length"</span>, <span class="kwrd">out</span> val, 0);
}
<span class="kwrd">catch</span> (ArgumentException)
{
val = 0;
}
<span class="kwrd">catch</span> (NullReferenceException)
{
val = 0;
}
<span class="kwrd">catch</span> (Exception ex)
{
<span class="kwrd">throw</span> <span class="kwrd">new</span> ApplicationException(ex.Message);
}
<span class="kwrd">if</span> (val != <span class="kwrd">null</span>)
{
<span class="kwrd">this</span>._length = ((<span class="kwrd">int</span>)(val));
}
}
<span class="rem">/// <summary></span>
<span class="rem">/// Write property to property bag</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> <span class="kwrd">void</span> Save(IPropertyBag propertyBag, <span class="kwrd">bool</span> clearDirty, </pre>
<pre class="csharpcode"><span class="kwrd"> bool</span> saveAllProperties)
{
<span class="kwrd">object</span> val = (<span class="kwrd">object</span>)StartIndex;
propertyBag.Write(<span class="str">"StartIndex"</span>, <span class="kwrd">ref</span> val);
val = (<span class="kwrd">object</span>)Length;
propertyBag.Write(<span class="str">"Length"</span>, <span class="kwrd">ref</span> val);
}
<span class="rem">/// <summary></span>
<span class="rem">/// Disassemble method is used to initiate the disassembling of the </span>
<span class="rem">/// message in this pipeline component.</span>
<span class="rem">/// </summary></span>
<span class="rem">/// <param name="pc">Pipeline context.</param></span>
<span class="rem">/// <param name="inmsg">Input message.</param></span>
<span class="kwrd">public</span> <span class="kwrd">void</span> Disassemble(IPipelineContext pContext, IBaseMessage pInMsg)
{
<span class="rem">// The namespace in which the new messages should be</span>
<span class="kwrd">string</span> namespaceURI =
<span class="str">"http://www.company.com/BizTalk/Application/v1"</span>;
<span class="rem">// The root element for the new messages</span>
<span class="kwrd">string</span> rootElement = <span class="str">"File_Incoming"</span>;
<span class="rem">// Stringbuilder used to create the new message</span>
StringBuilder messageString = <span class="kwrd">new</span> StringBuilder();
<span class="rem">// Stream that will hold the original message's data</span>
Stream originalMessageStream;
<span class="rem">// Get the original file name</span>
<span class="kwrd">string</span> srcFileName = pInMsg.Context.Read(<span class="str">"ReceivedFileName"</span>,
<span class="str">"http://schemas.microsoft.com/BizTalk/2003/"</span>
+ <span class="str">"file-properties"</span>).ToString().Replace(<span class="str">".txt"</span>, <span class="str">""</span>);
<span class="rem">// Counter to make the outgoing filename unique</span>
<span class="kwrd">int</span> count = 0;
<span class="kwrd">try</span>
{
<span class="rem">// Fetch original message's data</span>
originalMessageStream = pInMsg.BodyPart.GetOriginalDataStream();
}
<span class="kwrd">catch</span> (Exception ex)
{
<span class="rem">// Something went wrong</span>
<span class="kwrd">throw</span> <span class="kwrd">new</span> ApplicationException(<span class="str">"Error in reading original
message: "</span> + ex.Message);
}
<span class="kwrd">try</span>
{
<span class="rem">// Create a StreamReader to read the original message's data</span>
StreamReader sr = <span class="kwrd">new</span> StreamReader(originalMessageStream);
<span class="rem">// The identifier for the last line</span>
<span class="kwrd">string</span> curIdentifier = <span class="kwrd">string</span>.Empty;
<span class="rem">// Go through all the lines in the original message</span>
while (sr.Peek() >= 0)
{
<span class="rem">// Read the next line</span>
<span class="kwrd">string</span> line = sr.ReadLine();
<span class="rem">// Get the identifier in this line</span>
<span class="kwrd">string</span> identifier = line.Substring(_startIndex, _length);
<span class="rem">// Check if this is the same identifier as in the previous </span>
<span class="rem">// line</span>
<span class="kwrd">if</span> (!identifier.Equals(curIdentifier))
{
<span class="rem">// If not, close current identifier if any</span>
<span class="rem">// This prevents an empty message to be created the</span>
<span class="rem">// first time we come here</span>
<span class="kwrd">if</span> (!<span class="kwrd">string</span>.IsNullOrEmpty(curIdentifier))
{
<span class="rem">// Queue the message</span>
CreateOutgoingMessage(pContext,
messageString.ToString(), namespaceURI,
rootElement,
String.Format(<span class="str">"{0}_{1}"</span>, srcFileName, count));
<span class="rem">// Clear the message for the next message</span>
messageString.Remove(0, messageString.Length);
<span class="rem">// Next message will be in a unique file</span>
count++;
}
<span class="rem">// From now on we want to compare to this identifier</span>
curIdentifier = identifier;
}
<span class="rem">// Add the line to the current message</span>
messageString.Append(line + Environment.NewLine);
}
<span class="rem">// Close current identifier if any</span>
<span class="kwrd">if</span> (!<span class="kwrd">string</span>.IsNullOrEmpty(curIdentifier))
{
<span class="rem">// Queue the message</span>
CreateOutgoingMessage(pContext, messageString.ToString(),
namespaceURI, rootElement,
String.Format(<span class="str">"{0}_{1}"</span>, srcFileName, count));
}
<span class="rem">// Close the StreamReader</span>
sr.Close();
}
<span class="kwrd">catch</span> (Exception ex)
{
<span class="rem">// Something went wrong</span>
<span class="kwrd">throw</span> <span class="kwrd">new</span> ApplicationException(<span class="str">"Error in writing outgoing "</span>
+ <span class="str">"messages: "</span> + ex.Message);
}
<span class="kwrd">finally</span>
{
<span class="rem">// Close the StringBuilder</span>
messageString = <span class="kwrd">null</span>;
}
}
<span class="rem">/// <summary></span>
<span class="rem">/// Used to pass output messages to next stage.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> IBaseMessage GetNext(IPipelineContext pContext)
{
<span class="rem">// Check if there any messages in the queue</span>
<span class="kwrd">if</span> (qOutputMsgs.Count > 0)
{
<span class="rem">// Get the next message</span>
<span class="kwrd">return</span> (IBaseMessage)qOutputMsgs.Dequeue();
}
<span class="kwrd">return</span> <span class="kwrd">null</span>;
}
<span class="rem">/// <summary></span>
<span class="rem">/// Queue outgoing messages.</span>
<span class="rem">/// </summary></span>
<span class="rem">/// <param name="pContext">Pipeline context.</param></span>
<span class="rem">/// <param name="messageString">The string with the new (debatched)
/// message.</param></span>
<span class="rem">/// <param name="namespaceURI">The namespace we want to use for the </span></pre>
<pre class="csharpcode"><span class="rem"> /// message.</param></span>
<span class="rem">/// <param name="rootElement">The root element for the message.</param></span>
<span class="rem">/// <param name="sourceFileName">The file name we want to use for the new </span></pre>
<pre class="csharpcode"><span class="rem"> /// message.</param></span>
<span class="kwrd">private</span> <span class="kwrd">void</span> CreateOutgoingMessage(IPipelineContext pContext,
String messageString, <span class="kwrd">string</span> namespaceURI, <span class="kwrd">string</span> rootElement,
<span class="kwrd">string</span> sourceFileName)
{
<span class="rem">// The message to be put in the queue for further processing in </span>
<span class="rem">// the pipeline</span>
IBaseMessage outMsg;
<span class="kwrd">try</span>
{
<span class="rem">// Create outgoing message</span>
outMsg = pContext.GetMessageFactory().CreateMessage();
<span class="rem">// Add the body part</span>
outMsg.AddPart(<span class="str">"Body"</span>,
pContext.GetMessageFactory().CreateMessagePart(), <span class="kwrd">true</span>);
<span class="rem">// Add the namespace and root element</span>
outMsg.Context.Promote(<span class="str">"MessageType"</span>,
systemPropertiesNamespace, namespaceURI + <span class="str">"#"</span>
+ rootElement.Replace(<span class="str">"ns0:"</span>, <span class="str">""</span>));
<span class="rem">// Set the filename to be used, this can be used in BizTalk</span>
<span class="rem">// by using the %SourceFileName% identifier</span>
outMsg.Context.Promote(<span class="str">"ReceivedFileName"</span>,
<span class="str">"http://schemas.microsoft.com/BizTalk/2003/file-properties"</span>,
sourceFileName);
<span class="rem">// Get the outgoing message as bytes</span>
<span class="kwrd">byte</span>[] bufferOutgoingMessage =
System.Text.ASCIIEncoding.ASCII.GetBytes(messageString);
<span class="rem">// Set the data of the outgoing message</span>
outMsg.BodyPart.Data = <span class="kwrd">new</span> MemoryStream(bufferOutgoingMessage);
<span class="rem">// Place the message in the queue</span>
qOutputMsgs.Enqueue(outMsg);
}
<span class="kwrd">catch</span> (Exception ex)
{
<span class="rem">// Something went wrong</span>
<span class="kwrd">throw</span> <span class="kwrd">new</span> ApplicationException(<span class="str">"Error in queueing outgoing "</span>
+ <span class="str">"messages: "</span> + ex.Message);
}
}
}
}</pre>
</td>
</tr>
</tbody></table>
</div>Eldert Grootenboerhttp://www.blogger.com/profile/11821643198024753393noreply@blogger.com0tag:blogger.com,1999:blog-6146076618722841418.post-47623089634140450042012-03-07T06:36:00.000-08:002012-05-09T04:49:58.530-07:00Remove Empty NodesWe found out that Navision does not like empty nodes when receiving an XML message, as it places the empty elements in it's inbound table with empty strings, which means that validation for these elements will fail. To solve this, we had to remove the empty elements from the message that is being sent to Navision. A custom pipeline component was created for this, with the following Execute method.
<style type="text/css">
</style>
<style type="text/css">
</style>
<style type="text/css">
</style>
<style type="text/css">
</style>
<style type="text/css">
</style>
<style type="text/css">
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: Consolas, "Courier New", Courier, Monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #a31515; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
<br />
<pre class="csharpcode"><span class="rem">/// <summary></span>
<span class="rem">/// IComponent.Execute method is used to initiate the processing of the
/// message in this pipeline component.</span>
<span class="rem">/// </summary></span>
<span class="rem">/// <param name="pc">Pipeline context.</param></span>
<span class="rem">/// <param name="inmsg">Input message.</param></span>
<span class="rem">/// <returns>Original input message.</returns></span>
<span class="kwrd">public</span> Microsoft.BizTalk.Message.Interop.IBaseMessage Execute(
Microsoft.BizTalk.Component.Interop.IPipelineContext pc,
Microsoft.BizTalk.Message.Interop.IBaseMessage inmsg)
{
<span class="rem">// Remove empty elements from the message</span>
<span class="kwrd">return</span> RemoveEmptyElements(inmsg);
}<a name='more'></a></pre>
<pre class="csharpcode"></pre>
Now add the method that will remove the empty elements from the message that is being processed.<br />
<br />
<div style="height: 400px; overflow: auto; width: 625px;">
<table cellpadding="0" cellspacing="0" style="width: 250px;">
<tbody>
<tr>
<td><pre class="csharpcode"><span class="rem">/// <summary></span>
<span class="rem">/// Removes empty elements from a BizTalk message.</span>
<span class="rem">/// </summary></span>
<span class="rem">/// <param name="pInMessage">The message being processed in the pipeline.
</param></span>
<span class="rem">/// <returns>The message with the empty elements removed.</returns></span>
<span class="kwrd">private</span> IBaseMessage RemoveEmptyElements(IBaseMessage pInMessage)
{
<span class="rem">// To be able to use XSLT, we need the xsi namespace</span>
XmlDocument xmlDocument = AddXsiNameSpace(inmsg.BodyPart.Data)
<span class="rem">// Execute XSLT to do the removing of the empty elements</span>
Utils.RemoveEmptyNodesXSLT(xmlDocument);
<span class="rem">// Create a new body in the message</span>
pInMessage.BodyPart.Data = <span class="kwrd">new</span> MemoryStream();
<span class="rem">// Save the message without the empty elements to the body</span>
xmlDocument.Save(pInMessage.BodyPart.Data);
<span class="rem">// Go to the start of the message, or it will not be processed</span>
pInMessage.BodyPart.Data.Position = 0;
<span class="rem">// Return the message without empty elements</span>
<span class="kwrd">return</span> pInMessage;
}</pre>
<pre class="csharpcode"></pre>
</td>
</tr>
</tbody></table>
</div>
We use XSLT to find the empty elements, and remove these from the message.<br />
<pre class="csharpcode"><span class="rem">/// <summary></span>
<span class="rem">/// Execute XSLT to remove empty elements from an XML message.</span>
<span class="rem">/// </summary></span>
<span class="rem">/// <param name="xmlDocument">The XMLDocument with the message.</param></span>
<span class="rem">/// <returns>The XML message with the empty nodes removed.</returns></span>
<span class="kwrd">private</span> <span class="kwrd">static</span> XmlDocument RemoveEmptyNodesXSLT(XmlDocument xmlDocument)
{
<span class="rem">// Call XSLT to select the empty nodes</span>
<span class="kwrd">var</span> nodesToRemove =
xmlDocument.SelectNodes(<span class="str">"//*[count(child::node() | @*) =0]"</span>);
<span class="rem">// Loop through all nodes that should be removed</span>
<span class="kwrd">foreach</span> (XmlNode nodeToRemove <span class="kwrd">in</span> nodesToRemove)
{
<span class="rem">// Remove the empty node</span>
nodeToRemove.ParentNode.RemoveChild(nodeToRemove);
}
<span class="rem">// Return the XMLDocument with the empty elements removed</span>
<span class="kwrd">return</span> xmlDocument;
}</pre>
<pre class="csharpcode"></pre>
Seeing how we need to have the xsi namespace to be able to use XSLT on the message, we will add this namespace to the message.<br />
<br />
<div style="height: 400px; overflow: auto; width: 625px;">
<table cellpadding="0" cellspacing="0" style="width: 250px;">
<tbody>
<tr>
<td><pre class="csharpcode"><span class="rem">/// <summary></span>
<span class="rem">/// Add the xsi namespace to a XML document.</span>
<span class="rem">/// </summary></span>
<span class="rem">/// <param name="inputStream">Stream with the XML message data.</param></span>
<span class="rem">/// <returns>A XMLDocument with the xsi namespace.</returns></span>
<span class="kwrd">private</span> <span class="kwrd">static</span> XmlDocument AddXsiNameSpace(Stream inputStream)
{
<span class="rem">// Create a new NameTable</span>
NameTable nTable = <span class="kwrd">new</span> NameTable();
<span class="rem">// Create a namespace manager</span>
XmlNamespaceManager xmlnsManager = <span class="kwrd">new</span> XmlNamespaceManager(nTable);
<span class="rem">// Add the xsi namespace</span>
xmlnsManager.AddNamespace(<span class="str">"xsi"</span>,
<span class="str">"http://www.w3.org/2001/XMLSchema-instance"</span>);
<span class="rem">// Used to parse the XML message</span>
XmlParserContext context = <span class="kwrd">new</span> XmlParserContext(<span class="kwrd">null</span>, xmlnsManager,
<span class="kwrd"> null</span>, XmlSpace.None);
<span class="rem">// Create new SML reader settings</span>
XmlReaderSettings settings = <span class="kwrd">new</span> XmlReaderSettings();
<span class="rem">// Create a new XML reader that reads the XML message that was provided
</span><span class="rem">// </span><span class="rem">and adds the xsi namespace</span>
XmlReader reader = XmlReader.Create(inputStream, settings, context);
<span class="rem">// Create a new XML document that will hold the new XML message</span>
XmlDocument xmldocument = <span class="kwrd">new</span> XmlDocument();
<span class="rem">// Load the message into the document</span>
xmldocument.Load(reader);
<span class="rem">// Return the XMLDocument with the new XML message</span>
<span class="kwrd">return</span> xmldocument;
}</pre>
</td>
</tr>
</tbody></table>
</div>Eldert Grootenboerhttp://www.blogger.com/profile/11821643198024753393noreply@blogger.com0tag:blogger.com,1999:blog-6146076618722841418.post-38197068066768393912012-03-05T09:22:00.000-08:002012-03-07T06:35:42.984-08:00BizTalk 2009 Archive Incoming MessagesAt one of our customers we want to be able to archive all messages that come in to BizTalk 2009. I created a pipeline component that does this, where archiving can be turned on or off from the BizTalk Administrator Console. Here is the code to do this.
<br />
<div style="height: 400px; overflow: auto; width: 625px;">
<table cellpadding="0" cellspacing="0" style="width: 250px;">
<tbody>
<tr>
<td><style type="text/css">
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: Consolas, "Courier New", Courier, Monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #a31515; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
<br />
<pre class="csharpcode"><span class="kwrd">using</span> System;
<span class="kwrd">using</span> System.IO;
<span class="kwrd">using</span> System.Text;
<span class="kwrd">using</span> System.ComponentModel;
<span class="kwrd">using</span> Microsoft.BizTalk.Component.Interop;
<span class="kwrd">using</span> Microsoft.BizTalk.Message.Interop;
<span class="kwrd">namespace</span> Company.BizTalk.PipelineComponents
{
<span class="rem">/// <summary></span>
<span class="rem">/// Archive an incoming message.</span>
<span class="rem">/// </summary></span>
[ComponentCategory(CategoryTypes.CATID_PipelineComponent)]
[System.Runtime.InteropServices.Guid(<span class="str">"CFBF459C-01FC-49B8-903B-2DE65A000FF6"</span>)]
[ComponentCategory(CategoryTypes.CATID_Decoder)]
<span class="kwrd">public</span> <span class="kwrd">class</span> ArchivingComponentIncoming :
Microsoft.BizTalk.Component.Interop.IComponent, IBaseComponent,
IPersistPropertyBag, IComponentUI
{
<span class="preproc">#region</span> Properties
<span class="rem">/// <summary></span>
<span class="rem">/// Boolean indicating if we want to archive the messages coming through this </span>
<span class="rem">/// pipeline.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">private</span> <span class="kwrd">bool</span> _doArchiving;
<span class="rem">/// <summary></span>
<span class="rem">/// Boolean indicating if we want to archive the messages coming through this </span>
<span class="rem">/// pipeline.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> <span class="kwrd">bool</span> DoArchiving
{
<span class="kwrd">get</span>
{
<span class="kwrd">return</span> _doArchiving;
}
<span class="kwrd">set</span>
{
_doArchiving = value;
}
}
<span class="rem">/// <summary></span>
<span class="rem">/// Location where we want to archive the messages.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">private</span> <span class="kwrd">string</span> _archivePath;
<span class="rem">/// <summary></span>
<span class="rem">/// Location where we want to archive the messages.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> <span class="kwrd">string</span> ArchivePath
{
<span class="kwrd">get</span>
{
<span class="kwrd">return</span> _archivePath;
}
<span class="kwrd">set</span>
{
_archivePath = value;
}
}
<span class="preproc">#endregion</span>
<span class="preproc">#region</span> IBaseComponent members
<span class="rem">/// <summary></span>
<span class="rem">/// Name of the component</span>
<span class="rem">/// </summary></span>
[Browsable(<span class="kwrd">false</span>)]
<span class="kwrd">public</span> <span class="kwrd">string</span> Name
{
<span class="kwrd">get</span>
{
<span class="kwrd">return</span> <span class="str">"ArchivingComponentIncoming"</span>;
}
}
<span class="rem">/// <summary></span>
<span class="rem">/// Version of the component</span>
<span class="rem">/// </summary></span>
[Browsable(<span class="kwrd">false</span>)]
<span class="kwrd">public</span> <span class="kwrd">string</span> Version
{
<span class="kwrd">get</span>
{
<span class="kwrd">return</span> <span class="str">"1.0.0.0"</span>;
}
}
<span class="rem">/// <summary></span>
<span class="rem">/// Description of the component</span>
<span class="rem">/// </summary></span>
[Browsable(<span class="kwrd">false</span>)]
<span class="kwrd">public</span> <span class="kwrd">string</span> Description
{
<span class="kwrd">get</span>
{
<span class="kwrd">return</span> <span class="str">"Component used to archive incoming messages."</span>;
}
}
<span class="preproc">#endregion</span>
<span class="preproc">#region</span> IPersistPropertyBag members
<span class="rem">/// <summary></span>
<span class="rem">/// Gets class ID of component for usage from unmanaged code.</span>
<span class="rem">/// </summary></span>
<span class="rem">/// <param name="classid"></span>
<span class="rem">/// Class ID of the component</span>
<span class="rem">/// </param></span>
<span class="kwrd">public</span> <span class="kwrd">void</span> GetClassID(<span class="kwrd">out</span> System.Guid classid)
{
classid = <span class="kwrd">new</span> System.Guid(<span class="str">"CFBF459C-01FC-49B8-903B-2DE65A000FF6"</span>);
}
<span class="rem">/// <summary></span>
<span class="rem">/// Not needed.</span>
<span class="rem">/// </summary></span>
<span class="kwrd">public</span> <span class="kwrd">void</span> InitNew()
{
}
<span class="rem">/// <summary></span>
<span class="rem">/// Loads configuration properties for the component.</span>
<span class="rem">/// </summary></span>
<span class="rem">/// <param name="pb">Configuration property bag.</param></span>
<span class="rem">/// <param name="errlog">Error status.</param></span>
<span class="kwrd">public</span> <span class="kwrd">virtual</span> <span class="kwrd">void</span> Load(Microsoft.BizTalk.Component.Interop.IPropertyBag pb,
<span class="kwrd">int</span> errlog)
{
<span class="kwrd">object</span> val = <span class="kwrd">null</span>;
<span class="rem">// Get configuration property for indication if we want to archive</span>
val = <span class="kwrd">this</span>.ReadPropertyBag(pb, <span class="str">"DoArchiving"</span>);
<span class="kwrd">if</span> (val != <span class="kwrd">null</span>)
{
<span class="kwrd">this</span>._doArchiving = ((<span class="kwrd">bool</span>)(val));
}
<span class="rem">// Get configuration property for path where we want to archive</span>
val = <span class="kwrd">this</span>.ReadPropertyBag(pb, <span class="str">"ArchivePath"</span>);
<span class="kwrd">if</span> (val != <span class="kwrd">null</span>)
{
<span class="kwrd">this</span>._archivePath = ((<span class="kwrd">string</span>)(val));
}
}
<span class="rem">/// <summary></span>
<span class="rem">/// Saves the current component configuration into the property bag.</span>
<span class="rem">/// </summary></span>
<span class="rem">/// <param name="pb">Configuration property bag.</param></span>
<span class="rem">/// <param name="fClearDirty">Not used.</param></span>
<span class="rem">/// <param name="fSaveAllProperties">Not used.</param></span>
<span class="kwrd">public</span> <span class="kwrd">virtual</span> <span class="kwrd">void</span> Save(Microsoft.BizTalk.Component.Interop.IPropertyBag pb,
<span class="kwrd">bool</span> fClearDirty, <span class="kwrd">bool</span> fSaveAllProperties)
{
<span class="kwrd">this</span>.WritePropertyBag(pb, <span class="str">"DoArchiving"</span>, <span class="kwrd">this</span>.DoArchiving);
<span class="kwrd">this</span>.WritePropertyBag(pb, <span class="str">"ArchivePath"</span>, <span class="kwrd">this</span>.ArchivePath);
}
<span class="preproc">#region</span> utility functionality
<span class="rem">/// <summary></span>
<span class="rem">/// Reads property value from property bag.</span>
<span class="rem">/// </summary></span>
<span class="rem">/// <param name="pb">Property bag.</param></span>
<span class="rem">/// <param name="propName">Name of property.</param></span>
<span class="rem">/// <returns>Value of the property.</returns></span>
<span class="kwrd">private</span> <span class="kwrd">object</span> ReadPropertyBag(
Microsoft.BizTalk.Component.Interop.IPropertyBag pb, <span class="kwrd">string</span> propName)
{
<span class="kwrd">object</span> val = <span class="kwrd">null</span>;
<span class="kwrd">try</span>
{
pb.Read(propName, <span class="kwrd">out</span> val, 0);
}
<span class="kwrd">catch</span> (System.ArgumentException)
{
<span class="kwrd">return</span> val;
}
<span class="kwrd">catch</span> (System.Exception e)
{
<span class="kwrd">throw</span> <span class="kwrd">new</span> System.ApplicationException(e.Message);
}
<span class="kwrd">return</span> val;
}
<span class="rem">/// <summary></span>
<span class="rem">/// Writes property values into a property bag.</span>
<span class="rem">/// </summary></span>
<span class="rem">/// <param name="pb">Property bag.</param></span>
<span class="rem">/// <param name="propName">Name of property.</param></span>
<span class="rem">/// <param name="val">Value of property.</param></span>
<span class="kwrd">private</span> <span class="kwrd">void</span> WritePropertyBag(
Microsoft.BizTalk.Component.Interop.IPropertyBag pb, <span class="kwrd">string</span> propName,
<span class="kwrd">object</span> val)
{
<span class="kwrd">try</span>
{
pb.Write(propName, <span class="kwrd">ref</span> val);
}
<span class="kwrd">catch</span> (System.Exception e)
{
<span class="kwrd">throw</span> <span class="kwrd">new</span> System.ApplicationException(e.Message);
}
}
<span class="preproc">#endregion</span>
<span class="preproc">#endregion</span>
<span class="preproc">#region</span> IComponentUI members
<span class="rem">/// <summary></span>
<span class="rem">/// Component icon to use in BizTalk Editor.</span>
<span class="rem">/// </summary></span>
[Browsable(<span class="kwrd">false</span>)]
<span class="kwrd">public</span> IntPtr Icon
{
<span class="kwrd">get</span>
{
<span class="kwrd">return</span> IntPtr.Zero;
}
}
<span class="rem">/// <summary></span>
<span class="rem">/// The Validate method is called by the BizTalk Editor during the build of </span>
<span class="rem">/// a BizTalk project.</span>
<span class="rem">/// </summary></span>
<span class="rem">/// <param name="obj">An Object containing the configuration properties.</span>
<span class="rem">/// </param></span>
<span class="rem">/// <returns>The IEnumerator enables the caller to enumerate through a </span>
<span class="rem">/// collection of strings containing error messages. </span>
<span class="rem">/// These error messages appear as compiler error messages. </span>
<span class="rem">/// To report successful property validation, the method should return </span>
<span class="rem">/// an empty enumerator.</returns></span>
<span class="kwrd">public</span> System.Collections.IEnumerator Validate(<span class="kwrd">object</span> obj)
{
<span class="kwrd">return</span> <span class="kwrd">null</span>;
}
<span class="preproc">#endregion</span>
<span class="preproc">#region</span> IComponent members
<span class="rem">/// <summary></span>
<span class="rem">/// Implements IComponent.Execute method.</span>
<span class="rem">/// </summary></span>
<span class="rem">/// <param name="pc">Pipeline context.</param></span>
<span class="rem">/// <param name="inmsg">Input message.</param></span>
<span class="rem">/// <returns>Original input message.</returns></span>
<span class="rem">/// <remarks></span>
<span class="rem">/// IComponent.Execute method is used to initiate the processing of the </span>
<span class="rem">/// message in this pipeline component.</span>
<span class="rem">/// </remarks></span>
<span class="kwrd">public</span> Microsoft.BizTalk.Message.Interop.IBaseMessage Execute(
Microsoft.BizTalk.Component.Interop.IPipelineContext pc,
Microsoft.BizTalk.Message.Interop.IBaseMessage inmsg)
{
<span class="rem">// Check if we want to archive the message</span>
<span class="kwrd">if</span> (_doArchiving)
{
<span class="rem">// Get the message that was received</span>
IBaseMessage passedMessage = inmsg;
<span class="rem">// The name under which we want to archive the message</span>
<span class="kwrd">string</span> archiveFileName = <span class="kwrd">null</span>;
<span class="rem">// Get the interchange id from the message</span>
<span class="kwrd">string</span> interchangeID = (<span class="kwrd">string</span>)passedMessage.Context.Read(
<span class="str">"InterchangeID"</span>,
<span class="str">"http://schemas.microsoft.com/BizTalk/2003/system-properties"</span>);
<span class="rem">// If the transport type if file or ftp, get the incoming filename </span>
<span class="rem">// to use as part of the archive filename (for easier identification)</span>
<span class="kwrd">string</span> filePath = <span class="kwrd">null</span>;
<span class="rem">// Get the type of adapter that was used for receiving the file</span>
<span class="kwrd">string</span> adapterType = (<span class="kwrd">string</span>)passedMessage.Context.Read(
<span class="str">"InboundTransportType"</span>,
<span class="str">"http://schemas.microsoft.com/BizTalk/2003/system-properties"</span>);
<span class="rem">// Check if we received over a file adapter</span>
<span class="kwrd">if</span> (adapterType == <span class="str">"FILE"</span>)
{
filePath = (<span class="kwrd">string</span>)passedMessage.Context.Read(<span class="str">"ReceivedFileName"</span>,
<span class="str">"http://schemas.microsoft.com/BizTalk/2003/file-properties"</span>);
}
<span class="rem">// Check if we received over a ftp adapter</span>
<span class="kwrd">else</span> <span class="kwrd">if</span> (adapterType == <span class="str">"FTP"</span>)
{
filePath = (<span class="kwrd">string</span>)passedMessage.Context.Read(<span class="str">"ReceivedFileName"</span>,
<span class="str">"http://schemas.microsoft.com/BizTalk/2003/ftp-properties"</span>);
}
<span class="rem">// Set the name under which we want to archive the message</span>
archiveFileName = interchangeID + <span class="str">".out"</span>;
<span class="rem">// Check if filePath was set</span>
<span class="kwrd">if</span> (filePath != <span class="kwrd">null</span>)
{
<span class="rem">// We ran into problems where the pipeline could not be executed,</span>
<span class="rem">// and the file just kept being archived</span>
<span class="rem">// To make sure this does not happen, we decided to never </span>
<span class="rem">// archive the same message more then 100 times (still allowing </span>
<span class="rem">// for multiple tests with the same message)</span>
<span class="kwrd">if</span> (Directory.GetFiles(<span class="kwrd">this</span>._archivePath, String.Format(<span class="str">"{0}*"</span>,
Path.GetFileName(filePath))).Length > 100)
{
<span class="kwrd">goto</span> Finished;
}
<span class="rem">// If filepath was set, add the incoming file name to the file </span>
<span class="rem">// name under which we want to archive</span>
archiveFileName = String.Format(<span class="str">"{0}_{1}"</span>,
Path.GetFileName(filePath), archiveFileName);
}
<span class="rem">// Write the archive file</span>
WriteToFile(passedMessage, Path.Combine(<span class="kwrd">this</span>._archivePath,
archiveFileName));
}
Finished:
<span class="rem">// Continue processing the message</span>
<span class="kwrd">return</span> inmsg;
}
<span class="rem">/// <summary></span>
<span class="rem">/// This method is used to copy the contents from a memory stream to a</span>
<span class="rem">/// filestream, saving the contents to a file.</span>
<span class="rem">/// </summary></span>
<span class="rem">/// <param name="input">The memory stream.</param></span>
<span class="rem">/// <param name="output">The file stream.</param></span>
<span class="kwrd">protected</span> <span class="kwrd">void</span> CopyStream(Stream input, Stream output)
{
<span class="rem">// Set the buffer size for reading the stream</span>
<span class="kwrd">int</span> BUFFER_SIZE = 4096;
<span class="rem">// Create a buffer</span>
<span class="kwrd">byte</span>[] buffer = <span class="kwrd">new</span> <span class="kwrd">byte</span>[BUFFER_SIZE];
<span class="rem">// Integer indicating how many bytes we have read</span>
<span class="kwrd">int</span> bytesRead;
<span class="kwrd">try</span>
{
<span class="rem">// Read from the input stream</span>
bytesRead = input.Read(buffer, 0, BUFFER_SIZE);
<span class="rem">// Read all the bytes in the input stream</span>
while (bytesRead > 0)
{
<span class="rem">// Write the contents to the output stream</span>
output.Write(buffer, 0, bytesRead);
<span class="rem">// Go to the next byte</span>
bytesRead = input.Read(buffer, 0, BUFFER_SIZE);
}
}
<span class="kwrd">catch</span> (Exception ex)
{
<span class="kwrd">throw</span> ex;
}
<span class="kwrd">finally</span>
{
<span class="rem">// Rewind input stream</span>
<span class="kwrd">if</span> (input.CanSeek)
{
input.Position = 0;
}
}
}
<span class="rem">/// <summary></span>
<span class="rem">/// Write the contents of the message to an archive file.</span>
<span class="rem">/// </summary></span>
<span class="rem">/// <param name="message">The message that should be archived.</param></span>
<span class="rem">/// <param name="fileName">The filename for the archive message.</param></span>
<span class="kwrd">protected</span> <span class="kwrd">void</span> WriteToFile(IBaseMessage message, <span class="kwrd">string</span> fileName)
{
<span class="rem">// Get the body of the message</span>
Stream msgStream = message.BodyPart.GetOriginalDataStream();
<span class="rem">// Create a new file stream</span>
FileStream fileStream = <span class="kwrd">null</span>;
<span class="kwrd">try</span>
{
<span class="rem">// Open the archive file for writing</span>
fileStream = <span class="kwrd">new</span> FileStream(fileName, FileMode.OpenOrCreate);
<span class="rem">// Copy the data from the message to the archive file</span>
<span class="kwrd">this</span>.CopyStream(msgStream, fileStream);
}
<span class="kwrd">catch</span> (Exception ex)
{
<span class="kwrd">throw</span> ex;
}
<span class="kwrd">finally</span>
{
<span class="rem">// Close the file stream</span>
<span class="kwrd">if</span> (fileStream != <span class="kwrd">null</span>)
{
fileStream.Close();
}
<span class="rem">// Close the message</span>
<span class="kwrd">if</span> (msgStream.CanSeek)
{
msgStream.Position = 0;
}
}
}
<span class="preproc">#endregion</span>
}
}</pre>
</td>
</tr>
</tbody></table>
</div>Eldert Grootenboerhttp://www.blogger.com/profile/11821643198024753393noreply@blogger.com0tag:blogger.com,1999:blog-6146076618722841418.post-29908819076542933522012-03-05T08:37:00.000-08:002012-03-06T06:48:11.251-08:00IntroductionWelcome to my blog. First, let me introduce myself. My name is Eldert Grootenboer, I live in the Netherlands, and I work as a BizTalk developer at a large IT consultancy company.<br />
I have set this blog up to have a single point of reference for solutions for the problems I find in my daily work, and hopefully others will find these posts helpful as well. These solutions can be either things I come up with myself, things I learn from my collegues or things I have found on the internet (and often a combination of these).<br />
If you have any questions, don't hesitate to contact me.Eldert Grootenboerhttp://www.blogger.com/profile/11821643198024753393noreply@blogger.com0