<?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>mstehle: The CDOs and CDONTS of Messaging Development : Exchange General</title><link>http://blogs.msdn.com/mstehle/archive/tags/Exchange+General/default.aspx</link><description>Tags: Exchange General</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Exchange API Team Blog: Exchange Impersonation vs. Delegate Access…</title><link>http://blogs.msdn.com/mstehle/archive/2009/06/16/exchange-api-team-blog-exchange-impersonation-vs-delegate-access.aspx</link><pubDate>Tue, 16 Jun 2009 17:34:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9762435</guid><dc:creator>mstehle</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/9762435.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=9762435</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=9762435</wfw:comment><description>&lt;p&gt;The Exchange API team has a new &lt;a href="http://blogs.msdn.com/exchangedev/archive/2009/06/15/exchange-impersonation-vs-delegate-access.aspx"&gt;post&lt;/a&gt; to explaining the differences between using Exchange Impersonation vs. Delegate Access to access an Exchange mailbox using Exchange Web Services.&amp;#160; I’ve seen first hand that there is a gap in understanding the difference between the two and when to use one versus the other.&amp;#160; This post goes a long way to address some of the confusion.&lt;/p&gt;  &lt;p&gt;An important note that some people miss is the differentiation between Windows and Exchange impersonation – they’re not the same thing and more importantly, they aren’t even related…&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“Exchange Impersonation is different than Windows Impersonation. Windows Impersonation is an operating system concept that requires you to set Kerberos constrained delegation. Exchange Impersonation is a simpler authorization mechanism that is designed for use only within Exchange Web Services (EWS). For more information about Windows Impersonation, see &lt;/em&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa376391(VS.85).aspx"&gt;&lt;em&gt;Client Impersonation&lt;/em&gt;&lt;/a&gt;&lt;em&gt; on MSDN.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Conversely, the posts describes delegate access as…&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“Delegate access is used in scenarios in which there needs to be a one-to-one relationship between users. One common application of delegate access is the sharing of calendars between users, such as when an admin manages an executive’s calendar, or a when handful of individuals working on a project need to coordinate calendars…&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;…Individual users can grant and remove delegate access to their own mailboxes through several mailbox clients, such as Microsoft Outlook, Outlook Web Access, or Exchange Web Services-based clients. A mailbox owner does not need administrator rights to grant another user delegate access to their mailbox.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;…To be clear, delegate access &lt;u&gt;can&lt;/u&gt; be granted by an administrator on an entire mailbox (but not to specific folders within the mailbox) using the &lt;a href="http://technet.microsoft.com/en-us/library/bb124097.aspx"&gt;Add-MailboxPermission&lt;/a&gt; cmdlet but as the above statement points out individuals can also grant delegate access for other users to access specific folders in their mailbox or the entire mailbox.&lt;/p&gt;  &lt;p&gt;A major difference between impersonation and delegation is that as far as Exchange Web Services and Outlook Web Access are concerned there is no way to assign a single delegate access to multiple mailboxes expect by establishing the delegate relationship for each individual mailbox.&amp;#160; I’ve talked about this &lt;a href="http://blogs.msdn.com/mstehle/archive/2007/09/07/kb-exchange-web-services-does-not-honor-inherited-permissions-from-server-level-objects.aspx"&gt;before&lt;/a&gt;, the Exchange team describes it this way…&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“For delegate access, there is no option to set up a single delegate for multiple mailboxes. A relationship must be established for each user who needs to access a given mailbox…&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;…You must explicitly grant delegate access for any new users who are added.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;…This is a great post and a worthwhile read but from working with many customers to help them understand these concepts, I’d like to add some additional information and emphasize some key points…&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Understanding the Requests&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;To emphasize a side point in the blog post there are &lt;u&gt;three&lt;/u&gt; methods of mailbox to access a mailbox: Exchange Impersonation, Delegate Access, and Direct Logon.&amp;#160; The article doesn’t provide examples of what the XML looks like in each type of access request using Exchange Web Services.&amp;#160; For understanding, I’ve provided them below…&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;Direct Logon&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&amp;lt;GetFolder&amp;gt;     &lt;br /&gt;&amp;#160; &amp;lt;FolderShape&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;t:BaseShape&amp;gt;AllProperties&amp;lt;/t:BaseShape&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;/FolderShape&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;FolderIds&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;t:DistinguishedFolderId Id=&amp;quot;inbox&amp;quot;/&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;/FolderIds&amp;gt;      &lt;br /&gt;&amp;lt;/GetFolder&amp;gt; &lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Delegate Access&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&amp;lt;GetFolder&amp;gt;     &lt;br /&gt;&amp;#160; &amp;lt;FolderShape&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;t:BaseShape&amp;gt;AllProperties&amp;lt;/t:BaseShape&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;/FolderShape&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;FolderIds&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;t:DistinguishedFolderId Id=&amp;quot;inbox&amp;quot;&amp;gt;      &lt;br /&gt;&lt;font color="#ff0000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;t:Mailbox&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;t:EmailAddress&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;a href="mailto:someoneelse@contoso.com"&gt;&lt;font color="#ff0000"&gt;someoneelse@contoso.com&lt;/font&gt;&lt;/a&gt;      &lt;br /&gt;&lt;font color="#ff0000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/t:EmailAddress&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/t:Mailbox&amp;gt;        &lt;br /&gt;&lt;/font&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/t:DistinguishedFolderId&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;/FolderIds&amp;gt;      &lt;br /&gt;&amp;lt;/GetFolder&amp;gt; &lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Exchange Impersonation&lt;/strong&gt; &lt;/p&gt;    &lt;p&gt;&amp;lt;soap:Header&amp;gt;     &lt;br /&gt;&lt;font color="#ff0000"&gt;&amp;#160; &amp;lt;t:ExchangeImpersonation&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;t:ConnectingSID&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;t:PrimarySmtpAddress&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; someone@contoso.com        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/t:PrimarySmtpAddress&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/t:ConnectingSID&amp;gt;        &lt;br /&gt;&amp;#160; &amp;lt;/t:ExchangeImpersonation&amp;gt;&lt;/font&gt;      &lt;br /&gt;&amp;lt;/soap:Header&amp;gt;      &lt;br /&gt;&amp;lt;soap:Body&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;GetFolder&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;FolderShape&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;t:BaseShape&amp;gt;AllProperties&amp;lt;/t:BaseShape&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/FolderShape&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;FolderIds&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;t:DistinguishedFolderId Id=&amp;quot;inbox&amp;quot;/&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/FolderIds&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;/GetFolder&amp;gt;      &lt;br /&gt;&amp;lt;/soap:Body&amp;gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;…The example above is for &lt;em&gt;explicit&lt;/em&gt; delegate access.&amp;#160; You can also access a mailbox using &lt;em&gt;implicit&lt;/em&gt; delegate access by specifying a FolderId which links to another mailbox.&amp;#160; All Ids returned by EWS embed their mailbox information in them so requesting them without explicitly specifying a mailbox will also work.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Putting It All Together&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The terms used here come from the way Exchange Impersonation (also called &lt;a href="http://msdn.microsoft.com/en-us/library/aa579435.aspx"&gt;Server-to-Server or S2S Authentication&lt;/a&gt;) is explained in the Inside Exchange Web Services book.&amp;#160; The book describes three types of accounts that come into play when accessing a mailbox: the Service account, the Act As account, and the Mailbox account.&amp;#160; Understanding how these accounts are affected by different mailbox access types is important.&amp;#160; The Service account is the account used to generate the XML requests and authenticate to the virtual directory, the Act As account is the account which will be used to authorize actions taken against a mailbox, and the Mailbox account is the actual resource you are trying to access.&amp;#160; In the grid below suppose you have an EWS application which runs as a user called ApplicationAccount, here is how the different access types affect each account context…&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="1112"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="141"&gt;&lt;strong&gt;Access Type&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="146"&gt;&lt;strong&gt;Service Account&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="350"&gt;&lt;strong&gt;Act As Account&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="473"&gt;&lt;strong&gt;Mailbox Account&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="141"&gt;Exchange Impersonation&lt;/td&gt;        &lt;td valign="top" width="146"&gt;ApplicationAccount&lt;/td&gt;        &lt;td valign="top" width="350"&gt;the impersonated account as specified in the &lt;a href="http://msdn.microsoft.com/en-us/library/aa565690.aspx"&gt;ExchangeImpersonation&lt;/a&gt; property of the request&lt;/td&gt;        &lt;td valign="top" width="473"&gt;any mailbox that the &lt;u&gt;Act As account&lt;/u&gt; has mailbox rights to through Add-MailboxPermission or through permissions granted through Outlook, OWA, or EWS directly on a mailbox folder.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="141"&gt;Delegate Access&lt;/td&gt;        &lt;td valign="top" width="146"&gt;ApplicationAccount&lt;/td&gt;        &lt;td valign="top" width="350"&gt;always ApplicationAccount&lt;/td&gt;        &lt;td valign="top" width="473"&gt;any account or mailbox folder that &lt;u&gt;ApplicationAccount&lt;/u&gt; has mailbox rights to through Add-MailboxPermission or through permissions granted through Outlook, OWA, or EWS directly on a mailbox folder.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="141"&gt;Direct Logon&lt;/td&gt;        &lt;td valign="top" width="146"&gt;ApplicationAccount&lt;/td&gt;        &lt;td valign="top" width="350"&gt;always ApplicationAccount&lt;/td&gt;        &lt;td valign="top" width="473"&gt;always ApplicationAccount&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9762435" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+General/default.aspx">Exchange General</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services/default.aspx">Exchange Web Services</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services+Managed+API/default.aspx">Exchange Web Services Managed API</category></item><item><title>FYI: Exchange 2007 SP2 Announced…</title><link>http://blogs.msdn.com/mstehle/archive/2009/06/01/fyi-exchange-2007-sp2-announced.aspx</link><pubDate>Mon, 01 Jun 2009 16:35:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9677573</guid><dc:creator>mstehle</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/9677573.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=9677573</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=9677573</wfw:comment><description>&lt;p&gt;The Exchange team &lt;a href="http://msexchangeteam.com/archive/2009/05/11/451281.aspx"&gt;announced&lt;/a&gt; the upcoming service pack for Exchange 2007 recently.&amp;#160; The primary focus of this service pack is preparing Exchange 2007 for interoperability with Exchange 2010 but there are also fixes and changes to existing components and technologies that make this update worth installing when it comes out.&amp;#160; Here are some developer related points of interest that were announced:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“&lt;b&gt;Exchange Volume Snapshot Backup Functionality &lt;/b&gt;&lt;b&gt;- &lt;/b&gt;A new backup plug-in has been added to the product that will enable customers to create Exchange backups when a backup is invoked through the Windows Server 2008 Backup tool. Exchange Server 2007 didn't have this capability on Windows Server 2008 and additional solutions were required to perform this task.&lt;/p&gt;    &lt;p&gt;&lt;b&gt;Named Properties cmdlets&lt;/b&gt; - SP2 enables Exchange administrators to monitor their named property usage per database.”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;…Both of these are most useful to developers as debugging tools but they are valuable nonetheless.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9677573" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+General/default.aspx">Exchange General</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>FYI: Unlike Exchange 2007, Exchange 2010 will *not* ship a 32-bit version</title><link>http://blogs.msdn.com/mstehle/archive/2009/05/21/fyi-unlike-exchange-2007-exchange-2010-will-not-ship-a-32-bit-version.aspx</link><pubDate>Thu, 21 May 2009 22:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9634182</guid><dc:creator>mstehle</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/9634182.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=9634182</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=9634182</wfw:comment><description>&lt;P&gt;The Exchange team &lt;A href="http://msexchangeteam.com/archive/2009/05/19/451366.aspx" mce_href="http://msexchangeteam.com/archive/2009/05/19/451366.aspx"&gt;announced&lt;/A&gt; that Exchange 2010 will not have a 32-bit version – not even for evaluations.&amp;nbsp; The post focuses on mainly the non-developer related impact of this change.&amp;nbsp; The key points for developers are:&lt;/P&gt;
&lt;P&gt;&amp;gt; Applications that automate Exchange cmdlets locally will need to be compiled for 64-bit.&lt;/P&gt;
&lt;P&gt;&amp;gt; 32-bit or 64-bit applications could leverage the remote Powershell capabilities in Powershell 2.0 to invoke the Exchange cmdlets remotely.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9634182" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/FYI/default.aspx">FYI</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+General/default.aspx">Exchange General</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Management+Shell/default.aspx">Exchange Management Shell</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>Jason Henderson: A Brief History and Exciting Future for Exchange Development</title><link>http://blogs.msdn.com/mstehle/archive/2008/12/12/jason-henderson-a-brief-history-and-exciting-future-for-exchange-development.aspx</link><pubDate>Fri, 12 Dec 2008 18:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9202523</guid><dc:creator>mstehle</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/9202523.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=9202523</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=9202523</wfw:comment><description>&lt;P&gt;&lt;FONT size=2 face=Arial&gt;It took me forever to get around to watching this but this is just a great presentation about Exchange development’s future at PDC.&amp;nbsp; He does a great job of explaining where we’ve been as well…&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/exchangedev/archive/2008/10/15/learn-about-the-exchange-web-services-managed-api-and-how-exchange-is-getting-cloud-ready-at-pdc-08.aspx" target=_blank mce_href="http://blogs.msdn.com/exchangedev/archive/2008/10/15/learn-about-the-exchange-web-services-managed-api-and-how-exchange-is-getting-cloud-ready-at-pdc-08.aspx"&gt;&lt;FONT size=2 face=Arial&gt;Learn about the Exchange Web Services Managed API and how Exchange is getting “Cloud Ready” at PDC’08&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face=Arial&gt;This is an absolute must watch for any Exchange developer!&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9202523" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+General/default.aspx">Exchange General</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services/default.aspx">Exchange Web Services</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services+Managed+API/default.aspx">Exchange Web Services Managed API</category></item><item><title>Take Notice of Exchange Web Service Notifications</title><link>http://blogs.msdn.com/mstehle/archive/2008/07/24/take-notice-of-exchange-web-service-notifications.aspx</link><pubDate>Fri, 25 Jul 2008 00:11:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8770115</guid><dc:creator>mstehle</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/8770115.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=8770115</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=8770115</wfw:comment><description>&lt;p&gt;&lt;font face="Arial" size="2"&gt;The Exchange API-spotting blog, which is run by the &lt;a href="http://msdn.microsoft.com/en-us/exchange/default.aspx"&gt;Exchange MSDN content&lt;/a&gt; and Exchange API product&amp;#160; folks, as a new &lt;a href="http://blogs.msdn.com/exchangedev/archive/2008/07/24/transitioning-to-exchange-web-services-notifications.aspx"&gt;post&lt;/a&gt; about the transition from store event sinks to Exchange Web Service &lt;a href="http://msdn.microsoft.com/en-us/library/aa579128(EXCHG.80).aspx"&gt;notifications&lt;/a&gt;.&amp;#160; The aim is to provide some more detail about &lt;a href="http://msdn.microsoft.com/en-us/library/aa579128(EXCHG.80).aspx"&gt;notifications&lt;/a&gt; and try to directly answer some questions that have been posed by developers about how &lt;a href="http://msdn.microsoft.com/en-us/library/aa579128(EXCHG.80).aspx"&gt;notifications&lt;/a&gt; can realistically replace store event sinks when they &lt;a href="http://blogs.msdn.com/exchangedev/archive/2008/05/22/exchange-developer-roadmap.aspx"&gt;go away&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font face="Arial" size="2"&gt;...If you have feedback for the product team about the transition or any scenarios that you are concerned about, please comment on their blog post.&amp;#160; These posts are going up well before the next release of Exchange in order to keep you informed but also to hear what you have to say.&amp;#160; The nice thing about Exchange 2007 is that you have EWS notifications already available to test with so while your store sinks might work now, you should begin thinking about and testing the migration of your sink solution to one based on EWS notifications.&amp;#160; If you hit roadblocks now &lt;a href="http://blogs.msdn.com/tags/DevMsgTeam/default.aspx"&gt;my team&lt;/a&gt; can work with you on Exchange 2007 and get answers before the upcoming release where Exchange store sinks are not a fallback option...&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Arial" size="2"&gt;In fact, the Exchange MSDN content team has been very busy spreading the word about what the transition from the gang of de-emphasized APIs (CDO 1.21, CDOEX, WebDAV, etc.) to the new ones (EWS and Agents) will look like...&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Arial" size="2"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/cc535018(EXCHG.80).aspx"&gt;Migrating from Exchange 2007 Legacy APIs&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Arial" size="2"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/cc720858(EXCHG.80).aspx"&gt;Migrating to Exchange Web Services, Part 1: Messaging&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Arial" size="2"&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=CDE26EA9-5647-448F-A5E6-AE094A882EE5&amp;amp;displaylang=en"&gt;Exchange 2007 Legacy API Property Mapping&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8770115" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+General/default.aspx">Exchange General</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Eventing/default.aspx">Exchange Eventing</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services/default.aspx">Exchange Web Services</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>Disclaimer: This post is about Disclaimers...</title><link>http://blogs.msdn.com/mstehle/archive/2008/07/23/disclaimer-this-post-is-about-disclaimers.aspx</link><pubDate>Wed, 23 Jul 2008 21:31:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8767500</guid><dc:creator>mstehle</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/8767500.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=8767500</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=8767500</wfw:comment><description>&lt;p&gt;&lt;font face="Arial" size="2"&gt;&lt;em&gt;I was reviewing a customer's case today and it reminded me of a topic I meant to blog about a while ago...&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Arial" size="2"&gt;Ever since Exchange 2000/2003 customers have tried to apply the &lt;a href="http://support.microsoft.com/kb/317680/"&gt;disclaimer SMTP sink sample&lt;/a&gt; to internal mail and found that the disclaimer text is not stamped on these messages.&amp;#160; Of course in Exchange 2000/2003 this &lt;a href="http://support.microsoft.com/?kbid=273233"&gt;won't work&lt;/a&gt;.&amp;#160; This is further described in the Exchange 2003 documentation on TechNet about &lt;a href="http://technet.microsoft.com/pt-br/library/bb124832(EXCHG.65).aspx"&gt;The Advanced Queuing Engine&lt;/a&gt;...&lt;/font&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Arial" size="2"&gt;&lt;em&gt;&amp;quot;...the CDO interface does not support changing the content of store-submitted messages. This is a limitation that CDO_OnArrival event sinks share with all other event sinks. This limitation exists because Exchange converts a store-submitted message to a temporary SMTP version for the event sink to handle, and then discards the temporary version after the sink finishes processing...&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Arial" size="2"&gt;&lt;em&gt;...Because Exchange discards the temporary copy of a store-submitted message, you cannot use an event sink to add a disclaimer or other modifications to all outbound messages, unless you force all messages to be received through SMTP. To do this, you must install the event sink on a bridgehead server that is separate from the mailbox servers in your organization.&amp;quot;&lt;/em&gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;font face="Arial" size="2"&gt;This is one of the better explanations about why disclaimers don't work for internal mail in Exchange 2000/2003 and provides more detail than the KB article.&amp;#160; &lt;/font&gt;&lt;font face="Arial" size="2"&gt;What you don't get from the KB article or the TechNet documentation is that in Exchange 2007 this all changes...&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Arial" size="2"&gt;The entire transport process is redone to the point that not only can internal messages have disclaimers added to them but there is no scripting or coding involved in doing so.&amp;#160; Exchange 2007 has built in &lt;a href="http://technet.microsoft.com/en-us/library/aa995961(EXCHG.80).aspx"&gt;transport rules&lt;/a&gt; that an administrator can turn on and configure as needed without writing code.&amp;#160; &lt;/font&gt;&lt;font face="Arial" size="2"&gt;The impact on Exchange development here is that the Exchange 2000/2003 experience leads many of us to assume that tasks like adding disclaimers, prepending text to the subject lines,&amp;#160; adding headers, adding recipients, or redirecting messages requires code but in Exchange 2007 it &lt;a href="http://technet.microsoft.com/en-us/library/aa998315(EXCHG.80).aspx"&gt;does not&lt;/a&gt;.&amp;#160; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Arial" size="2"&gt;&lt;em&gt;...Of course not every solution fits within the fixed set of conditions and actions defined for these transport rules - in those cases a custom transport agent can be used to implement whatever business logic is needed.&amp;#160; However, it is important to remember this functionality exists in Exchange 2007 before setting out on developing a custom solution as to not reinvent the wheel....&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8767500" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+General/default.aspx">Exchange General</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Eventing/default.aspx">Exchange Eventing</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>FYI: MSDN Protocol Docs...</title><link>http://blogs.msdn.com/mstehle/archive/2008/07/01/fyi-msdn-protocol-docs.aspx</link><pubDate>Tue, 01 Jul 2008 17:50:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8677344</guid><dc:creator>mstehle</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/8677344.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=8677344</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=8677344</wfw:comment><description>&lt;p&gt;&lt;font face="Arial" size="2"&gt;Steve posted a &lt;/font&gt;&lt;a href="http://blogs.msdn.com/stephen_griffin/archive/2008/06/30/protocol-docs-rtm.aspx"&gt;&lt;font face="Arial" size="2"&gt;link&lt;/font&gt;&lt;/a&gt;&lt;font face="Arial" size="2"&gt; to the MSDN protocol documentation.&amp;#160; He talks about them &lt;/font&gt;&lt;a href="http://blogs.msdn.com/stephen_griffin/archive/2008/06/11/mfcmapi-does-contacts.aspx"&gt;&lt;font face="Arial" size="2"&gt;here&lt;/font&gt;&lt;/a&gt;&lt;font face="Arial" size="2"&gt; and &lt;/font&gt;&lt;a href="http://blogs.msdn.com/stephen_griffin/archive/2008/05/01/exchange-open-protocol-docs-updated.aspx"&gt;&lt;font face="Arial" size="2"&gt;here&lt;/font&gt;&lt;/a&gt;&lt;font face="Arial" size="2"&gt; as well.&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8677344" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/MAPI/default.aspx">MAPI</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+General/default.aspx">Exchange General</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Outlook+General/default.aspx">Outlook General</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>FYI: After Installing Exchange 2007 SP1 32-bit CDOSYS Might Not Be Registered...</title><link>http://blogs.msdn.com/mstehle/archive/2007/12/11/fyi-after-installing-exchange-2007-sp1-32-bit-cdosys-might-not-be-registered.aspx</link><pubDate>Tue, 11 Dec 2007 18:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6736005</guid><dc:creator>mstehle</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/6736005.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=6736005</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=6736005</wfw:comment><description>&lt;P class=MsoPlainText style="MARGIN: 0in 0in 0pt"&gt;Exchange 2007 only adds 64-bit components in a 64-bit install, when you install Exchange it will register CDOEX.DLL which will replace CDOSYS.DLL and be used when you instantiate CDO.Message.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;So you will see CDO.Message pointing to "C:\Program Files\Common Files\Microsoft Shared\CDO\CDOEX.DLL" in the 64-bit registry and you will see CDO.Message pointing to "C:\WINNT\SysWow64\cdosys.dll" in the 32-bit registry.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If your application is a 64-bit process it will load up CDOEX.DLL when you instantiate CDO.Message.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If your application is a 32-bit process it will load up CDOSYS.DLL when you instantiate CDO.Message.&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN: 0in 0in 0pt"&gt;After installing 64-bit Exchange 2007 you may notice that 32-bit scripts and applications get a "Library not found" error when using CDOSYS.&amp;nbsp; This appears to be a side effect of registering the 64-bit CDOEX.dll.&amp;nbsp; To resolve the issue simply open a 32-bit instance of cmd.exe from the SysWow64 directory and run "regsvr32 cdosys.dll" to re-register the 32-bit CDOSYS.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6736005" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/FYI/default.aspx">FYI</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+2007/default.aspx">Exchange 2007</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+General/default.aspx">Exchange General</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>OUTBOX: Programming Exchange 2007 Foreign Connectors - The Exchange EDK Gateway Connector Replacement</title><link>http://blogs.msdn.com/mstehle/archive/2007/05/25/outbox-programming-exchange-2007-foreign-connectors-the-exchange-edk-gateway-connector-replacement.aspx</link><pubDate>Fri, 25 May 2007 19:16:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2875336</guid><dc:creator>mstehle</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/2875336.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=2875336</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=2875336</wfw:comment><description>&lt;P&gt;&lt;EM&gt;...We have had a few customers looking for information on writing a custom foreign connector for Exchange 2007 and I finally got around to combining all my information into one document so that I could reuse it. I thought I would share it here as well to maybe save a few calls to our team...&lt;/EM&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;What is a gateway connector?&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;“Gateway connectors generally use non-standard protocols, or proprietary APIs to connect Exchange to non-Exchange messaging systems” – &lt;/SPAN&gt;&lt;/I&gt;&lt;A href="http://technet.microsoft.com/en-us/library/aa996512.aspx"&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;FONT color=#800080&gt;[TechNet]Gateway Messaging Connectors Architecture&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/A&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;One of the most common examples of a gateway connector is an Exchange fax gateway that many ISVs have implemented for Exchange 2000/2003/2007.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;These gateway connectors allow a user to send faxes from Exchange clients by sending mail to a special address space like, &lt;/SPAN&gt;&lt;A href="mailto:8001234567@MyFaxServer.com"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;8001234567@MyFaxServer.com&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Additionally when a fax is received the ISVs product could allow for delivery of the fax through the gateway connector to an Exchange client by converting the inbound fax to a mail message.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;There are two key tasks that an Exchange gateway must perform…&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpFirst style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo1; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"&gt;&lt;SPAN style="mso-list: Ignore"&gt;Ø&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;Receive outbound messages from Exchange&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpLast style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo1; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"&gt;&lt;SPAN style="mso-list: Ignore"&gt;Ø&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;Send inbound messages to Exchange&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;What is new in Exchange 2007?&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;Exchange 2007 does not support the same gateway model that &lt;/SPAN&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/ms987578.aspx"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;FONT color=#800080&gt;Exchange 2000/2003&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt; used.&amp;nbsp; Rather than using MAPI and watching queues, the Exchange 2007 solution is file system based.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;To receive outbound messages from Exchange to be sent via the gateway service, you configure a &lt;/SPAN&gt;&lt;A href="http://technet.microsoft.com/en-us/library/aa996779.aspx"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;FONT color=#800080&gt;foreign connector&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt; on the Hub Transport server which drops messages to a directory which the gateway service monitors. &amp;nbsp;Conversely to send inbound messages from a non-Exchange to Exchange mailboxes the gateway services would create a file in a directory which Exchange monitors.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;Receiving outbound messages from Exchange&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;The gateway service monitors a drop directory on an Exchange Hub Transport server to receive messages sent from Exchange clients that are to be sent via the non-Exchange gateway service.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Address spaces which may be SMTP or non-SMTP are configured for each foreign connector to route messages to a particular drop directory.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;Foreign connectors are created and configured using Exchange Powershell cmdlets.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; VERTICAL-ALIGN: top; LINE-HEIGHT: 140%"&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 140%; FONT-FAMILY: 'Arial','sans-serif'"&gt;“To use the interactive mode of the Exchange Management Shell to create a new Foreign connector&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 30pt; VERTICAL-ALIGN: top; TEXT-INDENT: -0.25in; LINE-HEIGHT: 140%; mso-list: l0 level1 lfo3; tab-stops: list .5in"&gt;&lt;A class="" name=procedureToggleEDBFBHA&gt;&lt;/A&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 140%; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;1.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 140%; FONT-FAMILY: 'Arial','sans-serif'"&gt;At the Exchange Management Shell command prompt, type &lt;B&gt;New-ForeignConnector&lt;/B&gt;, and then press &lt;B&gt;ENTER&lt;/B&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 30pt; VERTICAL-ALIGN: top; TEXT-INDENT: -0.25in; LINE-HEIGHT: 140%; mso-list: l0 level1 lfo3; tab-stops: list .5in"&gt;&lt;SPAN style="mso-bookmark: procedureToggleEDBFBHA"&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 140%; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;2.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 140%; FONT-FAMILY: 'Arial','sans-serif'"&gt;At the &lt;CODE&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin"&gt;Address Spaces (0):&lt;/SPAN&gt;&lt;/CODE&gt; prompt, type the address space to which this connector will send messages, for example, &lt;B&gt;contoso.com&lt;/B&gt;, and then press &lt;B&gt;ENTER&lt;/B&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 30pt; VERTICAL-ALIGN: top; TEXT-INDENT: -0.25in; LINE-HEIGHT: 140%; mso-list: l0 level1 lfo3; tab-stops: list .5in"&gt;&lt;SPAN style="mso-bookmark: procedureToggleEDBFBHA"&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 140%; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;3.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 140%; FONT-FAMILY: 'Arial','sans-serif'"&gt;Enter additional address spaces if this connector will send messages to more than one domain. After you enter all the address spaces, press &lt;B&gt;ENTER&lt;/B&gt; to continue.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 30pt; VERTICAL-ALIGN: top; TEXT-INDENT: -0.25in; LINE-HEIGHT: normal; mso-list: l0 level1 lfo3; tab-stops: list .5in"&gt;&lt;SPAN style="mso-bookmark: procedureToggleEDBFBHA"&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;4.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;At the &lt;CODE&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin"&gt;Name:&lt;/SPAN&gt;&lt;/CODE&gt; prompt, type a name for this connector, and then press &lt;B&gt;ENTER&lt;/B&gt;. The connector summary is displayed.&lt;/SPAN&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;” – &lt;/SPAN&gt;&lt;/I&gt;&lt;A href="http://technet.microsoft.com/en-us/library/aa996397.aspx"&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;FONT color=#800080&gt;[TechNet] How to Create a New Foreign Connector&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/A&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;Messages dropped in this directory will be in MIME format with TNEF (winmail.dat) attachments.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The basic MIME data contains the header fields like TO and CC fields but you will not see the BCC, attachments, and body content.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This information and other MAPI data are in the TNEF data which is in the winmail.dat attachment.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The &lt;/SPAN&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/microsoft.exchange.data.contenttypes.tnef.aspx"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;FONT color=#800080&gt;Exchange.Data.ContentTypes.TNEF&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt; namespace is used to iterate through the TNEF parts and extract the data from the winmail.dat that could be used by the gateway service for routing.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;Send inbound messages to Exchange&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;The gateway service sends messages to Exchange by creating files in a &lt;/SPAN&gt;&lt;A href="http://technet.microsoft.com/en-us/library/bb123721.aspx"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;FONT color=#800080&gt;replay directory&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;These are MIME formatted messages which are created using the new managed &lt;/SPAN&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/aa580926.aspx"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;FONT color=#800080&gt;Exchange.Data&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt; namespaces.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;The replay directory is monitored by Exchange.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It checks for new messages every 5 seconds (this interval cannot be changed).&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Once a message is processed the file is renamed from *.eml to *.tmp.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;After the *.tmp file is converted to an SMTP message the *.tmp file is locked until the message is successfully queued for delivery.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If the transport service is restarted then all the *.tmp files are renamed to *.eml and the processing starts over again.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Messages dropped to the replay directory have some prerequisites which must be taken into account.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;“&lt;A class="" name=sectionToggle2&gt;&lt;/A&gt;A message file that is copied into the Replay directory must meet the following requirements for successful delivery:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpFirst style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l2 level1 lfo2"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;The message file must be a text file that complies with the basic SMTP message format. Multipurpose Internet Mail Extensions (MIME) message header fields and content are supported.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l2 level1 lfo2"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;The message file must have an .eml file name extension.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l2 level1 lfo2"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;X-Headers must occur before all regular header fields.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpLast style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l2 level1 lfo2"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;A blank line must exist between the header fields and the message body.”&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;What is the difference between the Replay directory and the Pickup directory?&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;“&lt;A class="" name=sectionToggle5&gt;&lt;/A&gt;Exchange&amp;nbsp;Server&amp;nbsp;2003 uses a single Pickup directory for creating and submitting text message files. Exchange&amp;nbsp;2007 splits this functionality into separate Pickup and Replay directories. The Pickup directory is intended for users or applications to manually create new message files. The Replay directory is intended for the re-submission of exported&amp;nbsp;Exchange e-mail messages and for receiving messages from non-SMTP connectors. This separation of duties allows for the appropriate security to be applied to one directory without affecting the functionality of the other directory.”&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;A href="http://technet.microsoft.com/en-us/library/bb123721.aspx"&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;FONT color=#800080&gt;[TechNet] Managing the Replay Directory&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2875336" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+General/default.aspx">Exchange General</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/OUTBOX/default.aspx">OUTBOX</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Gateway+Connectors/default.aspx">Exchange Gateway Connectors</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>FYI: Combining Exchange 2007 Web Services and SQL 2005 Table-Valued User Definied Functions</title><link>http://blogs.msdn.com/mstehle/archive/2007/05/17/fyi-combining-exchange-2007-web-services-and-sql-2005-table-valued-user-definied-functions.aspx</link><pubDate>Fri, 18 May 2007 04:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2703952</guid><dc:creator>mstehle</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/2703952.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=2703952</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=2703952</wfw:comment><description>&lt;P&gt;&lt;EM&gt;Reading this kind of stuff almost makes we wish I was a consultant again...I say almost because then I think about requirement gathering, deadlines, budgets, debating the merits of agile development, etc...&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;The Exchange SDK team linked to &lt;A class="" href="http://msdn2.microsoft.com/en-us/exchange/bb483139.aspx" mce_href="http://msdn2.microsoft.com/en-us/exchange/bb483139.aspx"&gt;this&lt;/A&gt; article on their &lt;A class="" href="http://blogs.msdn.com/exchangedev/archive/2007/05/08/using-sql-server-table-valued-user-defined-functions-with-exchange-web-services.aspx" mce_href="http://blogs.msdn.com/exchangedev/archive/2007/05/08/using-sql-server-table-valued-user-defined-functions-with-exchange-web-services.aspx"&gt;blog&lt;/A&gt;&amp;nbsp;the other day and I just had a chance to read through it.&amp;nbsp; Exchange development seems like such a niche expertise sometimes and in the past the "tribal" knowledge it took to understand how to work with and extract data from Exchange could be intimidating for any developer.&amp;nbsp; Yet there are so many possibilities to integrate the data in Exchange with all kinds of applications (CRM, IT management applications, scheduling, etc.) and Exchange 2007 Web Services start to change the game of Exchange integration because they are far easier to use and can be leveraged in so many different ways...&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This article illustrates&amp;nbsp;how to expose Exchange data through SQL so that any SQL developer can work with Exchange data just like they were working with a SQL view.&amp;nbsp; The only Exchange development is using Exchange Web Services as a data access layer for populating SQL Server table-valued user defined functions...&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;"&lt;/EM&gt;When you combine these technologies, you have a formidable new way to integrate, search, and analyze your Microsoft Exchange messaging data by using the full power of SQL Server, and to combine that messaging data with virtually any other data managed by, or available from, SQL Server."&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;...There are far more SQL developers out there so exposing Exchange data through SQL is a very empowering proposition.&amp;nbsp; Especially the thought of expanding these samples to abstract dynamic views of Exchange folders and items through these SQL views could open up Exchange data to a whole new group of developers...&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;"...&lt;/EM&gt;This sample is intended to educate and inspire you in your Microsoft Exchange development..."&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;...My wheels are turning, man this is cool stuff...So with Exchange 2007 Web Services the game is changed, instead of talking MAPI, COM, or .NET we are simply talking HTTP, XML, and in this case now we can talk SQL...Who can't integrate with that?&lt;/EM&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2703952" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/FYI/default.aspx">FYI</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+General/default.aspx">Exchange General</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services/default.aspx">Exchange Web Services</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>FYI: The Exchange Dev Product Team is Blogging!!</title><link>http://blogs.msdn.com/mstehle/archive/2007/05/17/fyi-the-exchange-dev-product-team-is-blogging.aspx</link><pubDate>Thu, 17 May 2007 17:12:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2695981</guid><dc:creator>mstehle</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/2695981.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=2695981</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=2695981</wfw:comment><description>&lt;P&gt;&lt;EM&gt;Here is some exciting news...The Exchange SDK team is blogging now at &lt;/EM&gt;&lt;A href="http://blogs.msdn.com/exchangedev/" mce_href="http://blogs.msdn.com/exchangedev/"&gt;&lt;EM&gt;http://blogs.msdn.com/exchangedev/&lt;/EM&gt;&lt;/A&gt;&lt;EM&gt;!&amp;nbsp; This a great opportunity to get some direct access to the members of the product team who are responsible for API development and SDK documentation...&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;"...We (the Exchange SDK UE team) coordinate the Microsoft Exchange Development Blog and are made up of our Documentation Manager, &lt;A title="Click to view Thom Randolph's profile." href="http://msexchangeteam.com/articles/400565.aspx" target=_blank mce_href="http://msexchangeteam.com/articles/400565.aspx" minmax_bound="true"&gt;&lt;FONT color=#0033cc&gt;Thom Randolph&lt;/FONT&gt;&lt;/A&gt;, two Programming Writers, &lt;A title="Click to view Michael Mainer's profile." href="http://msexchangeteam.com/articles/437564.aspx" target=_blank mce_href="http://msexchangeteam.com/articles/437564.aspx" minmax_bound="true"&gt;&lt;FONT color=#0033cc&gt;Michael Mainer&lt;/FONT&gt;&lt;/A&gt; and, me, Ray Dixon, and our editor, Laura Graham.&amp;nbsp;However, we aren't the only people who will post here. Contributers will also include Microsoft Exchange developers, testers, program managers, and more. In the near future, you will see content&amp;nbsp;that describes&amp;nbsp;techniques used in Microsoft Exchange application development, coding tips, and code samples, among other things..."&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;...They are looking for feedback too, please let them know what you want to see posted and provide feedback on how we are doing.&amp;nbsp; These folks are very interested in what goes on in the "real world" of Exchange development..&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;"...please send us your ideas for blog posts. This helps us tailor the content to you. To share your blog post idea with us, just send an e-mail&amp;nbsp;describing your idea to &lt;A href="mailto:exsdkfb@microsoft.com" mce_href="mailto:exsdkfb@microsoft.com" minmax_bound="true"&gt;&lt;FONT color=#0033cc&gt;exsdkfb@microsoft.com&lt;/FONT&gt;&lt;/A&gt;..."&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2695981" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/FYI/default.aspx">FYI</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+General/default.aspx">Exchange General</category></item><item><title>OUTBOX: Introduction to Exchange Powershell Automation Part 2</title><link>http://blogs.msdn.com/mstehle/archive/2007/01/25/outbox-introduction-to-exchange-powershell-automation-part-2.aspx</link><pubDate>Thu, 25 Jan 2007 22:48:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1531356</guid><dc:creator>mstehle</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/1531356.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=1531356</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=1531356</wfw:comment><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;Naturally the first case I had was how to create a mailbox using Powershell cmdlets from ASP.NET given that CDOEXM is no longer available.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;From there we have had other bridges to cross as customers are upgrading 32-bit applications to work on Exchange 2007 (which is 64-bit) and replacing old CDOEXM code with Exchange Management Shell cmdlet automation.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Through these early cases I identified a couple common themes and created some sample code that I thought might be helpful to share here…&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;Exchange Cmdlets and Impersonation&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;Much like we saw with &lt;A href="http://support.microsoft.com/kb/900230"&gt;&lt;FONT color=#800080&gt;CDOEXM&lt;/FONT&gt;&lt;/A&gt;, currently &lt;I style="mso-bidi-font-style: normal"&gt;we don’t recommend or support using Exchange Powershell cmdlets with impersonation&lt;/I&gt;.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In the case of creating a mailbox in an ASP.NET application we would recommend that you use COM+ or .NET Remoting to host your Powershell code, have that code run as a service account with permissions to execute the Powershell cmdlets and then implement authorization logic to evaluate if the caller has permission to execute the code.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Click &lt;A href="http://blogs.msdn.com/mstehle/archive/2007/01/25/fyi-exchange-management-shell-blocks-calls-made-with-impersonated-credentials.aspx"&gt;&lt;FONT color=#800080&gt;here&lt;/FONT&gt;&lt;/A&gt; for more information.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;Exchange Management Shell Snap-in and 32-bit Applications&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;This typically isn’t a problem when writing an application in VB.NET or C# because the projects default to 64-bit on 64-bit machines but if you are trying to load the Exchange Management Shell Snap-in in a 32-bit instance of Powershell you will get the following error…&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;"No Windows PowerShell Snap-ins are available for version 1"&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;…This is because Exchange 2007 is a 64-bit application and therefore the snap-in is also 64-bit and cannot be loaded into a 32-bit instance of the shell.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Click &lt;A href="http://blogs.msdn.com/mstehle/archive/2007/01/24/kb-preview-error-no-windows-powershell-snap-ins-when-loading-exchange-powershell-snap-in.aspx"&gt;&lt;FONT color=#800080&gt;here&lt;/FONT&gt;&lt;/A&gt; for more information.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;C# Sample – New-Mailbox&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;Here is sample of a function which takes input to create a new mailbox using the New-Mailbox cmdlet…&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;public&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; CreateUserMailbox(&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; domain, &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; ou, &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; database, &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; alias, &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; name,&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; displayName, &lt;SPAN style="COLOR: teal"&gt;SecureString&lt;/SPAN&gt; password)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; upn = &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt;.Format(&lt;SPAN style="COLOR: maroon"&gt;"{0}@{1}"&lt;/SPAN&gt;, alias, domain);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;ICollection&lt;/SPAN&gt;&amp;lt;PSObject&amp;gt; results;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// Create a runspace. We can't use the RunspaceInvoke class this time&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// because we need to get at the underlying runspace to explicitly&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// add the commands.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;RunspaceConfiguration rc = RunspaceConfiguration.Create();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;PSSnapInException snapEx = &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;PSSnapInInfo info = rc.AddPSSnapIn(&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;"Microsoft.Exchange.Management.PowerShell.Admin"&lt;/SPAN&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;out&lt;/SPAN&gt; snapEx);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Runspace myRunSpace = RunspaceFactory.CreateRunspace(rc);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;myRunSpace.Open();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// Create a pipeline...&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Pipeline pipeLine = myRunSpace.CreatePipeline();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;using&lt;/SPAN&gt; (pipeLine)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// Create a command object so we can set some parameters&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// for this command.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Command newMbx = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; Command(&lt;SPAN style="COLOR: maroon"&gt;"new-mailbox"&lt;/SPAN&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;newMbx.Parameters.Add(&lt;SPAN style="COLOR: maroon"&gt;"alias"&lt;/SPAN&gt;, alias);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;newMbx.Parameters.Add(&lt;SPAN style="COLOR: maroon"&gt;"database"&lt;/SPAN&gt;, database);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;newMbx.Parameters.Add(&lt;SPAN style="COLOR: maroon"&gt;"password"&lt;/SPAN&gt;, password);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;newMbx.Parameters.Add(&lt;SPAN style="COLOR: maroon"&gt;"Name"&lt;/SPAN&gt;, name);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;newMbx.Parameters.Add(&lt;SPAN style="COLOR: maroon"&gt;"DisplayName"&lt;/SPAN&gt;, displayName);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;newMbx.Parameters.Add(&lt;SPAN style="COLOR: maroon"&gt;"UserPrincipalName"&lt;/SPAN&gt;, upn);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;newMbx.Parameters.Add(&lt;SPAN style="COLOR: maroon"&gt;"OrganizationalUnit"&lt;/SPAN&gt;, ou);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// Add the command we've constructed&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;pipeLine.Commands.Add(newMbx);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// Execute the pipeline and save the objects returned.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;results = pipeLine.Invoke();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// Print out any errors in the pipeline execution&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// NOTE: These error are NOT thrown as exceptions! &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// Be sure to check this to ensure that no errors &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// happened while executing the command.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (pipeLine.Error != &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt; &amp;amp;&amp;amp; pipeLine.Error.Count &amp;gt; 0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;Trace&lt;/SPAN&gt;.WriteLine(&lt;SPAN style="COLOR: maroon"&gt;"ERROR: There were pipeline errors...\n"&lt;/SPAN&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;foreach&lt;/SPAN&gt; (&lt;SPAN style="COLOR: blue"&gt;object&lt;/SPAN&gt; item &lt;SPAN style="COLOR: blue"&gt;in&lt;/SPAN&gt; pipeLine.Error.ReadToEnd())&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;Trace&lt;/SPAN&gt;.WriteLine(&lt;SPAN style="COLOR: maroon"&gt;"Error: "&lt;/SPAN&gt; + item.ToString() + &lt;SPAN style="COLOR: maroon"&gt;"\n"&lt;/SPAN&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// Print out the results of the pipeline execution&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (results != &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt; &amp;amp;&amp;amp; results.Count &amp;gt; 0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Trace&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;.WriteLine(&lt;SPAN style="COLOR: maroon"&gt;"MAILBOXES CREATED: Created the following &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;mailboxes...\n"&lt;/SPAN&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;foreach&lt;/SPAN&gt; (PSObject ps &lt;SPAN style="COLOR: blue"&gt;in&lt;/SPAN&gt; results)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (ps.Members[&lt;SPAN style="COLOR: maroon"&gt;"UserPrincipalName"&lt;/SPAN&gt;].Value != &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;Trace&lt;/SPAN&gt;.WriteLine(&lt;SPAN style="COLOR: maroon"&gt;"UserPrincipalName: "&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;+ ps.Members[&lt;SPAN style="COLOR: maroon"&gt;"UserPrincipalName"&lt;/SPAN&gt;].Value + &lt;SPAN style="COLOR: maroon"&gt;"\n"&lt;/SPAN&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;pipeLine = &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;myRunSpace.Close();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;myRunSpace = &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;}&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;Notice that I use a &lt;A href="http://msdn2.microsoft.com/en-us/library/system.management.automation.runspaces.pipeline.aspx"&gt;&lt;FONT color=#800080&gt;Pipeline&lt;/FONT&gt;&lt;/A&gt; instead of &lt;A href="http://msdn2.microsoft.com/en-us/library/system.management.automation.runspaceinvoke.aspx"&gt;&lt;FONT color=#800080&gt;RunspaceInvoke&lt;/FONT&gt;&lt;/A&gt; (like Vivek &lt;A href="http://www.viveksharma.com/techlog/2006/07/27/sample-code-calling-exchange-cmdlets-from-net-code"&gt;&lt;FONT color=#800080&gt;did&lt;/FONT&gt;&lt;/A&gt;).&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;RunspaceInvoke works fine in a lot of cases but the advantage I found with the Pipeline is that it is quite easy to add non-string parameters like the &lt;A href="http://msdn2.microsoft.com/en-us/library/system.security.securestring.aspx"&gt;&lt;FONT color=#800080&gt;SecureString&lt;/FONT&gt;&lt;/A&gt; object to the cmdlet call.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Also, note that while the Invoke method returns a result array of &lt;A href="http://msdn2.microsoft.com/en-us/library/system.management.automation.psobject.aspx"&gt;&lt;FONT color=#800080&gt;PSObjects&lt;/FONT&gt;&lt;/A&gt; there is also an &lt;A href="http://msdn2.microsoft.com/en-us/library/system.management.automation.runspaces.pipeline.error.aspx"&gt;&lt;FONT color=#800080&gt;Error&lt;/FONT&gt;&lt;/A&gt; property which has an array of exceptions.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This error information is generally going to be validation type errors, for instance in the case of New-Mailbox I might get an error that the mailbox already in this property but I would get an exception if I misspelled New-Mailbox.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;Sample Code on the Web&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;Vivek Sharma: Sample Code: Calling Exchange cmdlets from .NET Code&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;A href="http://www.viveksharma.com/techlog/2006/07/27/sample-code-calling-exchange-cmdlets-from-net-code"&gt;&lt;FONT color=#800080&gt;http://www.viveksharma.com/techlog/2006/07/27/sample-code-calling-exchange-cmdlets-from-net-code&lt;/FONT&gt;&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;Glen Scales: Quick Create Mailbox Powershell Form for Exchange 2007&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;A href="http://gsexdev.blogspot.com/2006/12/quick-create-mailbox-powershell-form.html"&gt;&lt;FONT color=#800080&gt;http://gsexdev.blogspot.com/2006/12/quick-create-mailbox-powershell-form.html&lt;/FONT&gt;&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;Glen Scales: Scripting Exchange Web Services (2007) with VBS and Powershell&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;A href="http://gsexdev.blogspot.com/2006/12/scripting-exchange-web-services-2007.html"&gt;&lt;FONT color=#800080&gt;http://gsexdev.blogspot.com/2006/12/scripting-exchange-web-services-2007.html&lt;/FONT&gt;&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;Glen Scales: Exchange SMTP Log file DNS Test tool Powershell script&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;A href="http://gsexdev.blogspot.com/2006/12/exchange-smtp-log-file-dns-test-tool.html"&gt;&lt;FONT color=#800080&gt;http://gsexdev.blogspot.com/2006/12/exchange-smtp-log-file-dns-test-tool.html&lt;/FONT&gt;&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;…this isn’t necessarily related but I had to include it because it is just so cool…&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;Glen Scales: Geolocating Exchange Message Tracking with Powershell (Exchange 2000/2003) (Seeing what countries your messages/Spam are coming from)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;A href="http://gsexdev.blogspot.com/2006/11/geolocationing-exchange-message.html"&gt;&lt;FONT color=#800080&gt;http://gsexdev.blogspot.com/2006/11/geolocationing-exchange-message.html&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1531356" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+General/default.aspx">Exchange General</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Management+Shell/default.aspx">Exchange Management Shell</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>FYI: Looking for input on the next release of Exchange...</title><link>http://blogs.msdn.com/mstehle/archive/2007/01/15/fyi-looking-for-input-on-the-next-release-of-exchange.aspx</link><pubDate>Mon, 15 Jan 2007 17:22:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1471613</guid><dc:creator>mstehle</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/1471613.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=1471613</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=1471613</wfw:comment><description>The Exchange team is &lt;A class="" href="http://msexchangeteam.com/archive/2007/01/12/432177.aspx" mce_href="http://msexchangeteam.com/archive/2007/01/12/432177.aspx"&gt;looking for input&lt;/A&gt; on the next release of Exchange, although we just released Exchange 2007 the cycle never ends.&amp;nbsp; Here is a chance to influence the next release...&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1471613" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/FYI/default.aspx">FYI</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+General/default.aspx">Exchange General</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>FYI: Better Together: A look at how Exchange 2007 and Outlook 2007 work together...</title><link>http://blogs.msdn.com/mstehle/archive/2006/12/04/fyi-better-together-a-look-at-how-exchange-2007-and-outlook-2007-work-together.aspx</link><pubDate>Mon, 04 Dec 2006 19:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1206167</guid><dc:creator>mstehle</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/1206167.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=1206167</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=1206167</wfw:comment><description>&lt;P&gt;There is a new technet &lt;A class="" href="http://www.microsoft.com/technet/technetmag/issues/2006/12/outlook/default.aspx" mce_href="http://www.microsoft.com/technet/technetmag/issues/2006/12/outlook/default.aspx"&gt;article&lt;/A&gt;&amp;nbsp;written by &lt;SPAN class=clsBio&gt;Michael Khalili, an Exchange PM,&lt;/SPAN&gt;&amp;nbsp;which talks about some of the ways that Exchange 2007 and Outlook 2007 play together better than their older relatives did.&amp;nbsp; The most exciting piece mentioned in this article for me, as an Outlook/Exchange developer, is the Calendaring piece.&amp;nbsp; Of all the APIs we support it seems to me that most of our questions and bugs center around calendaring, any improvements/simplifications in this area are very welcome.&amp;nbsp; Here is an excerpt from the article about prior problems with Free/Busy data...&lt;/P&gt;
&lt;P&gt;"In the past, most calendar logic resided in Outlook. Each meeting update was treated as a separate meeting invitation, which meant the notifications could be accepted out of order. If two meeting updates were sent in quick succession, and a recipient accepted the second meeting update before the first, he might have out-of-date information on his calendar. Furthermore, accessing Outlook information from Smartphones or PDAs could lead to differing free/busy information according to the method by which users viewed the data."&lt;/P&gt;
&lt;P&gt;...been there, done that...&lt;/P&gt;
&lt;P xmlid="PARADECEMBER2006OUTLOOK006"&gt;"The solution was to move all calendar logic from the Outlook client to Exchange Server 2007.&amp;nbsp; When a meeting request is received by the server the meeting is automatically placed on the calendar as tentative until the user chooses to accept or decline the appointment. If a time or location change to the meeting is received, the meeting will be automatically updated and the old invitation marked out of date so users will not accidentally accept it. This logic is consistent among all clients—Office Outlook, Outlook Web Access, Outlook Mobile, or another third-party client—so only the correct, most up-to-date meetings are present."&lt;/P&gt;
&lt;P xmlid="PARADECEMBER2006OUTLOOK006"&gt;...very nice.&amp;nbsp; As Outlook/Exchange developers we are dependant on the information returned from APIs (which in turn comes from the application's proprietary business logic)&amp;nbsp;to present accurate information to the user in our applications.&amp;nbsp; The more Exchange understands or centralizes Outlook's business logic as it relates to calendaring, the more accurate that data, and therefore our applications become...&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1206167" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+2007/default.aspx">Exchange 2007</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+General/default.aspx">Exchange General</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Outlook+General/default.aspx">Outlook General</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>FYI: Glen's Exchange Dev Blog is awesome...</title><link>http://blogs.msdn.com/mstehle/archive/2006/11/28/fyi-glen-s-exchange-dev-blog-is-awesome.aspx</link><pubDate>Wed, 29 Nov 2006 00:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1167691</guid><dc:creator>mstehle</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/1167691.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=1167691</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=1167691</wfw:comment><description>&lt;P&gt;If you are an Exchange developer and haven't checked out &lt;A class="" href="http://gsexdev.blogspot.com/" mce_href="http://gsexdev.blogspot.com/"&gt;Glen Scales's blog&lt;/A&gt; then you are missing out.&amp;nbsp; Chances are he has written part of your project for you and posted it on his blog.&amp;nbsp; Check out his latest &lt;A class="" href="http://gsexdev.blogspot.com/2006/11/reporting-on-age-of-content-in-mailbox.html" mce_href="http://gsexdev.blogspot.com/2006/11/reporting-on-age-of-content-in-mailbox.html"&gt;post&lt;/A&gt; for a script which generates a report of mailbox size broken down by the age of messages...&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1167691" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/FYI/default.aspx">FYI</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+General/default.aspx">Exchange General</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/WebDAV/default.aspx">WebDAV</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/CDOEX/default.aspx">CDOEX</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/CDOEXM/default.aspx">CDOEXM</category></item></channel></rss>