<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Come Get Some...Thoughts On Software Technology</title><link>http://blogs.msdn.com/b/astrauss/</link><description>Alexander Strauss goes Blog</description><dc:language>en</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>IE 9 pinned mode and else demo page</title><link>http://blogs.msdn.com/b/astrauss/archive/2011/03/04/ie-9-pinned-mode-and-else-demo-page.aspx</link><pubDate>Fri, 04 Mar 2011 11:53:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10136882</guid><dc:creator>Alex Strauss</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/astrauss/rsscomments.aspx?WeblogPostID=10136882</wfw:commentRss><comments>http://blogs.msdn.com/b/astrauss/archive/2011/03/04/ie-9-pinned-mode-and-else-demo-page.aspx#comments</comments><description>&lt;p&gt;Short revival of my blog with sharing a site I created to play a bit with the new taskbar features of Internet Explorer 9. After I realized that the site actually shows a good overview of most of the features described on the &lt;a href="http://msdn.microsoft.com/en-us/library/gg131029(v=vs.85).aspx" target="_blank"&gt;MSDN pinned site documentation&lt;/a&gt; with working samples I thought this might also be of interest to some other people. In addition it shows a bit about geo location (Thanks to &lt;a href="http://blogs.msdn.com/b/dparys/" target="_blank"&gt;Dariusz&lt;/a&gt; for his sample) and the new performance/navigation timing api which is currently being specified by a newly formed &lt;a href="http://www.w3.org/2010/06/webperf.html" target="_blank"&gt;W3C Working Group&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Please remember however that most of the buttons only do what they are supposed to do when the site is actually in site mode (but you get informed about that anyway). &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-87-metablogapi/2335.wlEmoticon_2D00_smile_5F00_7F368B71.png" /&gt;&lt;/p&gt;  &lt;p&gt;So have fun with it! &lt;a href="http://www.level70.de/ie9demos/IE9Demos.html" target="_blank"&gt;http://www.level70.de/ie9demos/IE9Demos.html&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="Site Mode Demo Site" href="http://www.level70.de/ie9demos/IE9Demos.html" target="_blank"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Site Mode Demos" border="0" alt="Site Mode Sample Site" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-87-metablogapi/6545.sms_5F00_3E943F02.jpg" width="543" height="424" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The site was created by using the brand new web development tool from Microsoft called &lt;a href="http://www.microsoft.com/web/webmatrix/" target="_blank"&gt;Web Matrix&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a style="text-decoration: none" title="Bookmark to: Digg" onclick="window.open(&amp;#39;http://digg.com/submit?phase=2&amp;amp;url=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;bodytext=&amp;amp;tags=&amp;amp;title=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://digg.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Digg" border="0" name="Digg" alt="Bookmark Digg" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0FwVnXcQI/AAAAAAAABf8/8t8jUbCOQN0/s200/digg.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Del.icio.us" onclick="window.open(&amp;#39;http://del.icio.us/post?v=2&amp;amp;url=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;notes=&amp;amp;tags=&amp;amp;title=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://del.icio.us/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Delicious" border="0" name="Delicious" alt="Bookmark Del.icio.us" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0FmrXO-vI/AAAAAAAABf0/gK0oKdOJzMM/s200/delicious.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Facebook" onclick="window.open(&amp;#39;http://www.facebook.com/sharer.php?u=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;t=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://www.facebook.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Facebook" border="0" name="Facebook" alt="Bookmark Facebook" src="http://1.bp.blogspot.com/_vLeiVavkV_M/Sn0F1uQ7P_I/AAAAAAAABgE/zESf9tLZOtw/s200/facebook.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Reddit" onclick="window.open(&amp;#39;http://reddit.com/submit?url=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;title=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://reddit.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Reddit" border="0" name="Reddit" alt="Bookmark Reddit" src="http://3.bp.blogspot.com/_vLeiVavkV_M/Sn0GDJUzotI/AAAAAAAABgU/qAA0KjdLgF8/s200/reddit.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: StumbleUpon" onclick="window.open(&amp;#39;http://www.stumbleupon.com/submit?url=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;title=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://www.stumbleupon.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="StumbleUpon" border="0" name="StumbleUpon" alt="Bookmark StumbleUpon" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0GJ5NxMRI/AAAAAAAABgc/zaraJzCuyXI/s200/stumbleupon.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Yahoo" onclick="window.open(&amp;#39;http://myweb2.search.yahoo.com/myresults/bookmarklet?t=&amp;#39;+encodeURIComponent(document.title)+&amp;#39;&amp;amp;d=&amp;amp;tag=&amp;amp;u=&amp;#39;+encodeURIComponent(location.href));return false;" href="http://www.yahoo.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Yahoo" border="0" name="Yahoo" alt="Bookmark Yahoo" src="http://2.bp.blogspot.com/_vLeiVavkV_M/Sn0GdCPWuUI/AAAAAAAABg0/-tjcrdMnRkA/s200/yahoo.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Google" onclick="window.open(&amp;#39;http://www.google.com/bookmarks/mark?op=add&amp;amp;bkmk=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;annotation=&amp;amp;labels=&amp;amp;title=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://www.google.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Google" border="0" name="Google" alt="Bookmark Google" src="http://3.bp.blogspot.com/_vLeiVavkV_M/Sn0F7200sZI/AAAAAAAABgM/ivmXOn18EZA/s200/google.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Technorati" onclick="window.open(&amp;#39;http://technorati.com/faves?add=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;tag=&amp;#39;);return false;" href="http://www.technorati.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Technorati" border="0" name="Technorati" alt="Bookmark Technorati" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0GRQk71JI/AAAAAAAABgk/AT5wC4ZYB8g/s200/technorati.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Twitter" onclick=" window.open(&amp;#39;http://twitter.com/home?status=&amp;#39;+encodeURIComponent(document.title)+&amp;#39;%20&amp;#39;+encodeURIComponent(location.href)); return false;" href="http://twitter.com/" rel="nofollow" target="_Blank"&gt;&lt;img style="padding-bottom: 1px" id="Twitter" border="0" name="Twitter" alt="Bookmark Twitter" src="http://2.bp.blogspot.com/_vLeiVavkV_M/Sn0GYqWEWAI/AAAAAAAABgs/8715Vd67VtA/s200/twitter.png" /&gt; &lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10136882" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/IE+9/">IE 9</category><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/HTML5/">HTML5</category><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/Web+Matrix/">Web Matrix</category></item><item><title>Do Enterprises Need An Independent Browser Strategy?</title><link>http://blogs.msdn.com/b/astrauss/archive/2010/05/25/do-enterprises-need-an-independent-browser-strategy.aspx</link><pubDate>Tue, 25 May 2010 06:57:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10014363</guid><dc:creator>Alex Strauss</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/astrauss/rsscomments.aspx?WeblogPostID=10014363</wfw:commentRss><comments>http://blogs.msdn.com/b/astrauss/archive/2010/05/25/do-enterprises-need-an-independent-browser-strategy.aspx#comments</comments><description>&lt;p&gt;Microsoft Australia is currently driving a &lt;a href="http://www.microsoft.com/australia/technet/ie8milk/" target="_blank"&gt;campaign&lt;/a&gt; where using Internet Explorer 6 is compared to drinking 9 year old milk. The by far biggest share of IE6 still used is in large enterprises. There are certainly many reasons why this is the case but in my opinion most of those reasons in one or another way are a direct result of specific circumstance which is&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;That Enterprises as well as small and medium businesses for the largest part do not have a browser strategy.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;At least none that is independent from their client OS strategy. And the reason why most companies do not have an independent strategy is because Internet Explorer was shipped with Windows since &lt;a href="http://en.wikipedia.org/wiki/Internet_Explorer_4" target="_blank"&gt;Windows 98 with Internet Explorer 4&lt;/a&gt; which is more than 12 years ago which again is centuries in IT terms. In addition, the importance of the browser as a productivity tool increased during those years with exponential rise over the last 5 or 6 years. Because of those circumstances many companies probably didn’t feel the urge to implement such an independent strategy. But because of not treating the browser as an independent part of the operating system most companies are still relying on Internet Explorer 6 which is already nine years old. In those 9 years however there were three different evolutionary streams. The first to name is the trend to implement more and more business applications as web applications which led to a huge amount of web applications within companies. And those were often optimized for the currently used browser (IE6). The second stream was the evolution of web technologies and web standards. The third stream was the growing number of attacks through web sites and also the growing numbers of attacking techniques including &lt;a href="http://en.wikipedia.org/wiki/Social_engineering_(security)" target="_blank"&gt;social engineering attacks&lt;/a&gt;. All three streams were heavily influenced and driven by the growing popularity and the rise of the web. So if you take this into account you could say that with the increase of the duration of usage of a specific browser version the ability to adapt and migrate decreases. This correlation is shown in the diagram below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-87-metablogapi/0336.Browser_5F00_Strategy_5F00_Final_5F00_5FEC18F3.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Decrease of browser migratability over time" border="0" alt="Decrease of browser migratability over time" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-87-metablogapi/7128.Browser_5F00_Strategy_5F00_Final_5F00_thumb_5F00_4BF2865D.png" width="560" height="362" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Critics now may say that this is all the fault of Microsoft because Microsoft is shipping IE together with Windows and Microsoft shipped IE6 flawed and forced the creation of web applications that introduced dependencies to those flaws. However those are reasons to from owns own complacency and indifference about treating the browser as an important productivity tool which needs to be treated like other mission critical applications or technologies in an enterprise. If Companies would have spent the browser the attention it deserved then there would have been plenty of opportunity to avoid the current situation because even Microsoft released two new browser versions which introduced great improvements in many browser relevant areas like &lt;strong&gt;security&lt;/strong&gt;, &lt;strong&gt;standards&lt;/strong&gt;, &lt;strong&gt;productivity features&lt;/strong&gt; and &lt;strong&gt;performance&lt;/strong&gt; compared to IE6. Those were released as stand-alone installers as well as part of Windows Vista or Windows 7. My theory is that they were simply neglected by enterprises because of a lacking independent browser strategy and omission. Although it seems like it I don’t want to scare anyone here because to be honest I think that the picture one my draw from the above would be way to negative because the ability to migrate will never be impossible and the efforts related to migration may be less than one would expect. I will elaborate about what I mean by that further down in this post. &lt;/p&gt;  &lt;p&gt;Bottom line however is that the trends outlined above are some indicators that the browser is one of the most important tools in today's enterprise application landscape. This is not only my personal opinion but is also expressed by many respectable institutions and individuals. Forrester analyst Sheri McLeish for example said:&lt;/p&gt;  &lt;p&gt;“&lt;a href="http://www.cio.in/article/importance-browser-based-collaboration-tools-enterprise-application" target="_blank"&gt;Enterprises need to think about the browser as a productivity tool, not as a transparent application. They need to look at browsers more strategically.&lt;/a&gt;”&lt;/p&gt;  &lt;p&gt;Another example is a citation of Andy Armagost, Birmingham Gas &amp;amp; Oil who said:&lt;/p&gt;  &lt;p&gt;“&lt;a href="http://www.cio.in/article/importance-browser-based-collaboration-tools-enterprise-application" target="_blank"&gt;The browser is one of the most important pieces of software we have right now&lt;/a&gt;”&lt;/p&gt;  &lt;p&gt;And last but not least with ongoing increase of web applications, web services and especially now slowly starting move to cloud based services, the browser may become the single most important piece of software in the future. Which is a hypothesis that is also backed by Sheri McLeish:&lt;/p&gt;  &lt;p&gt;“&lt;font color="#0000ff"&gt;That IE6 is by far the most widely used browser among enterprises reflects most IT departments’ lack of interest in browsers. However, this laissez-faire approach toward browsers wouldn’t last long, he said. “The rise of software-as-a-service [SaaS] will force enterprises to at least come up with a browser strategy for their workforce&lt;/font&gt;”&lt;/p&gt;  &lt;p&gt;With that all said it becomes obvious that - &lt;strong&gt;&lt;u&gt;the time to act is now&lt;/u&gt;&lt;/strong&gt; – it is time to do essentially two things:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;&lt;em&gt;Start realizing the importance of the browser for the own company and define a independent strategy for it &lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;&lt;em&gt;Start migrating to a current version of preferably Internet Explorer as it is still the best choice for deployment in corporate environments&lt;/em&gt;&lt;/strong&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I did not number these two tasks on purpose as they are probably almost equally important and because it is recommended to start doing both in parallel. As for the migration part still many companies, even those that may already have some kind of browser strategy discussion, are still in fear about the efforts and try to avoid the migration part. So I will try to give some, hopefully helpful, information on how one can get started, what else, apart from the above are the benefits of migration and about some determining factors relevant in the migration context.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;&lt;u&gt;&lt;em&gt;Compatibility            &lt;br /&gt;&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;      &lt;br /&gt;I will not reiterate what has been said many times about compatibility and its various facets with respect to Internet Explorer 8. Although it is super important there are enough sources, including this blog, where you can find information about it. As a starting point you can go to my &lt;a href="http://blogs.msdn.com/astrauss/archive/2008/10/22/attaining-ie8-site-compatibility-short-reference.aspx" target="_blank"&gt;respective article&lt;/a&gt; or the &lt;a href="http://msdn.microsoft.com/en-us/ie/cc405106.aspx" target="_blank"&gt;compatibility center on MSDN&lt;/a&gt;. Here however I want to point out that there are different kinds of compatibility of which some are important to reflect about when planning a migration process and its accompanying decisions and some that may be less or maybe even useless when deciding about what’s important to solve one’s personal or corporate compatibility question:       &lt;br /&gt;      &lt;ol&gt;       &lt;li&gt;&lt;strong&gt;Backward Compatibility or “Stand in for your heritage”&lt;/strong&gt;           &lt;br /&gt;          &lt;br /&gt;Especially with an Internet Explorer focus I would define backwards compatibility as “&lt;em&gt;&lt;font color="#ff8040"&gt;&lt;strong&gt;Enabling correct functional execution and visualization of web applications created for previous versions of Internet Explorer and web standards&lt;/strong&gt;&lt;/font&gt;&lt;/em&gt;”. Especially because of the fact that most companies are still sitting on back level browsers this is extremely important. And because this is so important Internet Explorer in particular lives up to the promise to provide a great deal of backwards compatibility by shipping with two rendering engines and compatibility modes. While probably still not the 100% solution to the compatibility questions it is a great relief for companies preparing for migration as this reliefs them from really touching applications and make real changes to the application assets (markup, styles and code)           &lt;br /&gt;&lt;/li&gt;        &lt;li&gt;&lt;strong&gt;Forward Compatibility            &lt;br /&gt;            &lt;br /&gt;&lt;/strong&gt;I would define forward compatibility as “&lt;strong&gt;&lt;font color="#ff8040"&gt;The Support of evolution of the web by endorsing and supporting current and upcoming specifications and actively participate in the definition of those standards&lt;/font&gt;&lt;/strong&gt;”. Now this one is a bit tricky as we all don’t own a crystal orb to look trough into the future. However alone by the statements and the involved actions one can get at least some ideas about how friction free and smooth future migrations will become. Supportive for a positive perception with respect to forward compatibility I would count active participating in the standardization bodies, recommending new standards, early adoption of not yet settled standards, providing guidance on usage of standards, etc.           &lt;br /&gt;&lt;/li&gt;        &lt;li&gt;&lt;strong&gt;Artificial Compatibility            &lt;br /&gt;            &lt;br /&gt;&lt;/strong&gt;Artificial compatibility or a compatibility that has been created and made popular as an benchmark thus creating a de-facto requirement of passing taking the benchmark in order to gain a positive perception. The problem with such an compatibility understanding is that they sometimes are not very helpful in or simply useless when taking the compatibility debate. One good example is the &lt;strong&gt;current&lt;/strong&gt; ACID 3 test. There are many people out there thinking that the browser passing the test to 100% is the most standards compliant browser but this is not really the case as it only tests a subset of standards and it tests it upon the author’s interpretation of the specifications. And that there is much room for interpretation shows a simple &lt;a href="http://www.computerworld.com/s/article/9128096/Web_standards_on_the_edge?taxonomyId=141" target="_blank"&gt;example&lt;/a&gt; made by Ian Hickson, who is one of the editors of the &lt;a href="http://dev.w3.org/html5/spec/" target="_blank"&gt;HTML 5&lt;/a&gt; specs at the &lt;a href="http://www.w3c.org" target="_blank"&gt;W3C&lt;/a&gt; and maintainer of the Acid 3 test suite.           &lt;br /&gt;&lt;em&gt;           &lt;br /&gt;“HTML 4 has an input element, which has a type=&amp;quot;&amp;quot; attribute, which takes values like &amp;quot;text&amp;quot; and &amp;quot;checkbox.&amp;quot; What should happen when you have an HTML input element with type=&amp;quot;text&amp;quot; in a document is reasonably well defined: You display a text field. &lt;/em&gt;          &lt;p&gt;&lt;em&gt;What should happen with input type=&amp;quot;checkbox&amp;quot; is relatively well defined. However, with script, you can take the type=&amp;quot;text&amp;quot; attribute, and change its value dynamically, while the user is editing the control, so that it is type=&amp;quot;checkbox.&amp;quot; This is not a common thing to do, and the HTML 4 and DOM2 HTML specs are completely silent on what should happen when this case is hit. &lt;/em&gt;&lt;/p&gt;          &lt;p&gt;&lt;em&gt;The result is that different browsers do different things; IE will throw an exception, if I recall correctly, while Firefox will change the text field to a checkbox”              &lt;br /&gt;              &lt;br /&gt;&lt;/em&gt;There are other indications and statements that are quite a bit reserved to pay to much attention to those tests which I will spare here. For those interested just check out &lt;a href="http://www.webstandards.org/action/acid3/" target="_blank"&gt;this&lt;/a&gt; or &lt;a href="http://shaver.off.net/diary/2008/03/27/the-missed-opportunity-of-acid-3/" target="_blank"&gt;that&lt;/a&gt;. To sum it up I want to point out that I don’t say that tests such as Acid 3 are generally a bad thing but I think that just striving for the goal to pass a certain test and even optimize a product just to hit that target is a non goal and doesn’t help the web community in deciding which are the real important attributes are to solve the compatibility questions.&lt;/p&gt;       &lt;/li&gt;     &lt;/ol&gt;   &lt;/li&gt;    &lt;li&gt;&lt;em&gt;&lt;strong&gt;&lt;u&gt;Some common misconceptions&lt;/u&gt;&lt;/strong&gt;&lt;/em&gt;       &lt;br /&gt;      &lt;ol&gt;       &lt;li&gt;&lt;strong&gt;Micro-Benchmark results are the key criteria to make browser choice decisions&lt;/strong&gt;           &lt;br /&gt;          &lt;br /&gt;Micro-Benchmarks are without a doubt very popular at the moment. Especially those measuring JavaScript performance like the &lt;a href="http://v8.googlecode.com/svn/data/benchmarks/v5/run.html" target="_blank"&gt;V8 Benchmark&lt;/a&gt;, &lt;a href="http://www2.webkit.org/perf/sunspider-0.9/sunspider.html" target="_blank"&gt;Sunspider&lt;/a&gt;, &lt;a href="http://dromaeo.com/" target="_blank"&gt;Dromaeo&lt;/a&gt; or &lt;a href="http://service.futuremark.com/peacekeeper/index.action" target="_blank"&gt;Peacekeeper&lt;/a&gt; are extremely popular nowadays. The only problem with them is that they are measuring only one tiny aspect of the whole browsing experience and therefore may be not sufficient to make an impartial browser decision. An attitude by the way that I’m not alone with. Jim Rapoza, Chief Technology Analyst at eWeek for example &lt;a href="http://etech.eweek.com/content/web_technology/fastest_browser_fight_is_pointless.html" target="_blank"&gt;said&lt;/a&gt;:           &lt;p&gt;“&lt;em&gt;Face it, right now all browsers are more than fast enough. And if you're running into slow performance on the Web, you should probably check about 100 other things (ISP performance, site problems, etc.) before you start wondering about browser speed.              &lt;br /&gt;So why is every single browser maker spending so much time and resources trying to gain the mantle of fastest Web browser? I think it's because performance is the only non-subjective criteria that they can hang their hat on&lt;/em&gt;”             &lt;br /&gt;            &lt;br /&gt;Don’t get me wrong, Micro-Benchmark are important and give a good insight about the current state of a browsers script or rendering engines especially with more and more applications making heavy use of JavaScript however they shouldn’t be the only criteria to base one’s browser decisions on. I mean even we at Microsoft now are riding this horse with the latest announcements about the rework of the JavaScript engine in Internet Explorer IE9 and the performance shown already in the current &lt;a href="http://ie.microsoft.com/testdrive/" target="_blank"&gt;technology previews of IE9&lt;/a&gt;. But still there is the belief that there is a superset of of criteria that need to be taken into account when thinking about browsers and the usage of web applications.&lt;/p&gt;       &lt;/li&gt;        &lt;li&gt;Specifications leave no room for interpretations          &lt;br /&gt;          &lt;br /&gt;I already gave an example about this further up in the compatibility section so here’s some more about that. A international standardization process is a complex beast. There are many parties involved (which is basically a good thing) but the more parties the more opinions and discussions. This is the reason that it takes a long time before standards are finally released and their specifications are complete and signed-off. So sometimes you need to rely and base your work (e.g. a browser) on unfinished specifications which may be unclear in certain aspects or may change over time. Think about CSS. There is still &lt;a href="http://www.w3.org/TR/CSS21/" target="_blank"&gt;no final specification for CSS 2.1&lt;/a&gt; available. And probably not only because of this Derek Featherstone, Group Lead Web Standards Project comes to the conclusion that:           &lt;br /&gt;          &lt;br /&gt;”&lt;em&gt;&lt;a href="http://www.computerworld.com.au/article/277813/web_standards_edge/?pp=2&amp;amp;fpid=611908207" target="_blank"&gt;We don't even have a perfect implementation of CSS 2.1 yet&lt;/a&gt;”             &lt;br /&gt;            &lt;br /&gt;&lt;/em&gt;So its easy to say that one or the other browser is not implementing the specs correctly but with some insight it becomes obvious that there is not the one correct way and it is difficult for a browser provider to hit a moving target (unsettled specs).           &lt;br /&gt;&lt;/li&gt;        &lt;li&gt;Browser migration is different from other application migrations          &lt;br /&gt;          &lt;br /&gt;To be honest I have no real clue about were this misconception comes from but I know it is all around. In many cases I hear or feel a lack of comprehension about browser migration and the related efforts to assess the applications if they are still working as designed. However I think this is something that is quite common in today’s IT environments. Think about migrations of JDK’s, Application Server upgrades or Windows Client upgrades not to speak of upgrade of a large SAP installation. Those don’t come without migration efforts either and they are huge in many cases. Of course IT responsible complain about those efforts as well but there still is an acceptance or an understanding that this is something that needs to be done. In the context of browser there is a total lack of such an acceptance and often this then leads to not migrating at all up to the time where there is no other chance anymore. However not only the efforts necessary will increase over time as I already pointed out but also those company will miss some great opportunity as we will see in the next section.           &lt;br /&gt;&lt;/li&gt;     &lt;/ol&gt;   &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;&lt;em&gt;&lt;u&gt;Application classification&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;       &lt;br /&gt;      &lt;br /&gt;Let’s get a away from the philosophic and sometimes religious questions and get a bit more practical. If you plan a migration you are probably think about the right process or which are the right tasks. One important task within the process is to do some kind of application classification. As this also can give great insight into what the overall migration efforts actually will be it should happen very early in the process. Of course there are many different ways to classify applications and there may also be quite some company specific, internal classification factors. Nevertheless I will try to give a generic views on how to classify and estimate the efforts. Base for this classification is the source of the application or in other words the producer and how much it has been customized. As seen in the following figure the complexity and efforts of a migration increases with the customization level in combination with the sources moving from internal to external.       &lt;br /&gt;      &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-87-metablogapi/7624.app_5F00_classification_5F00_0A0BA10F.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Application Classification" border="0" alt="Application Classification" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-87-metablogapi/0777.app_5F00_classification_5F00_thumb_5F00_18F2D029.png" width="500" height="364" /&gt;&lt;/a&gt;       &lt;br /&gt;      &lt;br /&gt;Important to note is that this not only considers technical factors but also includes organizational and feasibility factors. For example an application from an external source may be harder to migrate because the VAR/VAP or ISV may not even exist anymore. This is especially important for application including binary components such as ActiveX controls. On the other hand if a web application is based on an ISV product that has not been customized the effort may be near to nothing because the ISV already has official support for current browsers.       &lt;br /&gt;After doing this classification there is then the chance to prioritize which applications to migrate first and which can be eliminated completely. So a quadrant model for this prioritization could look like the one I depict in the following figure.&amp;#160; &lt;br /&gt;      &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-87-metablogapi/5670.Priority_5F00_Quadrants_5F00_724443DB.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Priority Quadrants for Migration" border="0" alt="Priority Quadrants for Migration" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-87-metablogapi/3835.Priority_5F00_Quadrants_5F00_thumb_5F00_6908089A.png" width="380" height="314" /&gt;&lt;/a&gt;       &lt;br /&gt;The most important take away from this in my opinion is that you shouldn’t look at browser migration in the context of cost only but also in the context of opportunity to create a comprehensive web application inventory which many enterprises still lack today, streamline the web application landscape and increase value and productivity through innovation by using new features and standards not available or supported with older browsers.       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;&lt;em&gt;&lt;u&gt;Migration Guidance &amp;amp; generic process&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;       &lt;br /&gt;      &lt;br /&gt;So now I can get to the final guidance and outline a generic process for a browser migration. As it is quite generic and of course doesn’t touch any specifics of a certain vertical or even individual enterprise it looks quite simple but yet it is a good starting point to refine it and adapt it to the individual company.       &lt;br /&gt;      &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-87-metablogapi/3022.Mig_5F00_Process_5F00_67573CC6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Generic browser migration process" border="0" alt="Generic browser migration process" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-87-metablogapi/1616.Mig_5F00_Process_5F00_thumb_5F00_6BED4780.png" width="740" height="550" /&gt;&lt;/a&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;A lot of text now simply to explain why I think that companies should &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;treat the browser as a mission critical application &lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;define an independent strategy for it &lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;realize that its time to migrate to a current browser &lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;start migrating to Internet Explorer 8 today as it is probably still the best choice for enterprise IT-Environments because of its&lt;/strong&gt;       &lt;ul&gt;       &lt;li&gt;Standards compliance &lt;/li&gt;        &lt;li&gt;Compatibility features &lt;/li&gt;        &lt;li&gt;Deployment options (&lt;a href="http://technet.microsoft.com/en-us/ie/bb219517.aspx" target="_blank"&gt;IEAK&lt;/a&gt;, &lt;a href="http://edge.technet.com/Media/Slipstreaming-Internet-Explorer-8-into-Windows-Vista/" target="_blank"&gt;Slipstreaming&lt;/a&gt;, &lt;a href="http://technet.microsoft.com/en-us/wsus/default.aspx" target="_blank"&gt;WSUS&lt;/a&gt;, &lt;a href="http://www.microsoft.com/windowsserver2008/en/us/ad-main.aspx" target="_blank"&gt;AD&lt;/a&gt;, &lt;a href="http://www.microsoft.com/systemcenter/en/us/configuration-manager.aspx" target="_blank"&gt;SCCM&lt;/a&gt;) &lt;/li&gt;        &lt;li&gt;Group Policy customizability &lt;/li&gt;        &lt;li&gt;Unique security features (protected mode, domain model, etc.) &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;So hopefully I created some awareness and the thoughts I tried to express about this, certainly very complex, topic was understandable, a bit helpful and created a sense of urgency to &lt;strong&gt;&lt;font size="3"&gt;ACT NOW&lt;/font&gt;&lt;/strong&gt; then I reached my goal for this post. And finally the answer to the question if enterprises need an independent browser strategy is definitely “YES”.&lt;/p&gt;  &lt;p&gt;As always feel free to comment and start a discussion.&lt;/p&gt;  &lt;p&gt;&lt;a style="text-decoration: none" title="Bookmark to: Digg" onclick="window.open(&amp;#39;http://digg.com/submit?phase=2&amp;amp;url=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;bodytext=&amp;amp;tags=&amp;amp;title=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://digg.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Digg" border="0" name="Digg" alt="Bookmark Digg" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0FwVnXcQI/AAAAAAAABf8/8t8jUbCOQN0/s200/digg.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Del.icio.us" onclick="window.open(&amp;#39;http://del.icio.us/post?v=2&amp;amp;url=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;notes=&amp;amp;tags=&amp;amp;title=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://del.icio.us/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Delicious" border="0" name="Delicious" alt="Bookmark Del.icio.us" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0FmrXO-vI/AAAAAAAABf0/gK0oKdOJzMM/s200/delicious.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Facebook" onclick="window.open(&amp;#39;http://www.facebook.com/sharer.php?u=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;t=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://www.facebook.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Facebook" border="0" name="Facebook" alt="Bookmark Facebook" src="http://1.bp.blogspot.com/_vLeiVavkV_M/Sn0F1uQ7P_I/AAAAAAAABgE/zESf9tLZOtw/s200/facebook.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Reddit" onclick="window.open(&amp;#39;http://reddit.com/submit?url=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;title=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://reddit.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Reddit" border="0" name="Reddit" alt="Bookmark Reddit" src="http://3.bp.blogspot.com/_vLeiVavkV_M/Sn0GDJUzotI/AAAAAAAABgU/qAA0KjdLgF8/s200/reddit.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: StumbleUpon" onclick="window.open(&amp;#39;http://www.stumbleupon.com/submit?url=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;title=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://www.stumbleupon.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="StumbleUpon" border="0" name="StumbleUpon" alt="Bookmark StumbleUpon" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0GJ5NxMRI/AAAAAAAABgc/zaraJzCuyXI/s200/stumbleupon.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Yahoo" onclick="window.open(&amp;#39;http://myweb2.search.yahoo.com/myresults/bookmarklet?t=&amp;#39;+encodeURIComponent(document.title)+&amp;#39;&amp;amp;d=&amp;amp;tag=&amp;amp;u=&amp;#39;+encodeURIComponent(location.href));return false;" href="http://www.yahoo.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Yahoo" border="0" name="Yahoo" alt="Bookmark Yahoo" src="http://2.bp.blogspot.com/_vLeiVavkV_M/Sn0GdCPWuUI/AAAAAAAABg0/-tjcrdMnRkA/s200/yahoo.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Google" onclick="window.open(&amp;#39;http://www.google.com/bookmarks/mark?op=add&amp;amp;bkmk=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;annotation=&amp;amp;labels=&amp;amp;title=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://www.google.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Google" border="0" name="Google" alt="Bookmark Google" src="http://3.bp.blogspot.com/_vLeiVavkV_M/Sn0F7200sZI/AAAAAAAABgM/ivmXOn18EZA/s200/google.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Technorati" onclick="window.open(&amp;#39;http://technorati.com/faves?add=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;tag=&amp;#39;);return false;" href="http://www.technorati.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Technorati" border="0" name="Technorati" alt="Bookmark Technorati" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0GRQk71JI/AAAAAAAABgk/AT5wC4ZYB8g/s200/technorati.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Twitter" onclick=" window.open(&amp;#39;http://twitter.com/home?status=&amp;#39;+encodeURIComponent(document.title)+&amp;#39;%20&amp;#39;+encodeURIComponent(location.href)); return false;" href="http://twitter.com/" rel="nofollow" target="_Blank"&gt;&lt;img style="padding-bottom: 1px" id="Twitter" border="0" name="Twitter" alt="Bookmark Twitter" src="http://2.bp.blogspot.com/_vLeiVavkV_M/Sn0GYqWEWAI/AAAAAAAABgs/8715Vd67VtA/s200/twitter.png" /&gt; &lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10014363" width="1" height="1"&gt;</description></item><item><title>A Few IE8 Tips for Developers And IT-Professionals</title><link>http://blogs.msdn.com/b/astrauss/archive/2010/05/25/a-few-ie8-tips-for-developers-and-it-professionals.aspx</link><pubDate>Tue, 25 May 2010 06:55:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10014360</guid><dc:creator>Alex Strauss</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/astrauss/rsscomments.aspx?WeblogPostID=10014360</wfw:commentRss><comments>http://blogs.msdn.com/b/astrauss/archive/2010/05/25/a-few-ie8-tips-for-developers-and-it-professionals.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;Use the WebSlice title for dynamic user related content&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The only information of a WebSlice that is visible while normal usage of the browser is the caption of the button in the favorites pane. This caption is provided by an HTML portion which is annotated with the keyword &lt;a href="http://msdn.microsoft.com/en-us/library/cc304073(VS.85).aspx#_basic" target="_blank"&gt;&lt;font face="Courier New"&gt;&lt;em&gt;entry-title&lt;/em&gt;&lt;/font&gt;&lt;/a&gt;&amp;#160; in the WebSlice's &lt;a href="http://msdn.microsoft.com/en-us/library/cc196992(VS.85).aspx#_altupdate" target="_blank"&gt;update source&lt;/a&gt;. So this is a valuable piece of information present all time in the Internet Explorer Chrome. So it is recommended to use it more wisely than to only display static text. So rather update the title with meaningful information. One good example could be to display the current points balance of a loyalty program.&lt;/p&gt;  &lt;p&gt;Simply add a dynamic &amp;lt;span&amp;gt;-Element which may even be hidden to a personalized web page template, mark this dynamic piece as the &lt;a href="http://msdn.microsoft.com/en-us/library/cc304073(VS.85).aspx#_basic" target="_blank"&gt;&lt;font face="Courier New"&gt;&lt;em&gt;entry-title&lt;/em&gt;&lt;/font&gt;&lt;/a&gt; and your done. It doesn’t matter if this is the main webpage of the respective provider or a specially created one as alternative display source for the web slice. Whenever the account balance changes this data is then automatically promoted into this page dynamically. With the next update check of IE the current balance is then shown in the caption of the WebSlice button in bold letters.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-87-metablogapi/5545.dyn_5F00_title_5F00_content_5F00_7E0EB0AF.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="dyn_title_content" border="0" alt="dyn_title_content" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-87-metablogapi/8206.dyn_5F00_title_5F00_content_5F00_thumb_5F00_20EF7260.jpg" width="284" height="47" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;WebSlice Tracking&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Usage tracking of WebSlices is actually quite easy however there is a thing to remember. Internet Explorer checks for new WebSlice content in certain intervals. This interval is either defined by the WebSlice provider in the WebSlice content using the &lt;a href="http://msdn.microsoft.com/en-us/library/cc196992(VS.85).aspx#_upds" target="_blank"&gt;ttl-property&lt;/a&gt; or the user trough the WebSlice properties dialog or it defaults to 24 hours. Now when this interval passes the Internet Explorer 8 sends a request to the &lt;a href="http://msdn.microsoft.com/en-us/library/cc196992(VS.85).aspx#_altupdate" target="_blank"&gt;update source&lt;/a&gt; of the WebSlice through the &lt;a href="http://msdn.microsoft.com/en-us/library/ms686418(VS.85).aspx" target="_blank"&gt;Windows RSS Platform&lt;/a&gt; subsystem. This means that in the case of update checks for WebSlices is not Internet Explorer and thus also the user-agent string differs from the one for regular IE website requests. The user-agent string for those requests is:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font face="Courier New"&gt;User-Agent: Windows-RSS-Platform/2.0 (MSIE 8.0; Windows NT 6.1)&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;So you could use this user-agent string for tracking WebSlice usage however you need to know that simply checking for updates doesn’t imply really that the content is also recognized by the user. If you want to have real usage tracking you probably should use the commonly used website tracking scripts or tracking pixels methods and integrate them into the entry-content portion of your WebSlice and in addition if you have the possibility to alter the Headers of your HTTP-Response you should disable client side caching. If you implement it like that and know the update frequency you can easily calculate the real usage of the slice.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;font color="#ff8000"&gt;All Requests – Update checks in analyzing timeframe = Real usage/Real WebSlice impressions&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Even better would be to include all that in an alternative display source. This will give you the right usage numbers instantly as the display source is not requested when Internet Explorer checks for updated content. So this alternative content is only requested (and this time by IE with the original IE8 user-agent string) when the user clicks on the WebSlice button and opens the fly out.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Text fields in Accelerator Previews and WebSlice display sources&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;As you may already know you can use an accelerator preview window and and WebSlice fly out to display rich and/or interactive content. So you can for example use &lt;a href="http://blogs.msdn.com/astrauss/archive/2008/08/28/ie8-beta2-the-ria-slice.aspx" target="_blank"&gt;Silverlight based applications&lt;/a&gt; to deliver great user experiences through those IE features and increase value and stickiness of your content. There is however at least one area where the WebSlice fly out behaves differently from the accelerator preview window and this is the use of text fields or textboxes. While you can use those as usual in WebSlices you shouldn’t in accelerator previews as the keyboard inputs are captured by the context menu where you chose the accelerator from and are not forwarded to the accelerator preview and thus the user is unable to type text into the text field. This behavior is technology agnostic and will occur in plain HTML as well as in Silverlight or Flash applications. So it needs a little bit of intelligent information design for accelerators to allow a user to provide feedback via meaningful and clickable elements (e.g. instead of letting the user type a location let him choose from a list or make some guesses based on the present context).&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Keyboard input is possible in WebSlices" border="0" alt="Keyboard input is possible in WebSlices" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-87-metablogapi/8206.keyb_5F00_slice_5F00_thumb_5F00_7B857EF1.jpg" width="240" height="216" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-87-metablogapi/7723.keyb_5F00_acc_5F00_412A0910.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Keyboard input not possible in Accelerator previews" border="0" alt="Keyboard input not possible in Accelerator previews" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-87-metablogapi/7723.keyb_5F00_acc_5F00_thumb_5F00_50E99E14.jpg" width="340" height="182" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Identifying IE8 when compatibility mode is active&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;It is already commonly known that Internet Explorer 8 ships with two rendering engines and allows website owners and users to enable a &lt;a href="http://blogs.msdn.com/astrauss/archive/2008/10/22/attaining-ie8-site-compatibility-short-reference.aspx" target="_blank"&gt;compatibility mode&lt;/a&gt;. So Internet Explorer 8 can be forced to behave like an Internet Explorer 7 by switching to the IE7 browser mode. As this needs to be a complete back level switch IE8 then also identifies as IE7 in its user-agent string. This is also true for querying the Window.navigator.appName, Window.navigator.appVersion and Window.navigator.userAgent properties using JavaScript. So if you rely on correctly identifying IE8 although the browser is currently operating in compatibility mode (for example you want to offer a customized IE8 download to users using older browsers) you need to change your identifying code a little bit and query the Document.&lt;a href="http://msdn.microsoft.com/en-us/library/cc196988%28v=VS.85%29.aspx"&gt;documentMode&lt;/a&gt; Property which is only available in Internet Explorer 8 (and probably in IE9). This will report the current document mode the browser is currently operating in if the user uses Internet Explorer 8 and is also available when the browser is in a back level browser mode.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-87-metablogapi/7723.clip_5F00_image001_5F00_019CA5C0.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="DocumentMode Property in IE8" border="0" alt="DocumentMode Property in IE8" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-87-metablogapi/4118.clip_5F00_image001_5F00_thumb_5F00_47412FDE.jpg" width="240" height="207" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If the user however really uses a older version of IE or no IE at all the property is not available and the browser should return a “undefined” as result of your query for this object and you can handle the result accordingly.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-87-metablogapi/8712.clip_5F00_image00110_5F00_3AD30CB5.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="DocumentMode property in IE7" border="0" alt="DocumentMode property in IE7" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-87-metablogapi/0714.clip_5F00_image00110_5F00_thumb_5F00_7D62A82D.jpg" width="240" height="184" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a style="text-decoration: none" title="Bookmark to: Digg" onclick="window.open(&amp;#39;http://digg.com/submit?phase=2&amp;amp;url=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;bodytext=&amp;amp;tags=&amp;amp;title=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://digg.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Digg" border="0" name="Digg" alt="Bookmark Digg" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0FwVnXcQI/AAAAAAAABf8/8t8jUbCOQN0/s200/digg.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Del.icio.us" onclick="window.open(&amp;#39;http://del.icio.us/post?v=2&amp;amp;url=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;notes=&amp;amp;tags=&amp;amp;title=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://del.icio.us/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Delicious" border="0" name="Delicious" alt="Bookmark Del.icio.us" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0FmrXO-vI/AAAAAAAABf0/gK0oKdOJzMM/s200/delicious.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Facebook" onclick="window.open(&amp;#39;http://www.facebook.com/sharer.php?u=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;t=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://www.facebook.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Facebook" border="0" name="Facebook" alt="Bookmark Facebook" src="http://1.bp.blogspot.com/_vLeiVavkV_M/Sn0F1uQ7P_I/AAAAAAAABgE/zESf9tLZOtw/s200/facebook.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Reddit" onclick="window.open(&amp;#39;http://reddit.com/submit?url=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;title=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://reddit.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Reddit" border="0" name="Reddit" alt="Bookmark Reddit" src="http://3.bp.blogspot.com/_vLeiVavkV_M/Sn0GDJUzotI/AAAAAAAABgU/qAA0KjdLgF8/s200/reddit.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: StumbleUpon" onclick="window.open(&amp;#39;http://www.stumbleupon.com/submit?url=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;title=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://www.stumbleupon.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="StumbleUpon" border="0" name="StumbleUpon" alt="Bookmark StumbleUpon" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0GJ5NxMRI/AAAAAAAABgc/zaraJzCuyXI/s200/stumbleupon.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Yahoo" onclick="window.open(&amp;#39;http://myweb2.search.yahoo.com/myresults/bookmarklet?t=&amp;#39;+encodeURIComponent(document.title)+&amp;#39;&amp;amp;d=&amp;amp;tag=&amp;amp;u=&amp;#39;+encodeURIComponent(location.href));return false;" href="http://www.yahoo.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Yahoo" border="0" name="Yahoo" alt="Bookmark Yahoo" src="http://2.bp.blogspot.com/_vLeiVavkV_M/Sn0GdCPWuUI/AAAAAAAABg0/-tjcrdMnRkA/s200/yahoo.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Google" onclick="window.open(&amp;#39;http://www.google.com/bookmarks/mark?op=add&amp;amp;bkmk=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;annotation=&amp;amp;labels=&amp;amp;title=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://www.google.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Google" border="0" name="Google" alt="Bookmark Google" src="http://3.bp.blogspot.com/_vLeiVavkV_M/Sn0F7200sZI/AAAAAAAABgM/ivmXOn18EZA/s200/google.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Technorati" onclick="window.open(&amp;#39;http://technorati.com/faves?add=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;tag=&amp;#39;);return false;" href="http://www.technorati.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Technorati" border="0" name="Technorati" alt="Bookmark Technorati" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0GRQk71JI/AAAAAAAABgk/AT5wC4ZYB8g/s200/technorati.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Twitter" onclick=" window.open(&amp;#39;http://twitter.com/home?status=&amp;#39;+encodeURIComponent(document.title)+&amp;#39;%20&amp;#39;+encodeURIComponent(location.href)); return false;" href="http://twitter.com/" rel="nofollow" target="_Blank"&gt;&lt;img style="padding-bottom: 1px" id="Twitter" border="0" name="Twitter" alt="Bookmark Twitter" src="http://2.bp.blogspot.com/_vLeiVavkV_M/Sn0GYqWEWAI/AAAAAAAABgs/8715Vd67VtA/s200/twitter.png" /&gt; &lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10014360" width="1" height="1"&gt;</description></item><item><title>Application Partitioning with MEF, Silverlight and Windows Azure – Part II</title><link>http://blogs.msdn.com/b/astrauss/archive/2010/04/28/application-partitioning-with-mef-silverlight-and-windows-azure-part-ii.aspx</link><pubDate>Wed, 28 Apr 2010 11:44:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10003830</guid><dc:creator>Alex Strauss</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/astrauss/rsscomments.aspx?WeblogPostID=10003830</wfw:commentRss><comments>http://blogs.msdn.com/b/astrauss/archive/2010/04/28/application-partitioning-with-mef-silverlight-and-windows-azure-part-ii.aspx#comments</comments><description>&lt;P&gt;Welcome back to the partitioned blog post about application partitioning with Silverlight MEF and Windows Azure. In this second and last post I will talk about how you can retrieve the information about the deployed parts of the application and retrieve the actual XAP files from the Azure Blob Storage.&lt;/P&gt;
&lt;P&gt;Still we only have one Silverlight project where we added just one interface as the contract for the import and lazy initialization and an attribute class to flag our parts in the Silverlight projects to come as user controls to be exported as parts of the application meeting the specified contract.&lt;/P&gt;
&lt;P&gt;Now we can extend the class corresponding to our shell to handle the imports of those attributed parts. This is also straight forward and follows the standard MEF procedures.&lt;/P&gt;
&lt;P&gt;First thing to do would be to define a property attributed with the &lt;A href="http://msdn.microsoft.com/en-us/library/system.componentmodel.composition.importmanyattribute(v=VS.100).aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/system.componentmodel.composition.importmanyattribute(v=VS.100).aspx"&gt;&lt;EM&gt;&lt;FONT face="Courier New"&gt;ImportMany&lt;/FONT&gt;&lt;/EM&gt;&lt;/A&gt; attribute to tell MEF that it should populate this property with all (not just one) exports meeting the requirements of the importing application. This requirement is actually the contract I were talking about before.&lt;/P&gt;
&lt;DIV id=codeSnippetWrapper&gt;
&lt;DIV style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px" id=codeSnippet&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;[ImportMany(AllowRecomposition = &lt;SPAN style="COLOR: #0000ff"&gt;true&lt;/SPAN&gt;)]&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;public&lt;/SPAN&gt; IEnumerable&amp;lt;Lazy&amp;lt;UserControl, IPartAttributes&amp;gt;&amp;gt; Parts { get; set; }&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;/DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Important to note is the &lt;A href="http://msdn.microsoft.com/en-us/library/system.componentmodel.composition.importmanyattribute.allowrecomposition(v=VS.100).aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/system.componentmodel.composition.importmanyattribute.allowrecomposition(v=VS.100).aspx"&gt;&lt;FONT face="Courier New"&gt;&lt;EM&gt;AllowRecomposition&lt;/EM&gt;&lt;/FONT&gt;&lt;/A&gt; property for the &lt;FONT face="Courier New"&gt;&lt;EM&gt;ImportMany&lt;/EM&gt;&lt;/FONT&gt; attribute which tells &lt;FONT face="Courier New"&gt;&lt;EM&gt;CompositionContainer&lt;/EM&gt;&lt;/FONT&gt; to repopulate (recompose) when exports change. Now that we have this we still need to tell MEF to actually populate this property and this is as easy as calling the &lt;FONT color=#333333 face="Courier New"&gt;&lt;EM&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/system.componentmodel.composition.compositioninitializer_members(v=VS.95).aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/system.componentmodel.composition.compositioninitializer_members(v=VS.95).aspx"&gt;SatisfyImports&lt;/A&gt;&lt;/EM&gt;&lt;/FONT&gt; method on the of &lt;FONT color=#333333 face="Courier New"&gt;&lt;EM&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/system.componentmodel.composition.compositioninitializer(v=VS.95).aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/system.componentmodel.composition.compositioninitializer(v=VS.95).aspx"&gt;CompositionInitializer&lt;/A&gt;&lt;/EM&gt;&lt;/FONT&gt; class. For real world projects you should however be aware of the limitations of &lt;FONT face="Courier New"&gt;&lt;EM&gt;CompositionInitializer&lt;/EM&gt;&lt;/FONT&gt;.&lt;/P&gt;
&lt;DIV id=codeSnippetWrapper&gt;
&lt;DIV style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px" id=codeSnippet&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;partial&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;class&lt;/SPAN&gt; MainPage : UserControl, IPartImportsSatisfiedNotification&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;{&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    &lt;SPAN style="COLOR: #0000ff"&gt;public&lt;/SPAN&gt; MainPage()&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    {&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        InitializeComponent();&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        CompositionInitializer.SatisfyImports(&lt;SPAN style="COLOR: #0000ff"&gt;this&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    }&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    .&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    .&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    .&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;}&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;/DIV&gt;&lt;/DIV&gt;
&lt;P&gt;In order to recognize when all imports have been finished (or satisfied) the class also implements an interface which lets MEF automatically call the &lt;FONT face="Courier New"&gt;&lt;EM&gt;OnImportsSatisfied&lt;/EM&gt;&lt;/FONT&gt; method when recomposition occurs. As a side note it would make sense to follow implement the &lt;A href="http://en.wikipedia.org/wiki/Model_View_ViewModel" target=_blank mce_href="http://en.wikipedia.org/wiki/Model_View_ViewModel"&gt;Model View ViewModel&lt;/A&gt; pattern for this application as well then you would factor out this code into a ViewModel class and mark that exportable and then again import it as a part into the main applications shell class printed above. How this can be done is described in a &lt;A href="http://blogs.msdn.com/gblock/archive/2010/03/08/building-hellomef-part-v-refactoring-to-viewmodel.aspx" target=_blank mce_href="http://blogs.msdn.com/gblock/archive/2010/03/08/building-hellomef-part-v-refactoring-to-viewmodel.aspx"&gt;blog post by Glen Block&lt;/A&gt;. Continuing with this sample however there is one last thing to do which is to filter and add the UserControls imported by MEF to the items collections of the respective &lt;FONT face="Courier New"&gt;&lt;EM&gt;ItemsControl&lt;/EM&gt;&lt;/FONT&gt;. That involves two steps actually:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Clear the items collections of the ItemsControls &lt;/LI&gt;
&lt;LI&gt;Filter and add the new imports &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Here’s the simplistic implementation for the shell areas in this sample application.&lt;/P&gt;
&lt;DIV id=codeSnippetWrapper&gt;
&lt;DIV style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px" id=codeSnippet&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;void&lt;/SPAN&gt; OnImportsSatisfied()&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;{&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    ClearShellItemControls();&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    PopulateShellAreas();&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;}&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;&amp;nbsp;&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;void&lt;/SPAN&gt; PopulateShellAreas()&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;{&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    var headerParts = Parts.Where(p =&amp;gt; p.Metadata.IsHeaderPart == &lt;SPAN style="COLOR: #0000ff"&gt;true&lt;/SPAN&gt;).Select(p =&amp;gt; p.Value);&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    &lt;SPAN style="COLOR: #0000ff"&gt;foreach&lt;/SPAN&gt; (var hPart &lt;SPAN style="COLOR: #0000ff"&gt;in&lt;/SPAN&gt; headerParts)&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    {&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        header.Items.Add(hPart);&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    }&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;&amp;nbsp;&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    var leftnavParts = Parts.Where(p =&amp;gt; p.Metadata.IsLeftNavPart == &lt;SPAN style="COLOR: #0000ff"&gt;true&lt;/SPAN&gt;).Select(p =&amp;gt; p.Value);&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    &lt;SPAN style="COLOR: #0000ff"&gt;foreach&lt;/SPAN&gt; (var lnPart &lt;SPAN style="COLOR: #0000ff"&gt;in&lt;/SPAN&gt; leftnavParts)&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    {&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        leftnav.Items.Add(lnPart);&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    }&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;&amp;nbsp;&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    var workbenchParts = Parts.Where(p =&amp;gt; p.Metadata.IsWorkbenchPart == &lt;SPAN style="COLOR: #0000ff"&gt;true&lt;/SPAN&gt;).Select(p =&amp;gt; p.Value);&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    &lt;SPAN style="COLOR: #0000ff"&gt;foreach&lt;/SPAN&gt; (var wbPart &lt;SPAN style="COLOR: #0000ff"&gt;in&lt;/SPAN&gt; workbenchParts)&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    {&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        workbench.Items.Add(wbPart);&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    }&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;&amp;nbsp;&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    var footerParts = Parts.Where(p =&amp;gt; p.Metadata.IsFooterPart == &lt;SPAN style="COLOR: #0000ff"&gt;true&lt;/SPAN&gt;).Select(p =&amp;gt; p.Value);&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    &lt;SPAN style="COLOR: #0000ff"&gt;foreach&lt;/SPAN&gt; (var fPart &lt;SPAN style="COLOR: #0000ff"&gt;in&lt;/SPAN&gt; footerParts)&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    {&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        footer.Items.Add(fPart);&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    }&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;}&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;&amp;nbsp;&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;void&lt;/SPAN&gt; ClearShellItemControls()&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;{&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    header.Items.Clear();&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    leftnav.Items.Clear();&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    workbench.Items.Clear();&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    footer.Items.Clear();&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;}&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;/DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Next thing to do now is the handle the means on how the application gets to know which XAPs to retrieve in order to import the parts into the container. As already pointed out we need to keep the information about which XAP files belong to the application and their storing location outside of the original Windows Azure deployment package (.cspkg). Because if we would keep it internally we would need to redeploy the package whenever the list of XAP files changes which is something what we don’t want to do.&lt;/P&gt;
&lt;P&gt;It would of course be possible to put this information into the configuration file of the cloud service which is exposed through the Windows Azure management portal or the &lt;A href="http://msdn.microsoft.com/en-us/library/ee460799(v=MSDN.10).aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/ee460799(v=MSDN.10).aspx"&gt;Management API&lt;/A&gt;. However this is does only really help for the task of changing the information about the application parts easily. It does however introduce some difficulties in retrieving those values from the Silverlight client which does not have any direct means to get to the configuration settings of the service. So we would need this information through some mechanics embedded into the hosting ASP.Net page or surface it through an respective web service. For simplicity I tool another approach and put a simple XML file also into the blob storage which I then can retrieve easily from my Silverlight application and I can also easily change and redeploy it by simply downloading, changing and uploading it again using my preferred tools. The file itself was already shown in &lt;A href="http://blogs.msdn.com/astrauss/archive/2010/04/27/application-partitioning-with-mef-silverlight-and-windows-azure-part-i.aspx" target=_blank mce_href="http://blogs.msdn.com/astrauss/archive/2010/04/27/application-partitioning-with-mef-silverlight-and-windows-azure-part-i.aspx"&gt;the previous post of this series&lt;/A&gt; so now I will focus on how to retrieve it which is absolutely straight forward by using a standard Silverlight WebClient class in the Application_Startup method of the main application to get the file.&lt;/P&gt;
&lt;DIV id=codeSnippetWrapper&gt;
&lt;DIV style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px" id=codeSnippet&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;void&lt;/SPAN&gt; Application_Startup(&lt;SPAN style="COLOR: #0000ff"&gt;object&lt;/SPAN&gt; sender, StartupEventArgs e)&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;{&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    WebClient wClient = &lt;SPAN style="COLOR: #0000ff"&gt;new&lt;/SPAN&gt; WebClient();&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    wClient.DownloadStringCompleted += &lt;SPAN style="COLOR: #0000ff"&gt;new&lt;/SPAN&gt; DownloadStringCompletedEventHandler(wClient_DownloadStringCompleted);&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    wClient.DownloadStringAsync(&lt;SPAN style="COLOR: #0000ff"&gt;new&lt;/SPAN&gt; Uri(&lt;SPAN style="COLOR: #006080"&gt;"http://&amp;lt;storageaccount&amp;gt;.blob.core.windows.net/mefparts/DeploymentCatalog.xml"&lt;/SPAN&gt;));&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    CompositionHost.Initialize(&lt;SPAN style="COLOR: #0000ff"&gt;new&lt;/SPAN&gt; DeploymentCatalog(), catalogs);&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    &lt;SPAN style="COLOR: #0000ff"&gt;this&lt;/SPAN&gt;.RootVisual = &lt;SPAN style="COLOR: #0000ff"&gt;new&lt;/SPAN&gt; MainPage();&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;}&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;/DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Then we can parse the file and for each part start an asynchronous download of the XAP files into an &lt;FONT color=#333333 face="Courier New"&gt;&lt;EM&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/system.componentmodel.composition.hosting.aggregatecatalog(v=VS.95).aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/system.componentmodel.composition.hosting.aggregatecatalog(v=VS.95).aspx"&gt;AggregateCatalog&lt;/A&gt;&lt;/EM&gt;&lt;/FONT&gt; which is the type of the &lt;FONT face="Courier New"&gt;&lt;EM&gt;catalogs&lt;/EM&gt;&lt;/FONT&gt; object in the code below.&lt;/P&gt;
&lt;DIV id=codeSnippetWrapper&gt;
&lt;DIV style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px" id=codeSnippet&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;void&lt;/SPAN&gt; wClient_DownloadStringCompleted(&lt;SPAN style="COLOR: #0000ff"&gt;object&lt;/SPAN&gt; sender, DownloadStringCompletedEventArgs e)&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;{&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    &lt;SPAN style="COLOR: #0000ff"&gt;if&lt;/SPAN&gt; (e.Error == &lt;SPAN style="COLOR: #0000ff"&gt;null&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    {&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        &lt;SPAN style="COLOR: #0000ff"&gt;string&lt;/SPAN&gt; deploymentCatalogDefinition = e.Result;&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        XDocument doc = XDocument.Parse(deploymentCatalogDefinition);&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        var v = doc.Descendants(&lt;SPAN style="COLOR: #006080"&gt;"PartFile"&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        &lt;SPAN style="COLOR: #0000ff"&gt;foreach&lt;/SPAN&gt; (XElement xe &lt;SPAN style="COLOR: #0000ff"&gt;in&lt;/SPAN&gt; v)&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        {&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;            catalogs.Catalogs.Add(CreateCatalog(xe.Attribute(&lt;SPAN style="COLOR: #006080"&gt;"name"&lt;/SPAN&gt;).Value));&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        }&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    }&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;}&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;&amp;nbsp;&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;private&lt;/SPAN&gt; DeploymentCatalog CreateCatalog(&lt;SPAN style="COLOR: #0000ff"&gt;string&lt;/SPAN&gt; partName)&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;{&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    Uri uri = &lt;SPAN style="COLOR: #0000ff"&gt;new&lt;/SPAN&gt; Uri(&lt;SPAN style="COLOR: #006080"&gt;"http://&amp;lt;storageaccount&amp;gt;.blob.core.windows.net/"&lt;/SPAN&gt; + partName);&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    var catalog = &lt;SPAN style="COLOR: #0000ff"&gt;new&lt;/SPAN&gt; DeploymentCatalog(uri);&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    catalog.DownloadCompleted += &lt;SPAN style="COLOR: #0000ff"&gt;new&lt;/SPAN&gt; EventHandler&amp;lt;System.ComponentModel.AsyncCompletedEventArgs&amp;gt;(catalog_DownloadCompleted);&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    catalog.DownloadAsync();&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    &lt;SPAN style="COLOR: #0000ff"&gt;return&lt;/SPAN&gt; catalog;&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;}&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;/DIV&gt;&lt;/DIV&gt;
&lt;P&gt;For this to work however there is one prerequisite to be met on the blob storage side and this is to allow public access for retrieving blobs from the container holding the XAP files and the DeploymentCatalog.xml file. This can of course be done with one of the various tools for managing the Azure Storage Service or if you created the container using the StorageClient class library you can create the container and set the permissions respectively. This also gives you two other advantages which are:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The Silverlight application does not need to carry the shared key of your storage account to retrieve blobs which would impose a security risk &lt;/LI&gt;
&lt;LI&gt;You do not need to create REST calls to the storage service including the authorization and other headers as there is no StorageClient library available for Silverlight &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;This completes main application and it’s now time to create the parts that comprise the meat of the current applications. For this sample there is actually not much more to do than:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;To add another Silverlight project to the solution. It is recommended to make sure that you uncheck the option to host the Silverlight application in the existing web project. It actually does no harm if it is added however it bloats the cloud service package with the XAPs which are not needed there. &lt;BR&gt;&lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/ApplicationPartitioningwithMEFSilverligh_833F/Sl_VS_Wizard_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/ApplicationPartitioningwithMEFSilverligh_833F/Sl_VS_Wizard_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="Silverlight Project Wizard in Visual Studio" border=0 alt="Silverlight Project Wizard in Visual Studio" src="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/ApplicationPartitioningwithMEFSilverligh_833F/Sl_VS_Wizard_thumb.jpg" width=324 height=279 mce_src="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/ApplicationPartitioningwithMEFSilverligh_833F/Sl_VS_Wizard_thumb.jpg"&gt;&lt;/A&gt; &lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Create the UI for the part &lt;BR&gt;
&lt;DIV id=codeSnippetWrapper&gt;
&lt;DIV style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px" id=codeSnippet&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;Border&lt;/SPAN&gt; &lt;SPAN style="COLOR: #ff0000"&gt;x:Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;="LayoutRoot"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #ff0000"&gt;Background&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;="LightBlue"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #ff0000"&gt;Height&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;="50"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #ff0000"&gt;VerticalAlignment&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;="Top"&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    &lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;TextBlock&lt;/SPAN&gt; &lt;SPAN style="COLOR: #ff0000"&gt;HorizontalAlignment&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;="Center"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #ff0000"&gt;VerticalAlignment&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;="Center"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #ff0000"&gt;Text&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;="Footer"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #ff0000"&gt;FontSize&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;="16"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #ff0000"&gt;FontWeight&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;="Bold"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;Border&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;And then add the MetadataAttribute and the contract interface to the project like it was done in the main application &lt;BR&gt;&lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/ApplicationPartitioningwithMEFSilverligh_833F/Meta_Interf_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/ApplicationPartitioningwithMEFSilverligh_833F/Meta_Interf_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=Meta_Interf border=0 alt=Meta_Interf src="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/ApplicationPartitioningwithMEFSilverligh_833F/Meta_Interf_thumb.jpg" width=230 height=187 mce_src="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/ApplicationPartitioningwithMEFSilverligh_833F/Meta_Interf_thumb.jpg"&gt;&lt;/A&gt; &lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Mark the UserControl exportable using the MetadataAttribute just added to the project &lt;BR&gt;&lt;BR&gt;
&lt;DIV id=codeSnippetWrapper&gt;
&lt;DIV style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px" id=codeSnippet&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;[ExportPart(IsFooterPart=&lt;SPAN style="COLOR: #0000ff"&gt;true&lt;/SPAN&gt;)]&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;partial&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;class&lt;/SPAN&gt; MainPage : UserControl&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;{&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    &lt;SPAN style="COLOR: #0000ff"&gt;public&lt;/SPAN&gt; MainPage()&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    {&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        InitializeComponent();&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    }&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;}&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is then usually repeated for all other parts of the application until all areas have a populating part located in an external XAP. For this sample the complete Solution structure looks lie this.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/ApplicationPartitioningwithMEFSilverligh_833F/solution_structure_s_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/ApplicationPartitioningwithMEFSilverligh_833F/solution_structure_s_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="Solution Structure in Visual Studio" border=0 alt="Solution Structure in Visual Studio" src="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/ApplicationPartitioningwithMEFSilverligh_833F/solution_structure_s_thumb.jpg" width=240 height=152 mce_src="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/ApplicationPartitioningwithMEFSilverligh_833F/solution_structure_s_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The main project (here “DynamicCloudRIA”) is deployed via the WebRole project (here “DynMefWebRole1”) as a standard cloud solution project and the XAPs of the other Silverlight projects can be uploaded to the respective container in the Windows Azure Blob Storage. For this sample the container contents look like shown below.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/ApplicationPartitioningwithMEFSilverligh_833F/blobstorage_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/ApplicationPartitioningwithMEFSilverligh_833F/blobstorage_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="Blob Container Contents" border=0 alt="Blob Container Contents" src="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/ApplicationPartitioningwithMEFSilverligh_833F/blobstorage_thumb.jpg" width=640 height=163 mce_src="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/ApplicationPartitioningwithMEFSilverligh_833F/blobstorage_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;After this has been done the application should already run and show the shell and the dynamically loaded application parts. Hopefully this helps to understand how MEF can help to create partitioned applications with loosely coupled application parts even when the application and its parts is deployed on a cloud platform such as Windows Azure. The source code for the sample is attached for download below.&lt;/P&gt;
&lt;P&gt;&lt;A style="TEXT-DECORATION: none" title="Bookmark to: Digg" onclick="window.open('http://digg.com/submit?phase=2&amp;amp;url='+encodeURIComponent(location.href)+'&amp;amp;bodytext=&amp;amp;tags=&amp;amp;title='+encodeURIComponent(document.title));return false;" href="http://digg.com/" rel=nofollow mce_href="http://digg.com/"&gt;&lt;IMG style="PADDING-BOTTOM: 1px" id=Digg border=0 name=Digg alt="Bookmark Digg" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0FwVnXcQI/AAAAAAAABf8/8t8jUbCOQN0/s200/digg.png" mce_src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0FwVnXcQI/AAAAAAAABf8/8t8jUbCOQN0/s200/digg.png"&gt; &lt;/A&gt;&lt;A style="TEXT-DECORATION: none" title="Bookmark to: Del.icio.us" onclick="window.open('http://del.icio.us/post?v=2&amp;amp;url='+encodeURIComponent(location.href)+'&amp;amp;notes=&amp;amp;tags=&amp;amp;title='+encodeURIComponent(document.title));return false;" href="http://del.icio.us/" rel=nofollow mce_href="http://del.icio.us/"&gt;&lt;IMG style="PADDING-BOTTOM: 1px" id=Delicious border=0 name=Delicious alt="Bookmark Del.icio.us" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0FmrXO-vI/AAAAAAAABf0/gK0oKdOJzMM/s200/delicious.png" mce_src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0FmrXO-vI/AAAAAAAABf0/gK0oKdOJzMM/s200/delicious.png"&gt; &lt;/A&gt;&lt;A style="TEXT-DECORATION: none" title="Bookmark to: Facebook" onclick="window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(location.href)+'&amp;amp;t='+encodeURIComponent(document.title));return false;" href="http://www.facebook.com/" rel=nofollow mce_href="http://www.facebook.com/"&gt;&lt;IMG style="PADDING-BOTTOM: 1px" id=Facebook border=0 name=Facebook alt="Bookmark Facebook" src="http://1.bp.blogspot.com/_vLeiVavkV_M/Sn0F1uQ7P_I/AAAAAAAABgE/zESf9tLZOtw/s200/facebook.png" mce_src="http://1.bp.blogspot.com/_vLeiVavkV_M/Sn0F1uQ7P_I/AAAAAAAABgE/zESf9tLZOtw/s200/facebook.png"&gt; &lt;/A&gt;&lt;A style="TEXT-DECORATION: none" title="Bookmark to: Reddit" onclick="window.open('http://reddit.com/submit?url='+encodeURIComponent(location.href)+'&amp;amp;title='+encodeURIComponent(document.title));return false;" href="http://reddit.com/" rel=nofollow mce_href="http://reddit.com/"&gt;&lt;IMG style="PADDING-BOTTOM: 1px" id=Reddit border=0 name=Reddit alt="Bookmark Reddit" src="http://3.bp.blogspot.com/_vLeiVavkV_M/Sn0GDJUzotI/AAAAAAAABgU/qAA0KjdLgF8/s200/reddit.png" mce_src="http://3.bp.blogspot.com/_vLeiVavkV_M/Sn0GDJUzotI/AAAAAAAABgU/qAA0KjdLgF8/s200/reddit.png"&gt; &lt;/A&gt;&lt;A style="TEXT-DECORATION: none" title="Bookmark to: StumbleUpon" onclick="window.open('http://www.stumbleupon.com/submit?url='+encodeURIComponent(location.href)+'&amp;amp;title='+encodeURIComponent(document.title));return false;" href="http://www.stumbleupon.com/" rel=nofollow mce_href="http://www.stumbleupon.com/"&gt;&lt;IMG style="PADDING-BOTTOM: 1px" id=StumbleUpon border=0 name=StumbleUpon alt="Bookmark StumbleUpon" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0GJ5NxMRI/AAAAAAAABgc/zaraJzCuyXI/s200/stumbleupon.png" mce_src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0GJ5NxMRI/AAAAAAAABgc/zaraJzCuyXI/s200/stumbleupon.png"&gt; &lt;/A&gt;&lt;A style="TEXT-DECORATION: none" title="Bookmark to: Yahoo" onclick="window.open('http://myweb2.search.yahoo.com/myresults/bookmarklet?t='+encodeURIComponent(document.title)+'&amp;amp;d=&amp;amp;tag=&amp;amp;u='+encodeURIComponent(location.href));return false;" href="http://www.yahoo.com/" rel=nofollow mce_href="http://www.yahoo.com/"&gt;&lt;IMG style="PADDING-BOTTOM: 1px" id=Yahoo border=0 name=Yahoo alt="Bookmark Yahoo" src="http://2.bp.blogspot.com/_vLeiVavkV_M/Sn0GdCPWuUI/AAAAAAAABg0/-tjcrdMnRkA/s200/yahoo.png" mce_src="http://2.bp.blogspot.com/_vLeiVavkV_M/Sn0GdCPWuUI/AAAAAAAABg0/-tjcrdMnRkA/s200/yahoo.png"&gt; &lt;/A&gt;&lt;A style="TEXT-DECORATION: none" title="Bookmark to: Google" onclick="window.open('http://www.google.com/bookmarks/mark?op=add&amp;amp;bkmk='+encodeURIComponent(location.href)+'&amp;amp;annotation=&amp;amp;labels=&amp;amp;title='+encodeURIComponent(document.title));return false;" href="http://www.google.com/" rel=nofollow mce_href="http://www.google.com/"&gt;&lt;IMG style="PADDING-BOTTOM: 1px" id=Google border=0 name=Google alt="Bookmark Google" src="http://3.bp.blogspot.com/_vLeiVavkV_M/Sn0F7200sZI/AAAAAAAABgM/ivmXOn18EZA/s200/google.png" mce_src="http://3.bp.blogspot.com/_vLeiVavkV_M/Sn0F7200sZI/AAAAAAAABgM/ivmXOn18EZA/s200/google.png"&gt; &lt;/A&gt;&lt;A style="TEXT-DECORATION: none" title="Bookmark to: Technorati" onclick="window.open('http://technorati.com/faves?add='+encodeURIComponent(location.href)+'&amp;amp;tag=');return false;" href="http://www.technorati.com/" rel=nofollow mce_href="http://www.technorati.com/"&gt;&lt;IMG style="PADDING-BOTTOM: 1px" id=Technorati border=0 name=Technorati alt="Bookmark Technorati" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0GRQk71JI/AAAAAAAABgk/AT5wC4ZYB8g/s200/technorati.png" mce_src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0GRQk71JI/AAAAAAAABgk/AT5wC4ZYB8g/s200/technorati.png"&gt; &lt;/A&gt;&lt;A style="TEXT-DECORATION: none" title=Twitter onclick=" window.open('http://twitter.com/home?status='+encodeURIComponent(document.title)+'%20'+encodeURIComponent(location.href)); return false;" href="http://twitter.com/" rel=nofollow target=_Blank mce_href="http://twitter.com/"&gt;&lt;IMG style="PADDING-BOTTOM: 1px" id=Twitter border=0 name=Twitter alt="Bookmark Twitter" src="http://2.bp.blogspot.com/_vLeiVavkV_M/Sn0GYqWEWAI/AAAAAAAABgs/8715Vd67VtA/s200/twitter.png" mce_src="http://2.bp.blogspot.com/_vLeiVavkV_M/Sn0GYqWEWAI/AAAAAAAABgs/8715Vd67VtA/s200/twitter.png"&gt; &lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10003830" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-00-38-30/DynamicMefCloud.zip" length="417190" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/Architecture/">Architecture</category><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/Silverlight/">Silverlight</category><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/Windows+Azure/">Windows Azure</category></item><item><title>Application Partitioning with MEF, Silverlight and Windows Azure – Part I</title><link>http://blogs.msdn.com/b/astrauss/archive/2010/04/27/application-partitioning-with-mef-silverlight-and-windows-azure-part-i.aspx</link><pubDate>Tue, 27 Apr 2010 18:31:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10003373</guid><dc:creator>Alex Strauss</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/astrauss/rsscomments.aspx?WeblogPostID=10003373</wfw:commentRss><comments>http://blogs.msdn.com/b/astrauss/archive/2010/04/27/application-partitioning-with-mef-silverlight-and-windows-azure-part-i.aspx#comments</comments><description>&lt;p&gt;The &lt;a href="http://mef.codeplex.com/" target="_blank"&gt;Managed Extensibility Framework (MEF)&lt;/a&gt; supports you in creating loosely coupled and partitioned applications. To embrace those paradigms makes sense for many reasons. Some of the various benefits are:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;em&gt;&lt;strong&gt;Share work across multiple developers or development team and have a well defined boundaries for the work items of the teams based on MEF components &lt;/strong&gt;&lt;/em&gt;&lt;/li&gt;    &lt;li&gt;&lt;em&gt;&lt;strong&gt;Dynamic extension or updates of application parts or components without a complete redeployment and long downtimes &lt;/strong&gt;&lt;/em&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;MEF has been around in the .Net Framework for quite some time and since the current release of Silverlight 4 it is also available for use in Silverlight applications.&lt;/p&gt;  &lt;p&gt;Especially for the use in Silverlight and to introduce application partitioning on with having application XAP files as physical component boundaries it was necessary to alter the capabilities of the &lt;a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.composition.hosting.directorycatalog%28v=VS.100%29.aspx" target="_blank"&gt;&lt;em&gt;&lt;font face="Courier New"&gt;DirectoryCatalog&lt;/font&gt;&lt;/em&gt;&lt;/a&gt; class as now the the application parts are not sitting in a local file system directory as assemblies but as XAP archives on a remote web server.&lt;/p&gt;  &lt;p&gt;Therefore the &lt;em&gt;&lt;font face="Courier New"&gt;DirectoryCatalog&lt;/font&gt;&lt;/em&gt; was replaced by the &lt;a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.composition.hosting.deploymentcatalog%28v=VS.95%29.aspx" target="_blank"&gt;&lt;em&gt;&lt;font face="Courier New"&gt;DeploymentCatalog&lt;/font&gt;&lt;/em&gt;&lt;/a&gt; in Silverlight. However as far as I understand this comes with one shortcoming which is that you need to specify an direct URL to the XAP files that you want to include into your application. As long as you do not externalize a component that provides those URLs you won not much in terms of loose coupling. But if you do externalize the URL “injection” you have all possibilities MEF offers with respect to dynamically compose applications. Even more you then also have better possibilities to use &lt;a href="http://www.azure.com/" target="_blank"&gt;Windows Azure&lt;/a&gt; as the hosting environment for your Silverlight Application. In this Blog post I will demonstrate how this can work in an easy example.&lt;/p&gt;  &lt;p&gt;The sample application is partitioned based on UI components to make the concept as obvious as possible. First the main application simply defines some UI areas with an &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.itemscontrol(v=VS.95).aspx" target="_blank"&gt;&lt;font face="Courier New"&gt;&lt;em&gt;ItemsControl&lt;/em&gt;&lt;/font&gt;&lt;/a&gt; as placeholder for the actual partial UI coming from the external XAPs. So you can more or less say that we define a shell and content modules. From the UI point of view this feels quite a bit like the &lt;a href="http://msdn.microsoft.com/en-us/library/cc707890.aspx" target="_blank"&gt;Composite Application Library (CAL)&lt;/a&gt; for Silverlight however the CAL still goes a little bit beyond what we want to accomplish here. The overall application structure looks like the following.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/ApplicationPartitioningwithMEFSilverligh_B9DC/DynMefSlAzure_Structure_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Partitioned Silverlight Application on Windows Azure" border="0" alt="Partitioned Silverlight Application on Windows Azure" src="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/ApplicationPartitioningwithMEFSilverligh_B9DC/DynMefSlAzure_Structure_thumb.jpg" width="640" height="322" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;First thing to mention is that we have actually two locations were application parts are stored and served from. As this might seem a bit odd it is however necessary due to the nature of how application packages are deployed on Windows Azure and due to the fact that you do not have direct access to the directories of the web server and the websites. So in order to be able to deploy and provide application parts after the initial deployment we need a place where we put the extending XAP files and were the main application can pick it up. In our case the XAPs are provided through the Windows Azure Blob Storage. This comes in handy as you can use your own or some third party tools to put your XAPs and the related artifacts into the Windows Azure storage.&lt;/p&gt;  &lt;p&gt;There is however one thing to be aware of which is that now with having two different locations the cross domain restrictions of Silverlight will intercept and prevent Silverlight or to be more precise MEF from downloading the extending XAPs from blob storage.&lt;/p&gt;  &lt;p&gt;Therefore we need to deploy a Silverlight policy file on the target server which in our case is the root of our blob storage account. The file needs to be named &lt;font face="Courier New"&gt;&lt;em&gt;ClientAccess.xml&lt;/em&gt;&lt;/font&gt;. An excellent example how to deploy such kind of file can be found in &lt;a href="http://blog.smarx.com/posts/uploading-windows-azure-blobs-from-silverlight-part-2-enabling-cross-domain-access-to-blobs" target="_blank"&gt;this blog post by Steve Marx&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;What you also need is some kind of external artifact to the application that tells the main application where and which XAPs to download and integrate as parts into the application. In my case I chose to define that in a simple XML file&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #800000"&gt;xml&lt;/span&gt; &lt;span style="color: #ff0000"&gt;version&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1.0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;encoding&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;utf-8&amp;quot;&lt;/span&gt; ?&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Deployment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Catalog&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;PartFile&lt;/span&gt; &lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;mefparts/DynamicCloudRIA.Header.xap&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;PartFile&lt;/span&gt; &lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;mefparts/DynamicCloudRIA.LeftNav.xap&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;PartFile&lt;/span&gt; &lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;mefparts/DynamicCloudRIA.Workbench.xap&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;PartFile&lt;/span&gt; &lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;mefparts/DynamicCloudRIA.Footer.xap&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Catalog&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Deployment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;So now that I have this prerequisites I can start creating the main application and the application parts. The following screenshot shows the result of this demonstration which is actually a very simple UI which is composed from 5 different XAP files. It is important to note that implementation of functionality does not matter for this sample but the structure and the coupling of the different UI parts through MEF.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/ApplicationPartitioningwithMEFSilverligh_B9DC/DynCloudRIA_Screen_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Application Screenshot" border="0" alt="Application Screenshot" src="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/ApplicationPartitioningwithMEFSilverligh_B9DC/DynCloudRIA_Screen_thumb.jpg" width="640" height="465" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To start off I created a new Cloud Project in Visual Studio 2010 with one WebRole and then added a Silverlight Project to the cloud solution which is referenced by the WebRole project. The main UI layout is defined in the main Silverlight application. In this sample a Grid is defined with three rows and two columns. Then a placeholder for each area is defined as an ItemsControl. The XAML for this simple main layout looks like this (I used a fixed size layout for simplicity):&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;LayoutRoot&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Background&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;White&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid.ColumnDefinitions&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ColumnDefinition&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;200&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ColumnDefinition&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid.ColumnDefinitions&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid.RowDefinitions&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RowDefinition&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;50&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RowDefinition&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RowDefinition&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;50&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid.RowDefinitions&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ItemsControl&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;header&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;ColumnSpan&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;2&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Row&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ItemsControl&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;leftnav&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;ColumnSpan&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Row&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ItemsControl&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;workbench&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;ColumnSpan&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Row&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Column&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ItemsControl&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;footer&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;ColumnSpan&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;2&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Row&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;2&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Next we have to implement some basic “infrastructure” for this sample in order to make it work. First is we have to define a &lt;a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.composition.metadataattributeattribute%28v=VS.95%29.aspx" target="_blank"&gt;&lt;font face="Courier ne"&gt;&lt;em&gt;MetadataAttribute&lt;/em&gt;&lt;/font&gt;&lt;/a&gt; in order to allow us to filter the UserControls inside the asynchronous downloaded XAPs for the area they want to attach to. To get to know more about that I recommend to watch the &lt;a href="http://channel9.msdn.com/shows/SilverlightTV/Silverlight-TV-Episode-5-Using-Metadata-with-MEF/" target="_blank"&gt;Silverlight TV Episode 5: Using Metadata with MEF&lt;/a&gt;. For my sample I added the following class to my main application project.&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;[MetadataAttribute]&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;[AttributeUsage(AttributeTargets.Class, AllowMultiple = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;)]&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; ExportPart : ExportAttribute&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; ExportPart() : &lt;span style="color: #0000ff"&gt;base&lt;/span&gt;(&lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(UserControl)) { }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; IsHeaderPart { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; IsFooterPart { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; IsLeftNavPart { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; IsWorkbenchPart { get; set; } &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;As we want to access the metadata or better say &lt;a href="http://mef.codeplex.com/wikipage?title=Exports%20and%20Metadata&amp;amp;referringTitle=Guide" target="_blank"&gt;filter for the metadata in a strongly typed fashion&lt;/a&gt; we need to define an interface with matching read only properties to those exposed in the &lt;em&gt;&lt;font face="Courier New"&gt;MetadataAttribute&lt;/font&gt;&lt;/em&gt;. This allows us to import the application parts with such an &lt;font face="Courier New"&gt;&lt;em&gt;ExportAttribute&lt;/em&gt;&lt;/font&gt; with lazy initialization using the Type &lt;em&gt;&lt;font face="Courier New"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd986615%28v=VS.95%29.aspx" target="_blank"&gt;System.Lazy&amp;lt;T, TMetadata&amp;gt;&lt;/a&gt;&lt;/font&gt;&lt;/em&gt;. This looks like the following in this sample:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;interface&lt;/span&gt; IPartAttributes&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; IsHeaderPart { get; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; IsFooterPart { get; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; IsLeftNavPart { get; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; IsWorkbenchPart { get; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;That’s it for the moment. In the next part I will discuss how to import parts handle the XAP retrieval and do the deployment. So stay tuned.&lt;/p&gt;

&lt;p&gt;&lt;a style="text-decoration: none" title="Bookmark to: Digg" onclick="window.open(&amp;#39;http://digg.com/submit?phase=2&amp;amp;url=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;bodytext=&amp;amp;tags=&amp;amp;title=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://digg.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Digg" border="0" name="Digg" alt="Bookmark Digg" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0FwVnXcQI/AAAAAAAABf8/8t8jUbCOQN0/s200/digg.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Del.icio.us" onclick="window.open(&amp;#39;http://del.icio.us/post?v=2&amp;amp;url=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;notes=&amp;amp;tags=&amp;amp;title=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://del.icio.us/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Delicious" border="0" name="Delicious" alt="Bookmark Del.icio.us" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0FmrXO-vI/AAAAAAAABf0/gK0oKdOJzMM/s200/delicious.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Facebook" onclick="window.open(&amp;#39;http://www.facebook.com/sharer.php?u=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;t=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://www.facebook.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Facebook" border="0" name="Facebook" alt="Bookmark Facebook" src="http://1.bp.blogspot.com/_vLeiVavkV_M/Sn0F1uQ7P_I/AAAAAAAABgE/zESf9tLZOtw/s200/facebook.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Reddit" onclick="window.open(&amp;#39;http://reddit.com/submit?url=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;title=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://reddit.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Reddit" border="0" name="Reddit" alt="Bookmark Reddit" src="http://3.bp.blogspot.com/_vLeiVavkV_M/Sn0GDJUzotI/AAAAAAAABgU/qAA0KjdLgF8/s200/reddit.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: StumbleUpon" onclick="window.open(&amp;#39;http://www.stumbleupon.com/submit?url=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;title=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://www.stumbleupon.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="StumbleUpon" border="0" name="StumbleUpon" alt="Bookmark StumbleUpon" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0GJ5NxMRI/AAAAAAAABgc/zaraJzCuyXI/s200/stumbleupon.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Yahoo" onclick="window.open(&amp;#39;http://myweb2.search.yahoo.com/myresults/bookmarklet?t=&amp;#39;+encodeURIComponent(document.title)+&amp;#39;&amp;amp;d=&amp;amp;tag=&amp;amp;u=&amp;#39;+encodeURIComponent(location.href));return false;" href="http://www.yahoo.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Yahoo" border="0" name="Yahoo" alt="Bookmark Yahoo" src="http://2.bp.blogspot.com/_vLeiVavkV_M/Sn0GdCPWuUI/AAAAAAAABg0/-tjcrdMnRkA/s200/yahoo.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Google" onclick="window.open(&amp;#39;http://www.google.com/bookmarks/mark?op=add&amp;amp;bkmk=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;annotation=&amp;amp;labels=&amp;amp;title=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://www.google.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Google" border="0" name="Google" alt="Bookmark Google" src="http://3.bp.blogspot.com/_vLeiVavkV_M/Sn0F7200sZI/AAAAAAAABgM/ivmXOn18EZA/s200/google.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Technorati" onclick="window.open(&amp;#39;http://technorati.com/faves?add=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;tag=&amp;#39;);return false;" href="http://www.technorati.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Technorati" border="0" name="Technorati" alt="Bookmark Technorati" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0GRQk71JI/AAAAAAAABgk/AT5wC4ZYB8g/s200/technorati.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Twitter" onclick=" window.open(&amp;#39;http://twitter.com/home?status=&amp;#39;+encodeURIComponent(document.title)+&amp;#39;%20&amp;#39;+encodeURIComponent(location.href)); return false;" href="http://twitter.com/" rel="nofollow" target="_Blank"&gt;&lt;img style="padding-bottom: 1px" id="Twitter" border="0" name="Twitter" alt="Bookmark Twitter" src="http://2.bp.blogspot.com/_vLeiVavkV_M/Sn0GYqWEWAI/AAAAAAAABgs/8715Vd67VtA/s200/twitter.png" /&gt; &lt;/a&gt;&lt;!-- End Add Social Bookmark Buttons - small buttons - blogknowhow.blogspot.com --&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10003373" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/Architecture/">Architecture</category><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/Silverlight/">Silverlight</category><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/Windows+Azure/">Windows Azure</category></item><item><title>Tales About Working With The Azure Service Management API – Chapter III</title><link>http://blogs.msdn.com/b/astrauss/archive/2010/02/17/tales-about-working-with-the-azure-service-management-api-chapter-iii.aspx</link><pubDate>Wed, 17 Feb 2010 10:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9964953</guid><dc:creator>Alex Strauss</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/astrauss/rsscomments.aspx?WeblogPostID=9964953</wfw:commentRss><comments>http://blogs.msdn.com/b/astrauss/archive/2010/02/17/tales-about-working-with-the-azure-service-management-api-chapter-iii.aspx#comments</comments><description>&lt;P&gt;After &lt;A href="http://blogs.msdn.com/astrauss/archive/2010/02/15/tales-about-working-with-the-azure-service-management-api-chapter-ii.aspx" target=_blank mce_href="http://blogs.msdn.com/astrauss/archive/2010/02/15/tales-about-working-with-the-azure-service-management-api-chapter-ii.aspx"&gt;my last post&lt;/A&gt; I was a little bit dissatisfied with the fact that if you use the scripts frequently the blob storage container will fill up quite a bit. As already outlined this will affect the monthly charges billed to your account especially when you are deploying in a high frequency and have to deploy large packages. So I was looking for a solution to that.&lt;/P&gt;
&lt;P&gt;So as we are already operating in a Windows Powershell environment I thought the best way to resolve this would be to provide a commandlet that does enable you to delete the deployment packages in the blob storage. So I created a small that of commandlets which enable you to interact with the Windows Azure blob storage based on the official StorageClient managed API. I packaged the commandlets into a &lt;A href="http://msdn.microsoft.com/en-us/library/ms714450(VS.85).aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/ms714450(VS.85).aspx"&gt;SnapIn&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;The available commandlets so far are:&lt;/P&gt;
&lt;TABLE border=1 cellSpacing=0 cellPadding=2 width=597&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=137&gt;&lt;EM&gt;&lt;FONT face="Courier New"&gt;&lt;STRONG&gt;Get-Storage&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/EM&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=458&gt;&lt;FONT face="Courier New"&gt;&lt;STRONG&gt;&lt;EM&gt;This represents the base storage service with the elemental properties “SharedKey” and “StorageAccount” which are needed for almost every subsequent operation.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=140&gt;&lt;FONT face="Courier New"&gt;&lt;STRONG&gt;&lt;EM&gt;Get-Container&lt;/EM&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=456&gt;&lt;FONT face="Courier New"&gt;&lt;STRONG&gt;&lt;EM&gt;Lists the container currently available in the blob storage account. This commandlet is not needed for the task of removing the deployment packages.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=142&gt;&lt;FONT face="Courier New"&gt;&lt;STRONG&gt;&lt;EM&gt;Get-Bloblist&lt;/EM&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=454&gt;&lt;FONT face="Courier New"&gt;&lt;STRONG&gt;&lt;EM&gt;This commandlet lists the blobs of a specific container and holds a property of “BlobList” which can be used as a piping parameter for the Remove-Blob commandlet. It allows for simple filtering based on extensions with the “ExtensionFilter” parameter. So for our task you could filter for the “cspkg” extension to target all deployment packages.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=144&gt;&lt;FONT face="Courier New"&gt;&lt;STRONG&gt;&lt;EM&gt;Remove-Blob&lt;/EM&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=453&gt;&lt;FONT face="Courier New"&gt;&lt;STRONG&gt;&lt;EM&gt;This commandlet removes the blobs provided via the “BlobList” parameter or all blobs in the container if no list is provided. So be careful in using this commandlet.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;The code is attached to this blog post. I choose to provide it in a separate SnapIn package however you could also add it to the &lt;A title="Windows Azure Service Management CmdLets" href="http://code.msdn.microsoft.com/azurecmdlets" mce_href="http://code.msdn.microsoft.com/azurecmdlets"&gt;Windows Azure Service Management CmdLets&lt;/A&gt; project which is also provided as source code. If you use the package as is you need to install it once using the &lt;A href="http://msdn.microsoft.com/en-us/library/50614e95(VS.80).aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/50614e95(VS.80).aspx"&gt;Installer Tool&lt;/A&gt; shipping with the .Net Framework. So you need to issue a command similar to this:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;FONT face="Courier New"&gt;c:\Windows\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe AzureCommandletCollection.dll&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;After doing so you can check if the AzureCommandletCollectionSnapIn is listed as a registered SanpIn using the command&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;EM&gt;Get-PSSnapin –registered&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;The output should look something like this:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/TalesAboutWorkingWithTheAzureServiceMana_8DFE/azure_cmdlet1_4.jpg" mce_href="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/TalesAboutWorkingWithTheAzureServiceMana_8DFE/azure_cmdlet1_4.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN-LEFT: 0px; BORDER-LEFT-WIDTH: 0px; MARGIN-RIGHT: 0px" title=azure_cmdlet1 border=0 alt=azure_cmdlet1 src="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/TalesAboutWorkingWithTheAzureServiceMana_8DFE/azure_cmdlet1_thumb_1.jpg" width=644 height=107 mce_src="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/TalesAboutWorkingWithTheAzureServiceMana_8DFE/azure_cmdlet1_thumb_1.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Then finally in order to use it you need to add the SnapIn to the snapin to the active powershell session. You need to do that no matter if you want to use the commandlets interactively or from script. Issue the to do so.&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;EM&gt;Add-PSSnapin AzureCommandletCollectionSnapIn&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;With respect to integrating the removal task to our scripts I have then altered my deployment script to get rid of the deployment package right after the deployment. So the list of blobs should usually always only consist of one entry.&lt;/P&gt;
&lt;P&gt;The changes are minimal. There are only two changes. The first is the part where we need to add the SnapIn to the session:&lt;/P&gt;
&lt;DIV id=codeSnippetWrapper&gt;
&lt;DIV style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px" id=codeSnippet&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;if&lt;/SPAN&gt;(!($mgmtsnapin = Get-PSSnapin AzureManagementToolsSnapIn -erroraction silentlycontinue))&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;{&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    Write-Host &lt;SPAN style="COLOR: #006080"&gt;"Adding ManagementTools SnapIn...please wait"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    Add-PSSnapin AzureManagementToolsSnapIn&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    &lt;SPAN style="COLOR: #0000ff"&gt;if&lt;/SPAN&gt;(!($storagesnapin = Get-PSSnapin AzureCommandletCollectionSnapIn -erroraction silentlycontinue))&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    {&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        Write-Host &lt;SPAN style="COLOR: #006080"&gt;"Adding AzureCommandletCollection SnapIn...please wait"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        Add-PSSnapin AzureCommandletCollectionSnapIn&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    }&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;}&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;/DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;The second change is the the actual removal task:&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id=codeSnippetWrapper&gt;
&lt;DIV style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px" id=codeSnippet&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;$storagekeys = Get-StorageKeys -ServiceName $storageservicename -SubscriptionId $subscriptionid -Certificate $cert&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;Get-Storage -StorageAccount $storageservicename -SharedKey $storagekeys.Primary &lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;| Get-Bloblist -ContainerName mydeployments -ExtensionFilter cspkg &lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;| Remove-Blob&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;/DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;So then we can outline the final script which looks like the following:&lt;/DIV&gt;
&lt;DIV style="BORDER-BOTTOM: silver 1px solid; TEXT-ALIGN: left; BORDER-LEFT: silver 1px solid; PADDING-BOTTOM: 4px; LINE-HEIGHT: 12pt; BACKGROUND-COLOR: #f4f4f4; MARGIN: 20px 0px 10px; PADDING-LEFT: 4px; WIDTH: 97.5%; PADDING-RIGHT: 4px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; MAX-HEIGHT: 200px; FONT-SIZE: 8pt; OVERFLOW: auto; BORDER-TOP: silver 1px solid; CURSOR: text; BORDER-RIGHT: silver 1px solid; PADDING-TOP: 4px" id=codeSnippetWrapper&gt;
&lt;DIV style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px" id=codeSnippet&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;&amp;lt;#&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    .Synopsis&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        Will deploy and start a Windows Azure Service&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    .Description&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        Will deploy and start a Windows Azure Service        &lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    .Parameter servicename&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        The name of the Azure service that will hold the deployment&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    .Parameter thumbprint&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        The thumbprint of a locally installed and valid certificate &lt;SPAN style="COLOR: #0000ff"&gt;for&lt;/SPAN&gt; accessing&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        the Windows Azure Management Service&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    .Parameter subscriptionid&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        The ID &lt;SPAN style="COLOR: #0000ff"&gt;for&lt;/SPAN&gt; the subscription of the Azure Account hosting the respective service&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    .Parameter slot&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        The deployment slot &lt;SPAN style="COLOR: #0000ff"&gt;in&lt;/SPAN&gt; which the package shall be deployed &amp;lt;Production | Staging&amp;gt;&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    .Parameter storageservicename&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        The storage account that can be used to upload the deployment package&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    .Parameter package&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        The full qualified path to the deployment package&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    .Parameter config&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        The full qualified path to the configuration file &lt;SPAN style="COLOR: #0000ff"&gt;for&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;this&lt;/SPAN&gt; deployment&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    .Example&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        deployAzureService.ps1 -servicename &lt;SPAN style="COLOR: #006080"&gt;"MyService"&lt;/SPAN&gt; -thumbprint &lt;SPAN style="COLOR: #006080"&gt;"5643060E8F0029FB8C6DB76AAE905C7FA697"&lt;/SPAN&gt; -subscriptionid &lt;SPAN style="COLOR: #006080"&gt;"00000000-0000-0000-0000-000000000000"&lt;/SPAN&gt; -slot &lt;SPAN style="COLOR: #006080"&gt;"Production"&lt;/SPAN&gt; -storageservicename &lt;SPAN style="COLOR: #006080"&gt;"StorageService"&lt;/SPAN&gt; -package &lt;SPAN style="COLOR: #006080"&gt;"C:\deployment\HelloWorld.cspkg"&lt;/SPAN&gt; -config &lt;SPAN style="COLOR: #006080"&gt;"C:\deployments\ServiceConfiguration.cscfg"&lt;/SPAN&gt; -label &lt;SPAN style="COLOR: #006080"&gt;"MyFirstDeployment"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;#&amp;gt;&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;&amp;nbsp;&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;param([PARAMETER(Mandatory=$&lt;SPAN style="COLOR: #0000ff"&gt;true&lt;/SPAN&gt;)][&lt;SPAN style="COLOR: #0000ff"&gt;string&lt;/SPAN&gt;]$servicename, [PARAMETER(Mandatory=$&lt;SPAN style="COLOR: #0000ff"&gt;true&lt;/SPAN&gt;)][&lt;SPAN style="COLOR: #0000ff"&gt;string&lt;/SPAN&gt;]$thumbprint, [PARAMETER(Mandatory=$&lt;SPAN style="COLOR: #0000ff"&gt;true&lt;/SPAN&gt;)][&lt;SPAN style="COLOR: #0000ff"&gt;string&lt;/SPAN&gt;]$subscriptionid, [PARAMETER(Mandatory=$&lt;SPAN style="COLOR: #0000ff"&gt;true&lt;/SPAN&gt;)][&lt;SPAN style="COLOR: #0000ff"&gt;string&lt;/SPAN&gt;]$slot, [PARAMETER(Mandatory=$&lt;SPAN style="COLOR: #0000ff"&gt;true&lt;/SPAN&gt;)][&lt;SPAN style="COLOR: #0000ff"&gt;string&lt;/SPAN&gt;]$storageservicename, [PARAMETER(Mandatory=$&lt;SPAN style="COLOR: #0000ff"&gt;true&lt;/SPAN&gt;)][&lt;SPAN style="COLOR: #0000ff"&gt;string&lt;/SPAN&gt;]$package, [PARAMETER(Mandatory=$&lt;SPAN style="COLOR: #0000ff"&gt;true&lt;/SPAN&gt;)][&lt;SPAN style="COLOR: #0000ff"&gt;string&lt;/SPAN&gt;]$config, [PARAMETER(Mandatory=$&lt;SPAN style="COLOR: #0000ff"&gt;true&lt;/SPAN&gt;)][&lt;SPAN style="COLOR: #0000ff"&gt;string&lt;/SPAN&gt;]$label)&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;if&lt;/SPAN&gt;(!($mgmtsnapin = Get-PSSnapin AzureManagementToolsSnapIn -erroraction silentlycontinue))&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;{&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    Write-Host &lt;SPAN style="COLOR: #006080"&gt;"Adding ManagementTools SnapIn...please wait"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    Add-PSSnapin AzureManagementToolsSnapIn&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    &lt;SPAN style="COLOR: #0000ff"&gt;if&lt;/SPAN&gt;(!($storagesnapin = Get-PSSnapin AzureCommandletCollectionSnapIn -erroraction silentlycontinue))&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    {&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        Write-Host &lt;SPAN style="COLOR: #006080"&gt;"Adding AzureCommandletCollection SnapIn...please wait"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        Add-PSSnapin AzureCommandletCollectionSnapIn&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    }&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;}&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;$cert = Get-Item cert:\CurrentUser\My\$thumbprint&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;$service = Get-HostedService $servicename -Certificate $cert -SubscriptionId $subscriptionid&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;if&lt;/SPAN&gt;($service)&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;{&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    $deployment = Get-Deployment -Slot $slot -ServiceName $servicename -SubscriptionId $subscriptionid -Certificate $cert -erroraction silentlycontinue&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    $name = $deployment.Name&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    &lt;SPAN style="COLOR: #0000ff"&gt;if&lt;/SPAN&gt;(!$deployment.Name)&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    {&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        Write-Host &lt;SPAN style="COLOR: #006080"&gt;"Creating new deployment...please wait"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        New-Deployment -Slot $slot -ServiceName $servicename -SubscriptionId $subscriptionid -Certificate $cert -Package $package -Configuration $config -Label $label -StorageServiceName $storageservicename |&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        Get-OperationStatus -WaitToComplete&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        &lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        Write-Host &lt;SPAN style="COLOR: #006080"&gt;"Starting the new deployment...please wait"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        Get-Deployment -Slot $slot -ServiceName $servicename -SubscriptionId $subscriptionid -Certificate $cert |&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        Set-DeploymentStatus &lt;SPAN style="COLOR: #006080"&gt;"Running"&lt;/SPAN&gt; |&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        Get-OperationStatus -WaitToComplete&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        $storagekeys = Get-StorageKeys -ServiceName $storageservicename -SubscriptionId $subscriptionid -Certificate $cert&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        Get-Storage -StorageAccount $storageservicename -SharedKey $storagekeys.Primary | Get-Bloblist -ContainerName mydeployments -ExtensionFilter cspkg | Remove-Blob&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    } &lt;SPAN style="COLOR: #0000ff"&gt;else&lt;/SPAN&gt;&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    {&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;        Write-Host &lt;SPAN style="COLOR: #006080"&gt;"Service $servicename already has an active deployment with the name $name...please remove the active deployment first"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    }&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;} &lt;SPAN style="COLOR: #0000ff"&gt;else&lt;/SPAN&gt;&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;{&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;    Write-Host &lt;SPAN style="COLOR: #006080"&gt;"No service found with the name $servicename"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;PRE style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"&gt;}&lt;/PRE&gt;&lt;!--CRLF--&gt;&lt;/DIV&gt;&lt;/DIV&gt;
&lt;P mce_keep="true"&gt;When running from the command line it should produce the following output:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/TalesAboutWorkingWithTheAzureServiceMana_8DFE/azure_cmdlet_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/TalesAboutWorkingWithTheAzureServiceMana_8DFE/azure_cmdlet_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=azure_cmdlet border=0 alt=azure_cmdlet src="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/TalesAboutWorkingWithTheAzureServiceMana_8DFE/azure_cmdlet_thumb.jpg" width=644 height=208 mce_src="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/TalesAboutWorkingWithTheAzureServiceMana_8DFE/azure_cmdlet_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A style="TEXT-DECORATION: none" title="Bookmark to: Digg" onclick="window.open('http://digg.com/submit?phase=2&amp;amp;url='+encodeURIComponent(location.href)+'&amp;amp;bodytext=&amp;amp;tags=&amp;amp;title='+encodeURIComponent(document.title));return false;" href="http://digg.com/" rel=nofollow mce_href="http://digg.com/"&gt;&lt;IMG style="PADDING-BOTTOM: 1px" id=Digg border=0 name=Digg alt="Bookmark Digg" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0FwVnXcQI/AAAAAAAABf8/8t8jUbCOQN0/s200/digg.png" mce_src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0FwVnXcQI/AAAAAAAABf8/8t8jUbCOQN0/s200/digg.png"&gt; &lt;/A&gt;&lt;A style="TEXT-DECORATION: none" title="Bookmark to: Del.icio.us" onclick="window.open('http://del.icio.us/post?v=2&amp;amp;url='+encodeURIComponent(location.href)+'&amp;amp;notes=&amp;amp;tags=&amp;amp;title='+encodeURIComponent(document.title));return false;" href="http://del.icio.us/" rel=nofollow mce_href="http://del.icio.us/"&gt;&lt;IMG style="PADDING-BOTTOM: 1px" id=Delicious border=0 name=Delicious alt="Bookmark Del.icio.us" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0FmrXO-vI/AAAAAAAABf0/gK0oKdOJzMM/s200/delicious.png" mce_src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0FmrXO-vI/AAAAAAAABf0/gK0oKdOJzMM/s200/delicious.png"&gt; &lt;/A&gt;&lt;A style="TEXT-DECORATION: none" title="Bookmark to: Facebook" onclick="window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(location.href)+'&amp;amp;t='+encodeURIComponent(document.title));return false;" href="http://www.facebook.com/" rel=nofollow mce_href="http://www.facebook.com/"&gt;&lt;IMG style="PADDING-BOTTOM: 1px" id=Facebook border=0 name=Facebook alt="Bookmark Facebook" src="http://1.bp.blogspot.com/_vLeiVavkV_M/Sn0F1uQ7P_I/AAAAAAAABgE/zESf9tLZOtw/s200/facebook.png" mce_src="http://1.bp.blogspot.com/_vLeiVavkV_M/Sn0F1uQ7P_I/AAAAAAAABgE/zESf9tLZOtw/s200/facebook.png"&gt; &lt;/A&gt;&lt;A style="TEXT-DECORATION: none" title="Bookmark to: Reddit" onclick="window.open('http://reddit.com/submit?url='+encodeURIComponent(location.href)+'&amp;amp;title='+encodeURIComponent(document.title));return false;" href="http://reddit.com/" rel=nofollow mce_href="http://reddit.com/"&gt;&lt;IMG style="PADDING-BOTTOM: 1px" id=Reddit border=0 name=Reddit alt="Bookmark Reddit" src="http://3.bp.blogspot.com/_vLeiVavkV_M/Sn0GDJUzotI/AAAAAAAABgU/qAA0KjdLgF8/s200/reddit.png" mce_src="http://3.bp.blogspot.com/_vLeiVavkV_M/Sn0GDJUzotI/AAAAAAAABgU/qAA0KjdLgF8/s200/reddit.png"&gt; &lt;/A&gt;&lt;A style="TEXT-DECORATION: none" title="Bookmark to: StumbleUpon" onclick="window.open('http://www.stumbleupon.com/submit?url='+encodeURIComponent(location.href)+'&amp;amp;title='+encodeURIComponent(document.title));return false;" href="http://www.stumbleupon.com/" rel=nofollow mce_href="http://www.stumbleupon.com/"&gt;&lt;IMG style="PADDING-BOTTOM: 1px" id=StumbleUpon border=0 name=StumbleUpon alt="Bookmark StumbleUpon" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0GJ5NxMRI/AAAAAAAABgc/zaraJzCuyXI/s200/stumbleupon.png" mce_src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0GJ5NxMRI/AAAAAAAABgc/zaraJzCuyXI/s200/stumbleupon.png"&gt; &lt;/A&gt;&lt;A style="TEXT-DECORATION: none" title="Bookmark to: Yahoo" onclick="window.open('http://myweb2.search.yahoo.com/myresults/bookmarklet?t='+encodeURIComponent(document.title)+'&amp;amp;d=&amp;amp;tag=&amp;amp;u='+encodeURIComponent(location.href));return false;" href="http://www.yahoo.com/" rel=nofollow mce_href="http://www.yahoo.com/"&gt;&lt;IMG style="PADDING-BOTTOM: 1px" id=Yahoo border=0 name=Yahoo alt="Bookmark Yahoo" src="http://2.bp.blogspot.com/_vLeiVavkV_M/Sn0GdCPWuUI/AAAAAAAABg0/-tjcrdMnRkA/s200/yahoo.png" mce_src="http://2.bp.blogspot.com/_vLeiVavkV_M/Sn0GdCPWuUI/AAAAAAAABg0/-tjcrdMnRkA/s200/yahoo.png"&gt; &lt;/A&gt;&lt;A style="TEXT-DECORATION: none" title="Bookmark to: Google" onclick="window.open('http://www.google.com/bookmarks/mark?op=add&amp;amp;bkmk='+encodeURIComponent(location.href)+'&amp;amp;annotation=&amp;amp;labels=&amp;amp;title='+encodeURIComponent(document.title));return false;" href="http://www.google.com/" rel=nofollow mce_href="http://www.google.com/"&gt;&lt;IMG style="PADDING-BOTTOM: 1px" id=Google border=0 name=Google alt="Bookmark Google" src="http://3.bp.blogspot.com/_vLeiVavkV_M/Sn0F7200sZI/AAAAAAAABgM/ivmXOn18EZA/s200/google.png" mce_src="http://3.bp.blogspot.com/_vLeiVavkV_M/Sn0F7200sZI/AAAAAAAABgM/ivmXOn18EZA/s200/google.png"&gt; &lt;/A&gt;&lt;A style="TEXT-DECORATION: none" title="Bookmark to: Technorati" onclick="window.open('http://technorati.com/faves?add='+encodeURIComponent(location.href)+'&amp;amp;tag=');return false;" href="http://www.technorati.com/" rel=nofollow mce_href="http://www.technorati.com/"&gt;&lt;IMG style="PADDING-BOTTOM: 1px" id=Technorati border=0 name=Technorati alt="Bookmark Technorati" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0GRQk71JI/AAAAAAAABgk/AT5wC4ZYB8g/s200/technorati.png" mce_src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0GRQk71JI/AAAAAAAABgk/AT5wC4ZYB8g/s200/technorati.png"&gt; &lt;/A&gt;&lt;A style="TEXT-DECORATION: none" title=Twitter onclick=" window.open('http://twitter.com/home?status='+encodeURIComponent(document.title)+'%20'+encodeURIComponent(location.href)); return false;" href="http://twitter.com/" rel=nofollow target=_Blank mce_href="http://twitter.com/"&gt;&lt;IMG style="PADDING-BOTTOM: 1px" id=Twitter border=0 name=Twitter alt="Bookmark Twitter" src="http://2.bp.blogspot.com/_vLeiVavkV_M/Sn0GYqWEWAI/AAAAAAAABgs/8715Vd67VtA/s200/twitter.png" mce_src="http://2.bp.blogspot.com/_vLeiVavkV_M/Sn0GYqWEWAI/AAAAAAAABgs/8715Vd67VtA/s200/twitter.png"&gt; &lt;/A&gt;&lt;!-- End Add Social Bookmark Buttons - small buttons - blogknowhow.blogspot.com --&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9964953" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-09-96-49-53/AzureCommandletCollection.zip" length="13657" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/Tips/">Tips</category><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/Windows+Azure/">Windows Azure</category><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/Powershell/">Powershell</category></item><item><title>Tales About Working With The Azure Service Management API – Chapter II</title><link>http://blogs.msdn.com/b/astrauss/archive/2010/02/15/tales-about-working-with-the-azure-service-management-api-chapter-ii.aspx</link><pubDate>Mon, 15 Feb 2010 10:44:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9963516</guid><dc:creator>Alex Strauss</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/astrauss/rsscomments.aspx?WeblogPostID=9963516</wfw:commentRss><comments>http://blogs.msdn.com/b/astrauss/archive/2010/02/15/tales-about-working-with-the-azure-service-management-api-chapter-ii.aspx#comments</comments><description>&lt;p&gt;After I elaborated a bit on one of the base requirements to work with the Azure Service Management API at all which is enabling a valid certificate to authenticate your calls to the API I want today share some thoughts about how to automate tasks related with Azure deployments. As already pointed out in &lt;a href="http://blogs.msdn.com/astrauss/archive/2010/01/28/tales-about-working-with-the-azure-service-management-api-chapter-i.aspx" target="_blank"&gt;Chapter I&lt;/a&gt; you probably want to use &lt;a href="http://technet.microsoft.com/en-us/scriptcenter/dd742419.aspx" target="_blank"&gt;Windows Powershell&lt;/a&gt; together with the &lt;a title="Windows Azure Service Management CmdLets" href="http://code.msdn.microsoft.com/azurecmdlets"&gt;Windows Azure Service Management CmdLets&lt;/a&gt; which will make your life in interacting with the Windows Azure Fabric from a shell environment much easier. The commandlets support most of the relevant tasks to do deployments and undeployments.&lt;/p&gt;  &lt;p&gt;So in my example here I will show how those commandlets can be used in scripts to optimize the consumption of Windows Azure compute services. As you might know the compute service is billed based on service hours which basically means that as long as a service is deployed it will produce cost although the service may not be used at all during certain times. And as there may be quite some solutions where there are known time windows in which the service isn’t used (e.g. non busines hours) it may come in handy if there would be the possibility to undeploy and deploy the services based on their availability needs.&lt;/p&gt;  &lt;p&gt;To have this work the only thing needed is two Windows Powershell scripts where on does the deployment and the other one the undeployment. The script for undeploying a service could look like the following:&lt;/p&gt;  &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;lt;#&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    .Synopsis&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        Will suspend and undeploy a Windows Azure Service&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    .Description&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        Will suspend and undeploy a Windows Azure Service        &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    .Parameter servicename&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        The name of the Azure service that holds the deployment&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    .Parameter thumbprint&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        The thumbprint of a locally installed and valid certificate &lt;span style="color: #0000ff"&gt;for&lt;/span&gt; accessing&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        the Windows Azure Management Service&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    .Parameter subscriptionid&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        The ID &lt;span style="color: #0000ff"&gt;for&lt;/span&gt; the subscription of the Azure Account hosting the respective service&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    .Parameter slot&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        The deployment slot &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; which the package to be undeployed &lt;span style="color: #0000ff"&gt;is&lt;/span&gt; physically situated&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    .Example&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        undeployAzureService.ps1 -thumbprint &lt;span style="color: #006080"&gt;&amp;quot;5643060E8F0029FB8C6DB76AAE905C7FA697&amp;quot;&lt;/span&gt; -servicename &lt;span style="color: #006080"&gt;&amp;quot;MyService&amp;quot;&lt;/span&gt; -subscriptionid &lt;span style="color: #006080"&gt;&amp;quot;00000000-0000-0000-0000-000000000000&amp;quot;&lt;/span&gt; -slot &lt;span style="color: #006080"&gt;&amp;quot;Production&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;#&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;param([PARAMETER(Mandatory=$&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;)][&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$servicename, [PARAMETER(Mandatory=$&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;)][&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$thumbprint, [PARAMETER(Mandatory=$&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;)][&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$subscriptionid, [PARAMETER(Mandatory=$&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;)][&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$slot)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;if&lt;/span&gt;(!($snapin = Get-PSSnapin AzureManagementToolsSnapIn -erroraction silentlycontinue))&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    Write-Host &lt;span style="color: #006080"&gt;&amp;quot;Adding ManagementTools SnapIn...please wait&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    Add-PSSnapin AzureManagementToolsSnapIn&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;$cert = Get-Item cert:\CurrentUser\My\$thumbprint&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;$service = Get-HostedService $servicename -Certificate $cert -SubscriptionId $subscriptionid&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;if&lt;/span&gt;($service)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    $deployment = Get-Deployment -Slot $slot -ServiceName $servicename -SubscriptionId $subscriptionid -Certificate $cert -erroraction silentlycontinue&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt;($deployment.Name)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        Write-Host &lt;span style="color: #006080"&gt;&amp;quot;Suspending deployment...please wait&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        Get-Deployment -Slot $slot -ServiceName $servicename -SubscriptionId $subscriptionid -Certificate $cert |&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        Set-DeploymentStatus &lt;span style="color: #006080"&gt;'Suspended'&lt;/span&gt; |&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        Get-OperationStatus -WaitToComplete&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        Write-Host &lt;span style="color: #006080"&gt;&amp;quot;Removing deployment...please wait&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        Get-Deployment -Slot $slot -ServiceName $servicename -SubscriptionId $subscriptionid -Certificate $cert |&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        Remove-Deployment |&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        Get-OperationStatus -WaitToComplete&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    } &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        Write-Host &lt;span style="color: #006080"&gt;&amp;quot;No deployment found for the service named $servicename&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;} &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    Write-Host &lt;span style="color: #006080"&gt;&amp;quot;No service found with the name $servicename&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;After creating this script you then can create a scheduled job using the Windows Scheduler. When creating the command line for the scheduled task you have to be carefull about two things:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Set the execution policy for powershell so that it allows to run scripts. Depending on your environment and security policies you should set the execution policy to either “AllSigned”, “RemoteSigned” or “Unrestricted”. For more information consult the &lt;a href="http://technet.microsoft.com/en-us/library/ee176961.aspx" target="_blank"&gt;powershell documentation&lt;/a&gt;. Example: &lt;em&gt;&lt;font face="Courier New"&gt;Set-ExecutionPolicy Unrestricted&lt;/font&gt;&lt;/em&gt; &lt;/li&gt;

  &lt;li&gt;If your path to the powershell script which you need to pass over to powershell as an argument does contain blanks you need to use double quotes surrounding the whole argument including the ampersand (which is the call operator in Windows Powershell) and inside enclose the path information with single quotes. So a correct statement would look like this: &lt;font face="Courier New"&gt;&lt;em&gt;powershell.exe -command &amp;quot;&amp;amp; 'C:\My Scripts\undeployAzureService.ps1'&amp;quot;&lt;/em&gt;&lt;/font&gt; … &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To create the scheduled task using the wizard or use a XML template like the one below, insert your data and import it into the scheduler.&lt;/p&gt;

&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:8d59b1cf-9695-4d83-8d19-9505598502fc" class="wlWriterEditableSmartContent"&gt;
&lt;div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"&gt;
&lt;div style="background: #fff; max-height: 300px; overflow: auto"&gt;
&lt;ol style="background: #ffffff; margin: 0; padding: 0 0 0 5px; white-space: nowrap"&gt;
&lt;li&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color:#a31515"&gt;xml&lt;/span&gt;&lt;span style="color:#0000ff"&gt; &lt;/span&gt;&lt;span style="color:#ff0000"&gt;version&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff"&gt;1.0&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff"&gt; &lt;/span&gt;&lt;span style="color:#ff0000"&gt;encoding&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff"&gt;utf-16&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff"&gt;?&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Task&lt;/span&gt;&lt;span style="color:#0000ff"&gt; &lt;/span&gt;&lt;span style="color:#ff0000"&gt;version&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff"&gt;1.3&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff"&gt; &lt;/span&gt;&lt;span style="color:#ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff"&gt;http://schemas.microsoft.com/windows/2004/02/mit/task&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;  &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;RegistrationInfo&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Date&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;2010-02-12T13:44:02.910461&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Date&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Author&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;[userid]&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Author&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Description&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;Timed undeployment of Azure Service during non business hours to optimize Azure consumption of service compute hours.&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Description&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;  &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;RegistrationInfo&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;  &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Triggers&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;CalendarTrigger&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;      &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;StartBoundary&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;2010-02-12T19:00:00Z&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;StartBoundary&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;      &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Enabled&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;true&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Enabled&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;      &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;ScheduleByDay&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;        &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;DaysInterval&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;1&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;DaysInterval&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;      &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;ScheduleByDay&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;CalendarTrigger&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;  &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Triggers&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;  &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Principals&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Principal&lt;/span&gt;&lt;span style="color:#0000ff"&gt; &lt;/span&gt;&lt;span style="color:#ff0000"&gt;id&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff"&gt;Author&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;      &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;UserId&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;[userid&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;UserId&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;      &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;LogonType&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;Password&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;LogonType&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;      &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;RunLevel&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;LeastPrivilege&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;RunLevel&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Principal&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;  &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Principals&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;  &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Settings&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;MultipleInstancesPolicy&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;IgnoreNew&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;MultipleInstancesPolicy&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;DisallowStartIfOnBatteries&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;false&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;DisallowStartIfOnBatteries&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;StopIfGoingOnBatteries&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;true&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;StopIfGoingOnBatteries&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;AllowHardTerminate&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;true&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;AllowHardTerminate&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;StartWhenAvailable&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;true&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;StartWhenAvailable&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;RunOnlyIfNetworkAvailable&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;false&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;RunOnlyIfNetworkAvailable&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;IdleSettings&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;      &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;StopOnIdleEnd&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;true&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;StopOnIdleEnd&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;      &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;RestartOnIdle&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;false&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;RestartOnIdle&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;IdleSettings&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;AllowStartOnDemand&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;true&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;AllowStartOnDemand&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Enabled&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;false&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Enabled&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Hidden&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;false&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Hidden&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;RunOnlyIfIdle&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;false&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;RunOnlyIfIdle&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;DisallowStartOnRemoteAppSession&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;false&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;DisallowStartOnRemoteAppSession&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;UseUnifiedSchedulingEngine&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;false&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;UseUnifiedSchedulingEngine&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;WakeToRun&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;false&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;WakeToRun&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;ExecutionTimeLimit&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;P3D&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;ExecutionTimeLimit&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Priority&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;7&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Priority&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;  &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Settings&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;  &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Actions&lt;/span&gt;&lt;span style="color:#0000ff"&gt; &lt;/span&gt;&lt;span style="color:#ff0000"&gt;Context&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff"&gt;Author&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Exec&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;      &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Command&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;powershell&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Command&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;      &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Arguments&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;-command &amp;quot;&lt;span style="color:#ff0000"&gt;&amp;amp;amp;&lt;/span&gt; &amp;#39;C:&amp;#92;my scripts&amp;#92;undeployAzureService.ps1&amp;#39;&amp;quot; -servicename &amp;quot;MyService&amp;quot; -thumbprint &amp;quot;5643060E8F0029FB8C6DB76AAE905C7FA697&amp;quot; -subscriptionid &amp;quot;00000000-0000-0000-0000-000000000000&amp;quot; -slot &amp;quot;Production&amp;quot; &lt;span style="color:#ff0000"&gt;&amp;amp;gt;&lt;/span&gt; log.txt&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Arguments&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;      &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;WorkingDirectory&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;C:&amp;#92;deployments&amp;#92;logs&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;WorkingDirectory&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Exec&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;  &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Actions&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Task&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;
Then do the same for the deployment process. A respective Windows Powershell script could look like this: 

&lt;p&gt;&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;lt;#&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    .Synopsis&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        Will deploy and start a Windows Azure Service&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    .Description&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        Will deploy and start a Windows Azure Service        &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    .Parameter servicename&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        The name of the Azure service that will hold the deployment&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    .Parameter thumbprint&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        The thumbprint of a locally installed and valid certificate &lt;span style="color: #0000ff"&gt;for&lt;/span&gt; accessing&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        the Windows Azure Management Service&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    .Parameter subscriptionid&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        The ID &lt;span style="color: #0000ff"&gt;for&lt;/span&gt; the subscription of the Azure Account hosting the respective service&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    .Parameter slot&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        The deployment slot &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; which the package shall be deployed &amp;lt;Production | Staging&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    .Parameter storageservicename&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        The storage account that can be used to upload the deployment package&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    .Parameter package&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        The full qualified path to the deployment package&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    .Parameter config&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        The full qualified path to the configuration file &lt;span style="color: #0000ff"&gt;for&lt;/span&gt; &lt;span style="color: #0000ff"&gt;this&lt;/span&gt; deployment&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    .Example&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        deployAzureService.ps1 -servicename &lt;span style="color: #006080"&gt;&amp;quot;MyService&amp;quot;&lt;/span&gt; -thumbprint &lt;span style="color: #006080"&gt;&amp;quot;5643060E8F0029FB8C6DB76AAE905C7FA697&amp;quot;&lt;/span&gt; -subscriptionid &lt;span style="color: #006080"&gt;&amp;quot;00000000-0000-0000-0000-000000000000&amp;quot;&lt;/span&gt; -slot &lt;span style="color: #006080"&gt;&amp;quot;Production&amp;quot;&lt;/span&gt; -storageservicename &lt;span style="color: #006080"&gt;&amp;quot;StorageService&amp;quot;&lt;/span&gt; -package &lt;span style="color: #006080"&gt;&amp;quot;C:\deployment\HelloWorld.cspkg&amp;quot;&lt;/span&gt; -config &lt;span style="color: #006080"&gt;&amp;quot;C:\deployments\ServiceConfiguration.cscfg&amp;quot;&lt;/span&gt; -label &lt;span style="color: #006080"&gt;&amp;quot;MyFirstDeployment&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;#&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;param([PARAMETER(Mandatory=$&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;)][&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$servicename, [PARAMETER(Mandatory=$&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;)][&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$thumbprint, [PARAMETER(Mandatory=$&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;)][&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$subscriptionid, [PARAMETER(Mandatory=$&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;)][&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$slot, [PARAMETER(Mandatory=$&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;)][&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$storageservicename, [PARAMETER(Mandatory=$&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;)][&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$package, [PARAMETER(Mandatory=$&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;)][&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$config, [PARAMETER(Mandatory=$&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;)][&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$label)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;if&lt;/span&gt;(!($snapin = Get-PSSnapin AzureManagementToolsSnapIn -erroraction silentlycontinue))&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    Write-Host &lt;span style="color: #006080"&gt;&amp;quot;Adding ManagementTools SnapIn...please wait&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    Add-PSSnapin AzureManagementToolsSnapIn&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;$cert = Get-Item cert:\CurrentUser\My\$thumbprint&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;$service = Get-HostedService $servicename -Certificate $cert -SubscriptionId $subscriptionid&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;if&lt;/span&gt;($service)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    $deployment = Get-Deployment -Slot $slot -ServiceName $servicename -SubscriptionId $subscriptionid -Certificate $cert -erroraction silentlycontinue&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    $name = $deployment.Name&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt;(!$deployment.Name)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        Write-Host &lt;span style="color: #006080"&gt;&amp;quot;Creating new deployment...please wait&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        New-Deployment -Slot $slot -ServiceName $servicename -SubscriptionId $subscriptionid -Certificate $cert -Package $package -Configuration $config -Label $label -StorageServiceName $storageservicename |&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        Get-OperationStatus -WaitToComplete&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        Write-Host &lt;span style="color: #006080"&gt;&amp;quot;Starting the new deployment...please wait&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        Get-Deployment -Slot $slot -ServiceName $servicename -SubscriptionId $subscriptionid -Certificate $cert |&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        Set-DeploymentStatus &lt;span style="color: #006080"&gt;&amp;quot;Running&amp;quot;&lt;/span&gt; |&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        Get-OperationStatus -WaitToComplete&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    } &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        Write-Host &lt;span style="color: #006080"&gt;&amp;quot;Service $servicename already has an active deployment with the name $name...please remove the active deployment first&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;} &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    Write-Host &lt;span style="color: #006080"&gt;&amp;quot;No service found with the name $servicename&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;And the template for the scheduler could look like this:&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;
  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:d7f794c5-e406-4553-a489-051f7094c461" class="wlWriterEditableSmartContent"&gt;
&lt;div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"&gt;
&lt;div style="background: #fff; max-height: 300px; overflow: auto"&gt;
&lt;ol style="background: #ffffff; margin: 0; padding: 0 0 0 5px; white-space: nowrap"&gt;
&lt;li&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color:#a31515"&gt;xml&lt;/span&gt;&lt;span style="color:#0000ff"&gt; &lt;/span&gt;&lt;span style="color:#ff0000"&gt;version&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff"&gt;1.0&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff"&gt; &lt;/span&gt;&lt;span style="color:#ff0000"&gt;encoding&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff"&gt;UTF-16&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff"&gt;?&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Task&lt;/span&gt;&lt;span style="color:#0000ff"&gt; &lt;/span&gt;&lt;span style="color:#ff0000"&gt;version&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff"&gt;1.2&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff"&gt; &lt;/span&gt;&lt;span style="color:#ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff"&gt;http://schemas.microsoft.com/windows/2004/02/mit/task&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;  &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;RegistrationInfo&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Date&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;2010-02-15T09:50:14.2255756&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Date&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Author&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;[userid]&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Author&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;  &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;RegistrationInfo&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;  &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Triggers&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;CalendarTrigger&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;      &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;StartBoundary&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;2010-02-15T07:00:00&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;StartBoundary&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;      &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Enabled&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;true&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Enabled&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;      &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;ScheduleByDay&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;        &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;DaysInterval&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;1&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;DaysInterval&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;      &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;ScheduleByDay&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;CalendarTrigger&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;  &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Triggers&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;  &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Principals&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Principal&lt;/span&gt;&lt;span style="color:#0000ff"&gt; &lt;/span&gt;&lt;span style="color:#ff0000"&gt;id&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff"&gt;Author&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;      &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;UserId&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;[userid]&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;UserId&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;      &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;LogonType&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;Password&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;LogonType&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;      &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;RunLevel&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;HighestAvailable&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;RunLevel&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Principal&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;  &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Principals&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;  &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Settings&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;MultipleInstancesPolicy&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;IgnoreNew&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;MultipleInstancesPolicy&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;DisallowStartIfOnBatteries&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;false&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;DisallowStartIfOnBatteries&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;StopIfGoingOnBatteries&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;true&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;StopIfGoingOnBatteries&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;AllowHardTerminate&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;true&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;AllowHardTerminate&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;StartWhenAvailable&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;false&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;StartWhenAvailable&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;RunOnlyIfNetworkAvailable&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;false&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;RunOnlyIfNetworkAvailable&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;IdleSettings&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;      &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;StopOnIdleEnd&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;true&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;StopOnIdleEnd&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;      &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;RestartOnIdle&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;false&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;RestartOnIdle&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;IdleSettings&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;AllowStartOnDemand&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;true&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;AllowStartOnDemand&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Enabled&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;true&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Enabled&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Hidden&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;false&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Hidden&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;RunOnlyIfIdle&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;false&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;RunOnlyIfIdle&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;WakeToRun&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;false&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;WakeToRun&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;ExecutionTimeLimit&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;P3D&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;ExecutionTimeLimit&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Priority&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;7&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Priority&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;  &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Settings&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;  &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Actions&lt;/span&gt;&lt;span style="color:#0000ff"&gt; &lt;/span&gt;&lt;span style="color:#ff0000"&gt;Context&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff"&gt;Author&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Exec&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;      &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Command&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;powershell&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Command&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;      &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Arguments&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;-command &amp;quot;&lt;span style="color:#ff0000"&gt;&amp;amp;amp;&lt;/span&gt; &amp;#39;C:&amp;#92;My Scripts&amp;#92;deployAzureService.ps1&amp;#39;&amp;quot; -servicename &amp;quot;MyService&amp;quot; -thumbprint &amp;quot;5643060E8F0029FB8C6DB76AAE905C7FA697&amp;quot; -subscriptionid &amp;quot;00000000-0000-0000-0000-000000000000&amp;quot; -slot &amp;quot;Production&amp;quot; -storageservicename &amp;quot;mystorageservice&amp;quot; -package &amp;quot;&amp;#39;C:&amp;#92;deployments&amp;#92;packages&amp;#92;HelloWorld.cspkg&amp;#39;&amp;quot; -config &amp;quot;&amp;#39;C:&amp;#92;deployments&amp;#92;packages&amp;#92;ServiceConfiguration.cscfg&amp;#39;&amp;quot; -label &amp;quot;MyFirstDeployment&amp;quot; &lt;span style="color:#ff0000"&gt;&amp;amp;gt;&lt;/span&gt; deployment.log&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Arguments&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;      &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;WorkingDirectory&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;C:&amp;#92;deployments&amp;#92;packages&amp;#92;logs&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;WorkingDirectory&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Exec&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;  &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Actions&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Task&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&lt;!-- Start Add Social Bookmark Buttons - small buttons - blogknowhow.blogspot.com --&gt;&lt;/p&gt;

&lt;p&gt;This is all to automate your deployment tasks. One thing however is to remember here. As the New-Deployment commandlet uploads your deployment package into the blob storage of the specified Azure Storage account you should check your blob storage from time and do a clean up otherwise this will also produce unnecessary cost.&lt;/p&gt;

&lt;p&gt;&lt;a style="text-decoration: none" title="Bookmark to: Digg" onclick="window.open(&amp;#39;http://digg.com/submit?phase=2&amp;amp;url=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;bodytext=&amp;amp;tags=&amp;amp;title=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://digg.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Digg" border="0" name="Digg" alt="Bookmark Digg" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0FwVnXcQI/AAAAAAAABf8/8t8jUbCOQN0/s200/digg.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Del.icio.us" onclick="window.open(&amp;#39;http://del.icio.us/post?v=2&amp;amp;url=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;notes=&amp;amp;tags=&amp;amp;title=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://del.icio.us/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Delicious" border="0" name="Delicious" alt="Bookmark Del.icio.us" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0FmrXO-vI/AAAAAAAABf0/gK0oKdOJzMM/s200/delicious.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Facebook" onclick="window.open(&amp;#39;http://www.facebook.com/sharer.php?u=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;t=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://www.facebook.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Facebook" border="0" name="Facebook" alt="Bookmark Facebook" src="http://1.bp.blogspot.com/_vLeiVavkV_M/Sn0F1uQ7P_I/AAAAAAAABgE/zESf9tLZOtw/s200/facebook.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Reddit" onclick="window.open(&amp;#39;http://reddit.com/submit?url=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;title=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://reddit.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Reddit" border="0" name="Reddit" alt="Bookmark Reddit" src="http://3.bp.blogspot.com/_vLeiVavkV_M/Sn0GDJUzotI/AAAAAAAABgU/qAA0KjdLgF8/s200/reddit.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: StumbleUpon" onclick="window.open(&amp;#39;http://www.stumbleupon.com/submit?url=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;title=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://www.stumbleupon.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="StumbleUpon" border="0" name="StumbleUpon" alt="Bookmark StumbleUpon" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0GJ5NxMRI/AAAAAAAABgc/zaraJzCuyXI/s200/stumbleupon.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Yahoo" onclick="window.open(&amp;#39;http://myweb2.search.yahoo.com/myresults/bookmarklet?t=&amp;#39;+encodeURIComponent(document.title)+&amp;#39;&amp;amp;d=&amp;amp;tag=&amp;amp;u=&amp;#39;+encodeURIComponent(location.href));return false;" href="http://www.yahoo.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Yahoo" border="0" name="Yahoo" alt="Bookmark Yahoo" src="http://2.bp.blogspot.com/_vLeiVavkV_M/Sn0GdCPWuUI/AAAAAAAABg0/-tjcrdMnRkA/s200/yahoo.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Google" onclick="window.open(&amp;#39;http://www.google.com/bookmarks/mark?op=add&amp;amp;bkmk=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;annotation=&amp;amp;labels=&amp;amp;title=&amp;#39;+encodeURIComponent(document.title));return false;" href="http://www.google.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Google" border="0" name="Google" alt="Bookmark Google" src="http://3.bp.blogspot.com/_vLeiVavkV_M/Sn0F7200sZI/AAAAAAAABgM/ivmXOn18EZA/s200/google.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Bookmark to: Technorati" onclick="window.open(&amp;#39;http://technorati.com/faves?add=&amp;#39;+encodeURIComponent(location.href)+&amp;#39;&amp;amp;tag=&amp;#39;);return false;" href="http://www.technorati.com/" rel="nofollow"&gt;&lt;img style="padding-bottom: 1px" id="Technorati" border="0" name="Technorati" alt="Bookmark Technorati" src="http://4.bp.blogspot.com/_vLeiVavkV_M/Sn0GRQk71JI/AAAAAAAABgk/AT5wC4ZYB8g/s200/technorati.png" /&gt; &lt;/a&gt;&lt;a style="text-decoration: none" title="Twitter" onclick=" window.open(&amp;#39;http://twitter.com/home?status=&amp;#39;+encodeURIComponent(document.title)+&amp;#39;%20&amp;#39;+encodeURIComponent(location.href)); return false;" href="http://twitter.com/" rel="nofollow" target="_Blank"&gt;&lt;img style="padding-bottom: 1px" id="Twitter" border="0" name="Twitter" alt="Bookmark Twitter" src="http://2.bp.blogspot.com/_vLeiVavkV_M/Sn0GYqWEWAI/AAAAAAAABgs/8715Vd67VtA/s200/twitter.png" /&gt; &lt;/a&gt;&lt;!-- End Add Social Bookmark Buttons - small buttons - blogknowhow.blogspot.com --&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9963516" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/Tips/">Tips</category><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/Windows+Azure/">Windows Azure</category><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/Powershell/">Powershell</category></item><item><title>Tales About Working With The Azure Service Management API – Chapter I</title><link>http://blogs.msdn.com/b/astrauss/archive/2010/01/28/tales-about-working-with-the-azure-service-management-api-chapter-i.aspx</link><pubDate>Thu, 28 Jan 2010 19:03:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9954853</guid><dc:creator>Alex Strauss</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/astrauss/rsscomments.aspx?WeblogPostID=9954853</wfw:commentRss><comments>http://blogs.msdn.com/b/astrauss/archive/2010/01/28/tales-about-working-with-the-azure-service-management-api-chapter-i.aspx#comments</comments><description>&lt;P&gt;For enterprises, power users and people who simply don’t like the Azure administration portal but do use Windows Azure as an deployment option for their applications or services it may be desirable to integrate deployment and administration tasks into automatic processes and/or customized tools. To support that Microsoft provides a &lt;A href="http://en.wikipedia.org/wiki/Representational_State_Transfer" target=_blank&gt;REST&lt;/A&gt; based &lt;A href="http://msdn.microsoft.com/en-us/library/ee460799.aspx" target=_blank&gt;Service Management API&lt;/A&gt;. This API is quite comprehensive and allows you to view and alter your deployments, services and storage accounts. In order to secure access to those resources via the API mutual authentication of certificate over a SSL connection is required. In addition also the Subscription-ID of your account is needed as part of the rest URLs to correctly address your resources. While this is by no means a security feature it is recommended to keep this ID a secret, though. But back to the Certificates now. In order to use the service API you need to have a certificate that you associate with your service API. You can do that by using the developer portal and go to the “&lt;EM&gt;Account&lt;/EM&gt;” page and then use the link “&lt;EM&gt;Manage My API Certificates&lt;/EM&gt;”. Then you are able on import A DER encoded binary representation of your certificate (use certmgr.msc on Windows to do so).&lt;/P&gt;
&lt;P&gt;In order to get a certificate for use with the Windows Azure Service Management API there are several possibilities:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create one using the makecert.exe tool which comes with the Windows SDK and also with Visual Studio. How to create a suitable self signed certificate with makecert.exe refer to &lt;A href="http://blogs.msdn.com/windowsazure/archive/2009/09/17/introducing-the-windows-azure-service-management-api.aspx" target=_blank&gt;this blog post&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;Create a self signed certificate using the IIS Management console. Refer to &lt;A href="http://technet.microsoft.com/en-us/library/cc753127%28WS.10%29.aspx" target=_blank&gt;this Technet article&lt;/A&gt; to see how this can be done. &lt;/LI&gt;
&lt;LI&gt;Get a certificate from a Certificate Authority (CA) such as Verisign, GoDaddy, CACert.org, etc. &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;It is to note that:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The certificate doesn’t need to be a server certificate (enhanced key usage: server authentication). A client certificate is necessary (and probably also easier/cheaper to get from your CA). However please be aware that this cannot be used as a SSL certificate for one of your services (which wouldn’t probably be a good idea anyway) &lt;/LI&gt;
&lt;LI&gt;The certificate needs to have at least a 2048 bit key &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Refer to the &lt;A href="http://msdn.microsoft.com/en-us/library/ee460782.aspx" target=_blank&gt;API documentation&lt;/A&gt; for further information.&lt;/P&gt;
&lt;P&gt;No you might ask why do I write all this when this is mostly already documented. Because I got my certificate via the automated process of &lt;A href="http://blogs.msdn.com/astrauss/archive/2007/04/26/hanging-around-in-munich-get-yourself-assured.aspx" target=_blank&gt;CAcert.org&lt;/A&gt;. And in my first try I run into an error that I was not able to get my Service Management API requests authenticated. The service always returned:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Error 403 (Forbidden): The HTTP request was forbidden with client authentication scheme 'Anonymous'&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;I didn’t really understand why this was happening as I was creating the certificate in my code using one of the above mentioned DER encoded binary .cer files which I exported from the management console. Here is the code which is really not that complicated.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV style="PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; DISPLAY: inline; FLOAT: none; PADDING-TOP: 0px" id=scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:4b8efef2-73b4-4505-ac1e-cfa707315ecf class=wlWriterEditableSmartContent&gt;
&lt;DIV style="BORDER-BOTTOM: #000080 1px solid; BORDER-LEFT: #000080 1px solid; FONT-FAMILY: 'Courier New', Courier, Monospace; COLOR: #000; FONT-SIZE: 10pt; BORDER-TOP: #000080 1px solid; BORDER-RIGHT: #000080 1px solid"&gt;
&lt;DIV style="BACKGROUND: #fff; MAX-HEIGHT: 300px; OVERFLOW: auto"&gt;
&lt;OL style="PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; BACKGROUND: #ffffff; PADDING-TOP: 0px"&gt;
&lt;LI&gt;&lt;SPAN style="COLOR: #0000ff"&gt;try&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="BACKGROUND: #f3f3f3"&gt;{&lt;/LI&gt;
&lt;LI&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="COLOR: #2b91af"&gt;X509Certificate&lt;/SPAN&gt; cert = &lt;SPAN style="COLOR: #2b91af"&gt;X509Certificate&lt;/SPAN&gt;.CreateFromCertFile(&lt;SPAN style="COLOR: #a31515"&gt;"AzureCert.cer"&lt;/SPAN&gt;);&lt;/LI&gt;
&lt;LI style="BACKGROUND: #f3f3f3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="COLOR: #2b91af"&gt;HttpWebRequest&lt;/SPAN&gt; req = (&lt;SPAN style="COLOR: #2b91af"&gt;HttpWebRequest&lt;/SPAN&gt;)&lt;SPAN style="COLOR: #2b91af"&gt;WebRequest&lt;/SPAN&gt;.Create(&lt;SPAN style="COLOR: #a31515"&gt;"https://management.core.windows.net/&amp;lt;subscription-id&amp;gt;/services/storageservices"&lt;/SPAN&gt;);&lt;/LI&gt;
&lt;LI&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;req.ClientCertificates.Add(cert);&lt;/LI&gt;
&lt;LI style="BACKGROUND: #f3f3f3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;req.UserAgent = &lt;SPAN style="COLOR: #a31515"&gt;"Azure Cloud Management Studio"&lt;/SPAN&gt;;&lt;/LI&gt;
&lt;LI&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;req.Method = &lt;SPAN style="COLOR: #a31515"&gt;"GET"&lt;/SPAN&gt;;&lt;/LI&gt;
&lt;LI style="BACKGROUND: #f3f3f3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;req.ProtocolVersion = &lt;SPAN style="COLOR: #2b91af"&gt;HttpVersion&lt;/SPAN&gt;.Version11;&lt;/LI&gt;
&lt;LI&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;req.Headers.Add(&lt;SPAN style="COLOR: #a31515"&gt;"x-ms-version"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: #a31515"&gt;"2009-10-01"&lt;/SPAN&gt;);&lt;/LI&gt;
&lt;LI style="BACKGROUND: #f3f3f3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;req.ContentType = &lt;SPAN style="COLOR: #a31515"&gt;"text/xml"&lt;/SPAN&gt;;&lt;/LI&gt;
&lt;LI&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="COLOR: #2b91af"&gt;HttpWebResponse&lt;/SPAN&gt; response = (&lt;SPAN style="COLOR: #2b91af"&gt;HttpWebResponse&lt;/SPAN&gt;)req.GetResponse();&lt;/LI&gt;
&lt;LI style="BACKGROUND: #f3f3f3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;/LI&gt;
&lt;LI&gt;}&lt;/LI&gt;
&lt;LI style="BACKGROUND: #f3f3f3"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;catch&lt;/SPAN&gt; (&lt;SPAN style="COLOR: #2b91af"&gt;Exception&lt;/SPAN&gt; ex)&lt;/LI&gt;
&lt;LI&gt;{&lt;/LI&gt;
&lt;LI style="BACKGROUND: #f3f3f3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;/LI&gt;
&lt;LI&gt;}&lt;/LI&gt;&lt;/OL&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;
&lt;P&gt;After a while of investigating I realized that as I created the .cer file from a certificate string shown outlined in the picture below.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/TalesAboutWorkingWithTheAzureServiceMana_CF4F/certstring_4.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="CAcert install certificate page" border=0 alt="CAcert install certificate page" src="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/TalesAboutWorkingWithTheAzureServiceMana_CF4F/certstring_thumb_1.jpg" width=566 height=484&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;However I did not realize that I’m then missing the private key generation process that included by clicking on the install button and uses ActiveX in Internet Explorer.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;FONT color=#800000&gt;“Your private key is generated by your browser, *IN* your browser when you request a new cert from CAcert. That way CAcert never has your private key in its possession. The implication for you is that you must be on the same machine using the same browser that you used to request the cert initially, when needing to access your private key. So don't forget if it was your "work" machine vs. your "home" machine.”&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Unfortunately I couldn’t get that to work with &lt;A href="http://www.microsoft.com/windows/Internet-explorer/default.aspx" target=_blank&gt;IE8&lt;/A&gt; and &lt;A href="http://www.microsoft.com/windows/default.aspx" target=_blank&gt;Windows 7&lt;/A&gt; what brought me to use the certificate string in the first place. But if you walk down this road and copy that string into a text file, change the file extension to .cer and then install the certificate you will not have a private key associated with this certificate and that’s why the request is failing. In order to have the requests working you need to meet two prerequisites for your certificate:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The certificate needs to be installed in the certificate store of the client machine from where you send the requests to the Service Management API. &lt;/LI&gt;
&lt;LI&gt;The certificate must have an associated private key. &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;For me this meant:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Use Windows 7 XP Mode and IE6 ;) to issue a new certificate request to CACert.org &lt;/LI&gt;
&lt;LI&gt;Install the certificate from the CAcert.org website using the same browser in the same XP Mode instance &lt;/LI&gt;
&lt;LI&gt;Export the certificate as a Personal Information Exchange (PKCS#12) file including the private key (note that such file have an .pfx file extension) &lt;/LI&gt;
&lt;LI&gt;Import the the certificate on the Windows 7 system used to work with the Service Management API &lt;/LI&gt;
&lt;LI&gt;Make sure that the private key is available &lt;BR&gt;&lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/TalesAboutWorkingWithTheAzureServiceMana_CF4F/cert1_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="Ensure there is a private key" border=0 alt="Ensure there is a private key" src="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/TalesAboutWorkingWithTheAzureServiceMana_CF4F/cert1_thumb.jpg" width=304 height=383&gt;&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;Export the certificate again as a DER encoded binary .cer file (this time make sure that the private key is not exported 1. because you don’t need it on the Azure side and 2. you wouldn’t be able to create a .cer file) &lt;BR&gt;&lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/TalesAboutWorkingWithTheAzureServiceMana_CF4F/cert2_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="Do not export the private key" border=0 alt="Do not export the private key" src="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/TalesAboutWorkingWithTheAzureServiceMana_CF4F/cert2_thumb.jpg" width=304 height=276&gt;&lt;/A&gt; &lt;A href="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/TalesAboutWorkingWithTheAzureServiceMana_CF4F/cert3_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="Export as DER encoded binary" border=0 alt="Export as DER encoded binary" src="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/TalesAboutWorkingWithTheAzureServiceMana_CF4F/cert3_thumb.jpg" width=304 height=276&gt;&lt;/A&gt; &lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Import the .cer file with the Azure Management Console &lt;BR&gt;&lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/TalesAboutWorkingWithTheAzureServiceMana_CF4F/AzureCertPortal_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="Azure Devloper Portal" border=0 alt="Azure Devloper Portal" src="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/TalesAboutWorkingWithTheAzureServiceMana_CF4F/AzureCertPortal_thumb.jpg" width=404 height=291&gt;&lt;/A&gt;&amp;nbsp; &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;After all those steps I was able to issue successful requests with my own code as well as available tools to interact with the Windows Azure Service Management API such as &lt;A href="http://code.msdn.microsoft.com/windowsazuresamples" target=_blank&gt;csmanage.exe&lt;/A&gt; or the &lt;A href="http://go.microsoft.com/fwlink/?LinkID=151321" target=_blank&gt;PowerShell&lt;/A&gt; &lt;A href="http://code.msdn.microsoft.com/azurecmdlets" target=_blank&gt;Windows Azure Service Management CmdLets&lt;/A&gt;. However just to note it again this only works because the certificate is actually also installed in the certificate store where the .Net Cryptographic API does a lookup of the certificate and its corresponding private key. You can verify this if you import the certificate in step 4 above to prompt you if an application tries to use the private key of this certificate.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/TalesAboutWorkingWithTheAzureServiceMana_CF4F/cert4_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="Permission required to use the private key" border=0 alt="Permission required to use the private key" src="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/TalesAboutWorkingWithTheAzureServiceMana_CF4F/cert4_thumb.jpg" width=344 height=174&gt;&lt;/A&gt;&lt;/P&gt;
&lt;TABLE class=class border=0 cellSpacing=0 cellPadding=2 width=600 class="class"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=class width=70 class="class"&gt;&lt;A href="http://digg.com/submit?phase=2&amp;amp;http://blogs.msdn.com/astrauss/archive/2010/01/28/tales-about-working-with-the-azure-service-management-api-chapter-i.aspx" mce_href="http://digg.com/submit?phase=2&amp;amp;http://blogs.msdn.com/astrauss/archive/2010/01/28/tales-about-working-with-the-azure-service-management-api-chapter-i.aspx"&gt;&lt;IMG src="http://digg.com/img/digg-it-tiny.gif" mce_src="http://digg.com/img/digg-it-tiny.gif"&gt;&lt;/A&gt;&lt;/TD&gt;
&lt;TD class=class width=190 class="class"&gt;&lt;IMG alt=Delicious src="http://static.delicious.com/img/delicious.small.gif" width=15 height=15&gt;&lt;A style="FONT-SIZE: 8pt" onclick="window.open('http://delicious.com/save?v=5&amp;amp;noui&amp;amp;jump=close&amp;amp;url='+encodeURIComponent(location.href)+'&amp;amp;title='+encodeURIComponent(document.title), 'delicious','toolbar=no,width=550,height=550'); return false;" href="http://delicious.com/save"&gt;Bookmark this on Delicious&lt;/A&gt;&lt;/TD&gt;
&lt;TD class=class width=150 class="class"&gt;
&lt;SCRIPT&gt;




function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&amp;t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}&lt;/SCRIPT&gt;

&lt;STYLE&gt;








html .fb_share_button {
	border-right: #d8dfea 1px solid; padding-right: 20px; border-top: #d8dfea 1px solid; display: inline-block; padding-left: 5px; background: url(http://static.ak.facebook.com/images/share/facebook_share_icon.gif?6:26981) no-repeat right top; padding-bottom: 0px; border-left: #d8dfea 1px solid; padding-top: 1px; border-bottom: #d8dfea 1px solid; height: 15px
}
html .fb_share_button:hover {
	border-left-color: #295582; background: url(http://static.ak.facebook.com/images/share/facebook_share_icon.gif?6:26981) #3b5998 no-repeat right top; border-bottom-color: #295582; color: #fff; border-top-color: #295582; text-decoration: none; border-right-color: #295582
}&lt;/STYLE&gt;
&lt;A style="TEXT-DECORATION: none" class=fb_share_button onclick="return fbs_click()" href="http://www.facebook.com/share.php?u=%3Curl%3E" rel=nofollow target=_blank&gt;Share&lt;/A&gt;&lt;/TD&gt;
&lt;TD class=class width=150 class="class"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9954853" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/Tips/">Tips</category><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/Security/">Security</category><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/Internet+Explorer+8/">Internet Explorer 8</category><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/Windows+Azure/">Windows Azure</category><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/Powershell/">Powershell</category></item><item><title>DHL Shipment Tracking Accelerator for IE8</title><link>http://blogs.msdn.com/b/astrauss/archive/2009/11/10/dhl-shipment-tracking-accelerator-for-ie8.aspx</link><pubDate>Tue, 10 Nov 2009 13:41:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9920133</guid><dc:creator>Alex Strauss</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/astrauss/rsscomments.aspx?WeblogPostID=9920133</wfw:commentRss><comments>http://blogs.msdn.com/b/astrauss/archive/2009/11/10/dhl-shipment-tracking-accelerator-for-ie8.aspx#comments</comments><description>&lt;P&gt;Today it’s going to be a short and extremely non technical post however I thought this may be of interest to some of you. I had some spare time and was waiting for DHL to deliver my copy of &lt;A href="http://dragonage.bioware.com/" target=_blank&gt;Dragon Age: Origins&lt;/A&gt;. So I consulted the DHL tracking system quite a few times. And because I found it quite annoying to copy and paste the shipment number out of the Amazon UK webpage into the tracking system on the DHL website I decided to quickly create a DHL Shipment Tracking Accelerator. Although many ecommerce shops already provide links to the tracking system there are still quite a few that don’t. So I think this provides at least some value.&lt;/P&gt;
&lt;P&gt;Here’s a little screenshot of the preview. Luckily DHL designed the page so that at least some relevant info is presented within the preview. To get full fidelity however you can hit the mouse button on the accelerator menu item to go to the full page.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/DHLShipmentTrackingAcceleratorforIE8_CCB4/screen1_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="DHL Accelerator Preview Screenshot" border=0 alt="DHL Accelerator Preview Screenshot" src="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/DHLShipmentTrackingAcceleratorforIE8_CCB4/screen1_thumb.jpg" width=644 height=378&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;If you want to add the accelerator yourself…here you go. I provide a English and a German version.&lt;/P&gt;
&lt;TABLE style="BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;BUTTON id=dhl_de_Btn onclick="window.external.AddService('http://www.level70.de/ie/accelerators/dhl/dhl_tracking_de.xml')"&gt;DHL Tracking dem Internet Explorer 8 hinzufügen&lt;/BUTTON&gt; &lt;/TD&gt;
&lt;TD&gt;&lt;BUTTON id=dhl_en_Btn onclick="window.external.AddService('http://www.level70.de/ie/accelerators/dhl/dhl_tracking_en.xml')"&gt;Add DHL tracking to Internet Explorer 8&lt;/BUTTON&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;TABLE class=class border=0 cellSpacing=0 cellPadding=2 width=600 class="class"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=class width=70 class="class"&gt;&lt;A href="http://digg.com/submit?phase=2&amp;amp;http://blogs.msdn.com/astrauss/archive/2009/11/10/dhl-shipment-tracking-accelerator-for-ie8.aspx" mce_href="http://digg.com/submit?phase=2&amp;amp;http://blogs.msdn.com/astrauss/archive/2009/11/10/dhl-shipment-tracking-accelerator-for-ie8.aspx"&gt;&lt;IMG src="http://digg.com/img/digg-it-tiny.gif" mce_src="http://digg.com/img/digg-it-tiny.gif"&gt;&lt;/A&gt;&lt;/TD&gt;
&lt;TD class=class width=190 class="class"&gt;&lt;IMG alt=Delicious src="http://static.delicious.com/img/delicious.small.gif" width=15 height=15&gt;&lt;A style="FONT-SIZE: 8pt" onclick="window.open('http://delicious.com/save?v=5&amp;amp;noui&amp;amp;jump=close&amp;amp;url='+encodeURIComponent(location.href)+'&amp;amp;title='+encodeURIComponent(document.title), 'delicious','toolbar=no,width=550,height=550'); return false;" href="http://delicious.com/save"&gt;Bookmark this on Delicious&lt;/A&gt;&lt;/TD&gt;
&lt;TD class=class width=150 class="class"&gt;
&lt;SCRIPT&gt;




function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&amp;t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}&lt;/SCRIPT&gt;

&lt;STYLE&gt;





html .fb_share_button {
	border-right: #d8dfea 1px solid; padding-right: 20px; border-top: #d8dfea 1px solid; display: inline-block; padding-left: 5px; background: url(http://static.ak.facebook.com/images/share/facebook_share_icon.gif?6:26981) no-repeat right top; padding-bottom: 0px; border-left: #d8dfea 1px solid; padding-top: 1px; border-bottom: #d8dfea 1px solid; height: 15px
}
html .fb_share_button:hover {
	border-left-color: #295582; background: url(http://static.ak.facebook.com/images/share/facebook_share_icon.gif?6:26981) #3b5998 no-repeat right top; border-bottom-color: #295582; color: #fff; border-top-color: #295582; text-decoration: none; border-right-color: #295582
}&lt;/STYLE&gt;
&lt;A style="TEXT-DECORATION: none" class=fb_share_button onclick="return fbs_click()" href="http://www.facebook.com/share.php?u=%3Curl%3E" rel=nofollow target=_blank&gt;Share&lt;/A&gt;&lt;/TD&gt;
&lt;TD class=class width=150 class="class"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9920133" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/Tips/">Tips</category><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/User+Experience/">User Experience</category><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/Internet+Explorer+8/">Internet Explorer 8</category><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/Quick+Wins/">Quick Wins</category></item><item><title>Installing IEAK IN A VPC without Disk Space Determination</title><link>http://blogs.msdn.com/b/astrauss/archive/2009/10/14/installing-ieak-in-a-vpc-without-disk-space-determination.aspx</link><pubDate>Wed, 14 Oct 2009 10:48:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9907088</guid><dc:creator>Alex Strauss</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/astrauss/rsscomments.aspx?WeblogPostID=9907088</wfw:commentRss><comments>http://blogs.msdn.com/b/astrauss/archive/2009/10/14/installing-ieak-in-a-vpc-without-disk-space-determination.aspx#comments</comments><description>&lt;p&gt;If you try to install the &lt;a href="http://technet.microsoft.com/en-us/ie/cc889351.aspx" target="_blank"&gt;Internet Explorer Administration Kit&lt;/a&gt; on a &lt;a href="http://www.microsoft.com/windows/virtual-pc/" target="_blank"&gt;Virtual PC&lt;/a&gt; image you may have probably encountered the following situation&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/InstallingIEAKINAVPCwithoutDiskSpaceDete_B070/disk_space_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="disk_space" border="0" alt="disk_space" src="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/InstallingIEAKINAVPCwithoutDiskSpaceDete_B070/disk_space_thumb.jpg" width="244" height="100" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The box shown above appears and stays there forever. The only option you have is to click the “Return” button and cancel the installation process. But as you may still want to have this piece of software installed on your virtual pc you are pretty much stuck here. However there is at least still one possibility to install the .msi package. That is by using the &lt;a href="http://technet.microsoft.com/en-us/library/cc759262(WS.10).aspx" target="_blank"&gt;msiexec.exe&lt;/a&gt; tool with the quiet or passive option. So after opening a Command Window (eventually as Administrator) you can use the following command line to silently install the IEAK install image:&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;msiexec /quiet /i &amp;lt;PATH&amp;gt;\ieak.msi&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;This will install the package and it will be available for use. However there is one problem with this approach. In the GUI you need to choose a license type from three options (Internet Service Provider (ISP), Internet Content Provider (ICP) and Corporate). With the above method you cannot do that and therefore the product is installed with the default license which obviously is the ISP license. Implication of this is that there are certain features enabled or disabled in IEAK depending on the license mode. So if you need the ICP or the Corporate mode you are stuck again. However as a quick hack you can modify one (or better) two registry key in order to adapt IEAK to your needs and requirements.&lt;/p&gt;

&lt;p&gt;You need to go to:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IEAK&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;And then there are the two string values which you can modify:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;font size="2" face="Courier New"&gt;Mode: &amp;lt;0|1|2&amp;gt;&lt;/font&gt;&lt;/em&gt; where 0 is ISP, 1 is ICP and 2 is Corporate&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Courier New"&gt;&lt;em&gt;Organization Name&lt;/em&gt;&lt;/font&gt;: Which is the name that gets inserted in certain UI areas of IE and which probably has also some legal meaning with respect to licensing.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;So finally it will look something like this which is the correct setting for your requirements and you then are ready to start creating custom IE8 packages.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/InstallingIEAKINAVPCwithoutDiskSpaceDete_B070/ieak_reg_4.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="ieak_reg" border="0" alt="ieak_reg" src="http://blogs.msdn.com/blogfiles/astrauss/WindowsLiveWriter/InstallingIEAKINAVPCwithoutDiskSpaceDete_B070/ieak_reg_thumb_1.jpg" width="644" height="182" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9907088" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/Tips/">Tips</category><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/Internet+Explorer+8/">Internet Explorer 8</category><category domain="http://blogs.msdn.com/b/astrauss/archive/tags/IEAK/">IEAK</category></item></channel></rss>