<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>missmiis &#187; Exchange 2003</title>
	<atom:link href="http://www.wapshere.com/missmiis/category/exchange2003/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wapshere.com/missmiis</link>
	<description>Adventures in identity management</description>
	<lastBuildDate>Fri, 03 Feb 2012 20:41:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>A GALSync powershell script</title>
		<link>http://www.wapshere.com/missmiis/a-galsync-powershell-script</link>
		<comments>http://www.wapshere.com/missmiis/a-galsync-powershell-script#comments</comments>
		<pubDate>Sat, 15 May 2010 09:05:18 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[AD]]></category>
		<category><![CDATA[Exchange 2003]]></category>
		<category><![CDATA[Exchange 2007]]></category>
		<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[powershell]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=819</guid>
		<description><![CDATA[Here is a script I wrote to do a simple GAL synchronization between two Exchange organizations. The script finds the mail-enabled  users in one domain, and creates contacts for them in the other domain. Existing contacts will also be updated and deleted as needed.

Update
There was a bug in the original script where I had forgotten to populate [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a script I wrote to do a simple GAL synchronization between two Exchange organizations. The script finds the mail-enabled  users in one domain, and creates contacts for them in the other domain. Existing contacts will also be updated and deleted as needed.<br />
<span id="more-819"></span></p>
<h4>Update</h4>
<p>There was a bug in the original script where I had forgotten to populate mailNickname. I have now done so, adding a &#8220;c-&#8221; to the front of it as a completely optional convention to avoid conflicts.</p>
<h4>Update 2</h4>
<p>Several people have commented below about needing to enable the contacts in Exchange after creation. I have used the modifcations posted by Mark in the comments to make a new version that I hope will work better with 2007 and 2010, though I have only tested it with 2010. Both versions are linked below, and please keep adding your comments and modifications.</p>
<h3>The Script</h3>
<p>Now I have two versions the scripts have been moved off to seperate pages. Follow the links below.</p>
<table border="1">
<tbody>
<tr>
<td><a href="http://www.wapshere.com/missmiis/galsync-v2">Version 2</a></td>
<td>Added the Update-Recipient command for Exchange 2007 (through local powershell) and Exchange 2010 (through remote powershell).</td>
</tr>
<tr>
<td><a href="http://www.wapshere.com/missmiis/galsync-ps1">Version 1</a></td>
<td>Original version that uses the ActiveDirectory powershell module to create the contact objects.</td>
</tr>
</tbody>
</table>
<h3>Other people&#8217;s versions</h3>
<p>Modified for Distribution Lists: <a href="http://www.wapshere.com/missmiis/galsync-v2/galsync-ps1-for-distribution-lists">http://www.wapshere.com/missmiis/galsync-v2/galsync-ps1-for-distribution-lists</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/a-galsync-powershell-script/feed</wfw:commentRss>
		<slash:comments>66</slash:comments>
		</item>
		<item>
		<title>Managing Exchange 2000/2003/2007 with ILM 2007</title>
		<link>http://www.wapshere.com/missmiis/managing-exchange-200020032007-with-ilm-2007</link>
		<comments>http://www.wapshere.com/missmiis/managing-exchange-200020032007-with-ilm-2007#comments</comments>
		<pubDate>Sun, 08 Nov 2009 14:23:51 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[Exchange 2003]]></category>
		<category><![CDATA[Exchange 2007]]></category>
		<category><![CDATA[ILM 2007]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=579</guid>
		<description><![CDATA[I have just posted this article in the Greatest Hits series on the ILM Technet forum.
http://social.technet.microsoft.com/Forums/en-US/identitylifecyclemanager/thread/f8ad045d-7252-4cd1-a189-d704a8f99129
The article covers various management tasks you can acheive with the standard AD MA, including provisioning and updating of users, mailboxes, contacts and distribution groups. There are quite a few code samples as well.
Managing Exchange 2000/2003/2007 with ILM 2007
This article covers [...]]]></description>
			<content:encoded><![CDATA[<p>I have just posted this article in the Greatest Hits series on the ILM Technet forum.</p>
<p><a href="http://social.technet.microsoft.com/Forums/en-US/identitylifecyclemanager/thread/f8ad045d-7252-4cd1-a189-d704a8f99129">http://social.technet.microsoft.com/Forums/en-US/identitylifecyclemanager/thread/f8ad045d-7252-4cd1-a189-d704a8f99129</a></p>
<p>The article covers various management tasks you can acheive with the standard AD MA, including provisioning and updating of users, mailboxes, contacts and distribution groups. There are quite a few code samples as well.<span id="more-579"></span></p>
<h2>Managing Exchange 2000/2003/2007 with ILM 2007</h2>
<p>This article covers the management of Exchange-enabled objects using the native Active Directory Management Agent that is included with ILM 2007 FP1.</p>
<p>The managed object types discussed are Users, Contacts, Groups and Dynamic Distribution Lists. The article also covers the special cases of adding mailboxes to existing accounts, and supporting a Resource Forest. Where extra steps are required for Exchange 2007 this has been highlighted.</p>
<p>It is assumed that the reader is comfortable with the concepts of Provisioning code and Advanced attribute flow rules.</p>
<h2 style="color: #365f91;">Permissions</h2>
<p>The service account used in the connection properties of the Management Agent must have sufficient rights to execute the required changes in AD.</p>
<p>Typically a Domain Admin account will be used, but if this is not permitted in your environment you will need to do some testing. The minimum permissions required are:</p>
<ul>
<li><a href="http://support.microsoft.com/kb/303972">Replicate Directory Changes</a></li>
<li>Rights to create/delete/modify objects in the specific OUs</li>
<li>Exchange Administrator (2003) or Exchange Recipient Administrator (2007)</li>
</ul>
<p> </p>
<h2 style="color: #365f91;">Users</h2>
<h3 style="color: #365f91;">Provisioning Mail Users</h3>
<h4 style="color: #365f91;">Exchange 2000/2003</h4>
<p>Provisioning a mail user is most simply done using the <a href="http://msdn.microsoft.com/en-us/library/ms696038(VS.85).aspx">CreateMailbox</a> method of the <a href="http://msdn.microsoft.com/en-us/library/ms696074(VS.85).aspx">ExchangeUtils</a> class. This method will create a new user account, and populate the necessary mail attributes for you.</p>
<p>See the code sample <span style="text-decoration: underline;">Create a User with a Mailbox</span> at the end of this document for an example of the provisioning code.</p>
<h4 style="color: #365f91;">Mixed Exchange 2003 and 2007</h4>
<p>In a mixed environment the RUS still runs so Exchange 2003 methods may be used. Make sure that you do <strong>not</strong> tick the “Enable Exchange 2007 provisioning” box in the Management Agent configuration.</p>
<h4 style="color: #365f91;">Exchange 2007</h4>
<p>The same code will work when provisioning to Exchange 2007, however there are some extra requirements for the ILM server:</p>
<ul>
<li>ILM 2007 FP1 or later</li>
<li>Powershell</li>
<li>Exchange 2007 Management Tools</li>
<li>Latest rollup packs on Exchange and ILM servers</li>
</ul>
<p>In addition you must tick Enable Exchange 2007 provisioning on the Extensions tab of the Management Agent.</p>
<h4 style="color: #365f91;">Adding a Mailbox to an existing User</h4>
<p>Sometimes you may need to create a mailbox for an existing account. As the account already exists this is not actually a provisioning task, and is therefore handled with export flow rules.</p>
<p>All you need to do is to populate the following attributes, in addition to the basic user attributes:</p>
<ul>
<li>displayName – if not already set</li>
<li>mailNickname – with the local part of the email address (the bit before the “@”)</li>
<li>homeMDB – with the DN of the mail store</li>
<li>mDBUseDefaults – set to “True” to use the default quota settings</li>
</ul>
<p> </p>
<h3 style="color: #365f91;">Special Mailbox Types</h3>
<p>Exchange 2007 includes some extra mailbox types:</p>
<ul>
<li>Room Mailbox,</li>
<li>Equipment Mailbox,</li>
<li>Linked Mailbox.</li>
</ul>
<p>The Linked Mailbox is covered in the <span style="text-decoration: underline;">Resource Forest</span> section below.</p>
<p>The Room and Equipment mailboxes are currently not supported by ILM 2007 provisioning. The only reliable method is to create a User Mailbox using ILM 2007, and then use the set-mailbox cmdlet to change the mailbox type.</p>
<h4 style="color: #365f91;">Troubleshooting</h4>
<h5 style="color: #365f91;">Export Errors</h5>
<p>The most common problems with provisioning Exchange users will relate to permissions. Make sure that the account used by the MA to connect to AD has permission to create Exchange users. Also make sure you have the latest service packs and rollups on the Exchange and ILM servers – at least SP1 RU9.</p>
<h5 style="color: #365f91;">Where’s the Mailbox?</h5>
<p>Exchange does not create the actual mailbox until it is opened or something is sent to it, therefore it is completely normal for no new mailboxes to be listed directly after the ILM export.</p>
<p>To confirm if the user is really mail-enabled:</p>
<ul>
<li>In Exchange 2003, check that the user’s Exchange tabs have appeared in the Exchange-enhanced version of AD Users &amp; Computers.</li>
<li>In Exchange 2007, use the get-user cmdlet to confirm the user’s object type is “UserMailbox”, or check that they appear as a Recipient in the Management Console.</li>
</ul>
<p> </p>
<h5 style="color: #365f91;">Exchange 2007 and Global Catalog targeting</h5>
<p>There is a known problem with Exchange 2007 provisioning and AD replication delays. On the MA’s Configure Directory Partitions tab you can hard-code the name of a preferred domain controller. Enter the name of the nearest Global Catalog to ensure that both the user creation and the mailbox creation are performed in the same place.</p>
<table style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<th style="text-align: left; background-color: #c0c0c0;"><img src="http://apfhrw.bay.livefilestore.com/y1pCed6u9dxDV3LOdzgtYt8xFaDWmIf_thMiOiFb3SmUARdxwIei5b6sPCHGruZWYphrJEU8j2BZEd51ZoAkp_ONkG8moMODvLC/Note.gif" alt="note" />Note</th>
</tr>
<tr>
<td style="background-color: #f0f0f0;">Use the Resource Kit utility nltest to find Global Catalog servers:<br />
<em>nltest /DSGETDC:mydomain.com /GC</em></td>
</tr>
</tbody>
</table>
<p> </p>
<h3 style="color: #365f91;">Modifying Mail Users</h3>
<p>You can change a user’s Exchange related attributes using export flow rules.</p>
<p>The following table is not exhaustive. If you wish to automate an Exchange modification the best thing to do is make the change manually and then inspect the attribute changes using ADSIEdit.<br />
In this way you can discover which attributes you need to create flow rules for, and the types of value you should flow.</p>
<table border="0">
<tbody>
<tr>
<th style="text-align: center; background-color: #d4d0c8; padding-left: 5px; padding-right: 5px; font-weight: bold;">Attribute</th>
<th style="text-align: center; background-color: #d4d0c8; padding-left: 5px; padding-right: 5px; font-weight: bold;">Function</th>
<th style="text-align: center; background-color: #d4d0c8; padding-left: 5px; padding-right: 5px; font-weight: bold;">Comments</th>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">altRecipient</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">Used in forwarding – the DN or the mail-enabled object to forward all mail to.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">When forwarding mail to an external account you must create a Contact object in this Exchange organization.</td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">deliverAndRedirect</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">If forwarding is enabled, set to TRUE to deliver to both the mailbox and the forwarding address.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">Use in combination with altRecipient.</td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">extensionAttributen</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">Free-use string attributes where you can store any data you like.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">Be consistent. If extensionAttribute4 is being used for star sign, then make sure it is only ever used for that.</td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">homeMDB</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">Location of the mailbox.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">Do NOT change once it has been set. If you need to move the mailbox use Exchange admin utilities.</td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">mail</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">The user’s primary email address.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">If changing the address you should also change mailNickname and the “SMTP:” value of proxyAddresses.</td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;"> </td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;"> </td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;"> </td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">mailNickname</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">This should match the local part of the primary email address.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;"> </td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">mDBUseDefaults</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">Use the default quota for the mail store.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">Set to False if setting an individual limit.</td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">mDBStorageQuota</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">The “Warning” limit Expressed in Kbytes.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;"> </td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">mDBOverQuotaLimit</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">The “Block Send” limit Expressed in Kbytes.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;"> </td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">mDBOverHardQuotaLimit</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">The “Block Send &amp; Receive” limit</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">Expressed in Kbytes.</td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">msExchHideFromAddressLists</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">Set to “True” to hide from the GAL.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;"> </td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">msExchMailboxGuid</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">The unique identifier of the mailbox</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">DON’T CHANGE THIS! It can be useful to flow this back into the Metaverse if you need to test that the mailbox was created.</td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">proxyAddresses</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">Multivalue attribute holding all possible email addresses for this account</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">The capital “SMTP:” address is the primary. The other “smtp:” addresses act as aliases.</td>
</tr>
</tbody>
</table>
<p> </p>
<h3 style="color: #365f91;">Resource Forest</h3>
<p>In a Resource Forest scenario the following accounts are needed:</p>
<ol>
<li>An enabled user account in the Account Forest.</li>
<li>A disabled account in the Resource Forest with an attached mailbox.</li>
</ol>
<p>The account creation in the two forests and the mailbox linking are simple enough to achieve with ILM. A provisioning code sample has been included at the end of this document under <span style="text-decoration: underline;">Create Account Forest and Resource Forest Accounts</span>.</p>
<p>The difficulty comes with the permissions assignment piece of the puzzle – it is necessary for the user’s account to have the <strong>Full Access</strong> and <strong>Send As</strong> rights to the mailbox. This is not something that is possible with the native Active Directory MA.</p>
<p>While there are several ways to solve the permissions-assignment problem, the typical way is to run a script after the export step. The script might simply trawl AD looking for accounts to update or it could read details from the ILM export log and target the new accounts.</p>
<p>While outside the scope of this document, the following resources have been included for reference:</p>
<ol>
<li>A <a href="http://support.microsoft.com/kb/310866/en-us">Microsoft technote</a> showing how to Script Exchange 2000/2003 mailbox permissions,</li>
<li>A PowerShell script for Exchange 2007 has been included in the Code section at the end of this article.</li>
</ol>
<p> </p>
<h2 style="color: #365f91;">Contacts</h2>
<p>Contacts are used for two primary functions in Exchange, both of which can be automated with ILM:</p>
<ol>
<li>Adding organization-wide contacts to the Global Address List.<br />
ILM could be used to import information from a CRM system and automatically create the contact object.</li>
<li>As a way to forward mail from a mailbox within the organization.<br />
Some organizations (such as universities) allow users to forward their mail to another address. As long as ILM has the information about the forwarding request (perhaps entered by the user in a self-service portal) it can be configured to create the contact and set up the forwarding.</li>
</ol>
<h3 style="color: #365f91;">Provisioning</h3>
<p>Contacts may be provisioned very simply using the <a href="http://msdn.microsoft.com/en-us/library/ms696036(VS.85).aspx">CreateMailEnabledContact</a> method from the ExchangeUtils class.<br />
See the code sample <span style="text-decoration: underline;">Create a Contact</span> at the end of this document for an example of the provisioning code.</p>
<h3 style="color: #365f91;">Modifying</h3>
<table border="0">
<tbody>
<tr>
<th style="text-align: center; background-color: #d4d0c8; padding-left: 5px; padding-right: 5px; font-weight: bold;">Attribute</th>
<th style="text-align: center; background-color: #d4d0c8; padding-left: 5px; padding-right: 5px; font-weight: bold;">Function</th>
<th style="text-align: center; background-color: #d4d0c8; padding-left: 5px; padding-right: 5px; font-weight: bold;">Comments</th>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">mail</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">The contact’s email address.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">If changing the address you should also change targetAddress and the “SMTP:” value of proxyAddresses.</td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">msExchHideFromAddressLists</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">Set to “True” to hide from the GAL.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;"> </td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">proxyAddresses</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">Multivalue attribute holding all possible email addresses that will forward via the contact.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">To work the contact needs an alias using “smtp:” in the local domain. The “SMTP:” address should match mail and targetAddress.</td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">targetAddress</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">The email address that mail sent to this contact will be forwarded to.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">One address only.</td>
</tr>
</tbody>
</table>
<p> </p>
<h2 style="color: #365f91;">Distribution List</h2>
<p>There are three types of Distribution list in Exchange:</p>
<ol>
<li>Groups of type Distribution</li>
<li>Groups of type Security that have an email address</li>
<li>Dynamic distribution lists.</li>
</ol>
<p>All three types can be created and managed with ILM, but the processes will differ.</p>
<h3 style="color: #365f91;">Distribution Groups</h3>
<p>To provision a standard Distribution Group use the <a href="http://msdn.microsoft.com/en-us/library/ms696024(VS.85).aspx">CreateDistributionList</a> method of the <a href="http://msdn.microsoft.com/en-us/library/ms696074(VS.85).aspx">ExchangeUtils</a> class. See <span style="text-decoration: underline;">Create a Distribution List</span> at the end of this document for a code sample.</p>
<p>The main modification you will do with groups is to update the membership list. Group population is outside the scope of this document, though it is worth looking into Group Populator and Multi-Value tables.</p>
<h3 style="color: #365f91;">Security Groups with Email Address</h3>
<p>It is possible to mail-enable a Security group, allowing it to then also act as a distribution list.</p>
<p>Provisioning such a group is a simple matter of creating a security group and adding the mail address. See <span style="text-decoration: underline;">Create a Mail-Enabled Security Group</span> under Code Samples at the end of this document.</p>
<h3 style="color: #365f91;">Dynamic Distribution Lists</h3>
<p>You may also use ILM to provision Dynamic Distribution Lists. All you need to do is to create an object of type msExchDynamicDistributionList and add values to the following attributes:</p>
<ul>
<li>displayName</li>
<li>mailNickname</li>
<li>msExchDynamicDLFilter</li>
<li>msExchDynamicDLBaseDN</li>
</ul>
<p>See <span style="text-decoration: underline;">Create a Dynamic Distribution List</span> under Code Samples at the end of this document.</p>
<h2 style="color: #365f91;">Code Samples</h2>
<h3 style="color: #365f91;">Create a User with a Mailbox</h3>
<p> </p>
<p>This MVExtension code is in addition to export flow rules to the user object type on the following attributes:</p>
<ul>
<li>displayName</li>
<li>givenName</li>
<li>sAMAccountName</li>
<li>sn</li>
<li>userPrincipalName</li>
</ul>
<p> </p>
<pre>Public Sub Provision(ByVal mventry As MVEntry) Implements IMVSynchronization.Provision

  Const ADS_UF_NORMAL_ACCOUNT As Integer = &amp;H200

  Dim csentry As CSEntry

  Dim MA As ConnectedMA

  Dim dn As ReferenceValue

  Dim rdn As String

  Dim homeMDB As String

  Dim mailNickname As String

  Dim mail As String

  Select Case mventry.ObjectType

  Case "person"

    MA = mventry.ConnectedMAs("MYDOMAIN")

    If &lt;test that account should exist&gt; AndAlso MA.Connectors.Count = 0 Then

      rdn = "CN=" &amp; mventry("sn").Value &amp; ", " &amp; mventry("givenName").Value

      dn = MA.EscapeDNComponent(rdn).Concat("OU=Users,OU=MyOrg, " _

                                            &amp; "dc=mydomain,dc=local")

      mailNickname = mventry("mailNickname").Value

      ' The following line assumes MDB, SG and MailServer have been

      ' populated for the user in the Metaverse.

      homeMDB = "CN=&amp; mventry("MDB").StringValue _

         &amp; ",CN=" &amp; mventry("SG").StringValue _

         &amp; ",CN=InformationStore,CN=" &amp; mventry("MailServer").StringValue _

         &amp; ",CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT)" _

         &amp; ",CN=Administrative Groups,CN=First Organization" _

         &amp; ",CN=Microsoft Exchange,CN=Services,CN=Configuration" _

         &amp; ",DC=mydomain,DC=local"  

      csentry = ExchangeUtils.CreateMailbox(MA, dn, mailNickname, homeMDB)

      csentry.DN = dn

      csentry("unicodePwd").Values.Add("FirstP@ssw0rd")

      csentry("userAccountControl").IntegerValue = ADS_UF_NORMAL_ACCOUNT

      csentry.CommitNewConnector()

    End If

  End Select

End Sub</pre>
<p> </p>
<h3 style="color: #365f91;">Create Account Forest Accounts and Resource Forest Accounts</h3>
<p> </p>
<pre>Public Sub Provision(ByVal mventry As MVEntry) Implements IMVSynchronization.Provision

  Const ADS_UF_NORMAL_ACCOUNT As Integer = &amp;H200

  Dim csentry As CSEntry

  Dim MA As ConnectedMA

  Dim dn As ReferenceValue

  Dim rdn As String

  Dim homeMDB As String

  Dim mailNickname As String

  Dim mail As String

  Select Case mventry.ObjectType

  Case "person"

    'Create Account Forest account - no mailbox

    MA = mventry.ConnectedMAs("AccountForest")

    If MA.Connectors.Count = 0 Then

      rdn = "CN=" &amp; mventry("sn").StringValue _

                  &amp; ", " &amp; mventry("givenName").StringValue

      dn = MA.EscapeDNComponent(rdn).Concat("OU=Users,OU=MyOrg, " _

                                            &amp; "dc=accountdomain,dc=local")

      csentry = MA.Connectors.StartNewConnector("user")

      csentry.DN = dn

      csentry("unicodePwd").Values.Add("FirstP@ssw0rd")

      csentry("userAccountControl").IntegerValue = ADS_UF_NORMAL_ACCOUNT

      csentry.CommitNewConnector()

    End If

    'Create disabled account and mailbox in Resource forest. 

    '  This can only be done once the objectSID from the account domain 

    '  is available. Create a metaverse Binary attribute called SID

    '  and flow objectSid -&gt; SID.

    '  The account is disabled because no password is set. Alternatively set

    '  a random password and disable using userAccountControl.

    MA = mventry.ConnectedMAs("ResourceForest")

    If MA.Connectors.Count = 0 AndAlso mventry("SID").IsPresent Then

      rdn = "CN=" &amp; mventry("displayName").StringValue

      dn = MA.EscapeDNComponent(rdn).Concat("OU=LinkedMailboxes,OU=MyOrg, " _

                                            &amp; "dc=resourcedomain,dc=local")

      mailNickname = mventry("mailNickname").StringValue

      homeMDB = "CN=" &amp; mventry("MDB").StringValue _

         &amp; ",CN=" &amp; mventry("SG").StringValue _

         &amp; ",CN=InformationStore,CN=" &amp; mventry("MailServer").StringValue _

         &amp; ",CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT)" _

         &amp; ",CN=Administrative Groups,CN=First Organization" _

         &amp; ",CN=Microsoft Exchange,CN=Services,CN=Configuration" _

         &amp; ",DC=mydomain,DC=local"  

      csentry = ExchangeUtils.CreateMailbox(MA, dn, mailNickname, homeMDB)

      csentry.DN = dn

      csentry("msExchMasterAccountSid").BinaryValue = mventry("SID").BinaryValue

      'The following setting is optional but can help with tracking the mailbox user.

       csentry("extensionAttribute1").Value = "accountdomain\" _

                                              &amp; mventry("uid").StringValue

       csentry.CommitNewConnector()

     End If

  End Select

End Sub</pre>
<p> </p>
<h3 style="color: #365f91;">Assign Resource Mailbox Permissions – Exchange 2007, powershell</h3>
<p> </p>
<p>The following script assigns the FullAccess and SendAs permissions to a resource forest mailbox.<br />
The resource forest account needs to have the domain\username of the user’s actual account written to extensionAttribute1, as per the provisioning code above.</p>
<pre>$Filter = "(&amp;(ObjectCategory=user)(extensionAttribute1=*))"

$Searcher = New-Object System.DirectoryServices.DirectorySearcher($Filter)

$Searcher.Findall() | Foreach-Object -Process {

$alias = [string]$_.properties.item("mailNickname")

$user = [string]$_.properties.item("extensionAttribute1")

Add-MailboxPermission -Identity $alias -AccessRights FullAccess, SendAs -User $user

}</pre>
<p> </p>
<h3 style="color: #365f91;">Create a Contact</h3>
<p> </p>
<pre>Public Sub Provision(ByVal mventry As MVEntry) Implements IMVSynchronization.Provision

  Dim csentry As CSEntry

  Dim MA As ConnectedMA

  Dim dn As ReferenceValue

  Dim rdn As String

  Dim mailNickname As String

  Dim mail As String

  Select Case mventry.ObjectType

  Case "person"

     MA = mventry.ConnectedMAs("MYDOMAIN")

     If MA.Connectors.Count = 0 Then

       rdn = "CN=" &amp; mventry("displayName").StringValue

       dn = MA.EscapeDNComponent(rdn).Concat("OU=Contacts,OU=MyOrg, " _

                                            &amp; "dc=mydomain,dc=local")

       mail = mventry("mail").StringValue

       'The mailNickname is only for internal Exchange purposes.

       'You could just as easily use an id number from the source data.

       mailNickname = mventry("mail").Value.Split("@")(0)

       csentry = ExchangeUtils.CreateMailEnabledContact(MA, dn, mailNickname, mail)

       csentry.DN = dn

       csentry.CommitNewConnector()

    End If

  End Select

End Sub</pre>
<p> </p>
<h3 style="color: #365f91;">Create a Distribution List</h3>
<p> </p>
<pre>Public Sub Provision(ByVal mventry As MVEntry) Implements IMVSynchronization.Provision

  Dim csentry As CSEntry

  Dim MA As ConnectedMA

  Dim dn As ReferenceValue

  Dim rdn As String

  Dim mailNickname As String

  Dim mail As String

  Select Case mventry.ObjectType

  Case "group"

    MA = mventry.ConnectedMAs("MYDOMAIN")

    If MA.Connectors.Count = 0 Then

      rdn = "CN=" &amp; mventry("cn").StringValue

      dn = MA.EscapeDNComponent(rdn).Concat("OU=Groups,OU=MyOrg, " _

                                            &amp;"dc=mydomain,dc=local")

      mailNickname = mventry("mailNickname").StringValue

      csentry = ExchangeUtils.CreateDistributionlist(MA, dn, mailNickname)

      csentry.DN = dn

      csentry.CommitNewConnector()

    End If

  End Select

End Sub</pre>
<p> </p>
<h3 style="color: #365f91;">Create a Mail-Enabled Security Group</h3>
<p> </p>
<pre>Public Sub Provision(ByVal mventry As MVEntry) Implements IMVSynchronization.Provision

  Dim csentry As CSEntry

  Dim MA As ConnectedMA

  Dim dn As ReferenceValue

  Dim rdn As String

  Dim mailNickname As String

  Dim mail As String

  Select Case mventry.ObjectType

  Case "group"

    MA = mventry.ConnectedMAs("MYDOMAIN")

    If MA.Connectors.Count = 0 Then

      rdn = "CN=" &amp; mventry("cn").StringValue

      dn = MA.EscapeDNComponent(rdn).Concat("OU=Groups,OU=MyOrg, " _

                                            &amp; "dc=mydomain,dc=local")

      mailNickname = mventry("mailNickname").StringValue

      csentry = MA.Connectors.StartNewConnector("group")

      csentry("groupType").Value = -2147483640  'Universal Security

      csentry("displayName").Value = mventry("cn").StringValue

      csentry("mailNickname").Value = mailNickname

      csentry.DN = dn

      csentry.CommitNewConnector()

    End If

  End Select

End Sub</pre>
<p> </p>
<h3 style="color: #365f91;">Create a Dynamic Distribution List</h3>
<p> </p>
<p>This MVExtension code snippet creates Department DDLs.<br />
The department names have been imported into department objects in the Metaverse.<br />
The users’ department attribute matches exactly the department names.</p>
<pre>Public Sub Provision(ByVal mventry As MVEntry) Implements IMVSynchronization.Provision

  Dim csentry As CSEntry

  Dim MA As ConnectedMA

  Dim dn As ReferenceValue

  Dim rdn As String

  Dim mailNickname As String

  Dim mail As String

  Select Case mventry.ObjectType

  Case "department"

    MA = mventry.ConnectedMAs("MYDOMAIN")

    If MA.Connectors.Count = 0 Then

      rdn = "CN=" &amp; mventry("cn").StringValue

      dn = MA.EscapeDNComponent(rdn).Concat("OU=DDLs,OU=MyOrg, " _

                                            &amp; "dc=mydomain,dc=local")

      mailNickname = mventry("mailNickname").StringValue

      csentry = MA.Connectors.StartNewConnector("msExchDynamicDistributionList")

      csentry.DN = dn

      csentry("displayName").Value = mventry("cn").StringValue

      csentry("mailNickname").Value = mailNickname

      'The following filter selects users whose department equals the DDL cn

      csentry("msExchDynamicDLFilter").Value = "(&amp;(!cn=SystemMailbox{*})" _

         &amp; "(&amp;(&amp;(&amp;(&amp; (mailnickname=*)" _ 

         &amp; "(| (&amp;(objectCategory=person)(objectClass=user)" _

         &amp; "(|(homeMDB=*)(msExchHomeServerName=*))) )))" _

         &amp; "(objectCategory=user)(department=" _

         &amp; mventry("cn").StringValue &amp; "))))"

      csentry("msExchDynamicDLBaseDN").Value = "OU=Groups,OU=MyOrg, " _

                                            &amp; "dc=mydomain,dc=local"

      csentry.CommitNewConnector()

    End If

  End Select

End Sub</pre>
<p> </p>
<h2 style="color: #365f91;">ILM Forum Threads</h2>
<ul>
<li><a href="http://social.technet.microsoft.com/Forums/en-US/identitylifecyclemanager/thread/be387815-89ef-40cc-b063-91c9a5cb0e69/">Provisioning Exchange 2007 with ILM 2007</a></li>
<li><a href="http://social.technet.microsoft.com/Forums/en-US/identitylifecyclemanager/thread/dd7f2cfe-6bd2-4d99-b933-5356a5576e15/">ILM With FP1 and Exchange 2007</a></li>
<li><a href="http://social.technet.microsoft.com/Forums/en-CA/identitylifecyclemanager/thread/8c172bab-042f-45b7-ba73-14a8a27b9f0c">Exchange 2007 &#8216;Shared&#8217; Mailbox Provisioning with ExchangeUtils</a></li>
<li><a href="http://social.technet.microsoft.com/Forums/en-US/identitylifecyclemanager/thread/20485235-cd87-4550-a912-d6340bd8f8a0/">Attribute List for Exchnage 2003</a></li>
</ul>
<p> </p>
<h2 style="color: #365f91;">About the Author</h2>
<p>Carol Wapshere has been working in IT since 1990, and has since worked in many different organizations, across four different countries. She started out in Netware then moved into Microsoft server products, picking up an assortment of skills in other non-Microsoft systems along the way. She first started working with MIIS in 2005 and loved how it could be used to tie together disparate systems, bringing in much-needed order, and making lots of tedious jobs just disappear.</p>
<p>Thanks to Markus Vilcinskas and Peter Geelan for their help with this document.</p>
<hr class="sig" />
<p>http://www.wapshere.com/missmiis</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/managing-exchange-200020032007-with-ilm-2007/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Archiving Exchange Mailboxes with Exmerge</title>
		<link>http://www.wapshere.com/missmiis/archiving-exchange-mailboxes-with-exmerge</link>
		<comments>http://www.wapshere.com/missmiis/archiving-exchange-mailboxes-with-exmerge#comments</comments>
		<pubDate>Sat, 14 Jul 2007 01:30:48 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[Exchange 2003]]></category>
		<category><![CDATA[ILM 2007]]></category>
		<category><![CDATA[MIIS 2003]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=43</guid>
		<description><![CDATA[This method has now been updated for Exchange 2007.
Yesterday I posted about archiving home directories by zipping them with an extensible MA, and today I&#8217;m going to write about doing something similar with Exchange mailboxes.
Exchange mailboxes are most usefully archived to PST files, and the only way I found to automate it was Exmerge.
To install [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>This method has now been <a href="http://www.wapshere.com/missmiis/?p=113">updated for Exchange 2007</a>.</p></blockquote>
<p>Yesterday I posted about <a href="http://www.wapshere.com/missmiis/?p=40">archiving home directories</a> by zipping them with an extensible MA, and today I&#8217;m going to write about doing something similar with Exchange mailboxes.</p>
<p>Exchange mailboxes are most usefully archived to PST files, and the only way I found to automate it was <a href="http://support.microsoft.com/kb/174197" target="_blank">Exmerge</a>.</p>
<p>To install Exmerge on your MIIS server first install the Exchange System Management Tools, then follow the <a href="http://support.microsoft.com/kb/174197" target="_blank">MS Exmerge instructions</a>. Make sure you don&#8217;t have Outlook installed on the server &#8211; they won&#8217;t work together.</p>
<p>The big point to note about using Exmerge is that <em>it won&#8217;t work if the user account has been disabled or deleted</em>. It is therefore critical that you get the mailboxes archived before allowing an export to AD that will close the account.</p>
<p>Now it should be perfectly possible to do all this with an Extensible MA, much the way I did with the home directories. You would call Exmerge as part of the export step in the CSExtension code, and only change the Status once the mailbox had been successfully archived. Flowing the Status back into the metaverse would be a trigger for disabling/deleting the user account in AD.</p>
<p>If I was setting up an environment where only the odd account was disabled here and there I would probably do it that way. However, in the university environment I was working in, several hundred accounts would be disabled at a time. Exmerge can be quite slow, especially on large mailboxes (we were generous to our students). It also has a neat multi-threading capability, allowing it to plough through several mailboxes at a time &#8211; but only if you give it the whole list at once. MIIS, by it&#8217;s very nature, works on a single object at a time &#8211; so I found it preferable to run Exmerge outside MIIS.</p>
<p>Rather that an Extensible MA, I just used a simple SQL MA to populate a list of pending Disables. My <a href="http://www.wapshere.com/missmiis/?p=26">queuing system</a> periodically checks the list for mailboxes to be archived &#8211; though there&#8217;s no reason why a Scheduled Task wouldn&#8217;t work just as well. If there are any there, they are placed in a text file and Exmerge fired up to deal with then. Another script checks the Exmerge logs for success or failure messages, and updates the Status accordingly. Once the mailbox staus of &#8220;archived&#8221; is flowed back into the metaverse the account can be safely disabled.</p>
<p>I&#8217;m not going to go into a lot more detail about this, other than to link to some vbscript snippets which may be of use.</p>
<ol>
<li><a href="http://www.wapshere.com/missmiis/?page_id=44">Check if Exmerge is already running</a></li>
<li><a href="http://www.wapshere.com/missmiis/?page_id=45">Populate per-server lists for Exmerge</a></li>
<li><a href="http://www.wapshere.com/missmiis/?page_id=46">Run Exmerge</a></li>
<li><a href="http://www.wapshere.com/missmiis/?page_id=47">Check the Exmerge log for results</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/archiving-exchange-mailboxes-with-exmerge/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding Exchange 2003 Mailboxes to Existing Accounts</title>
		<link>http://www.wapshere.com/missmiis/adding-exchange-mailboxes-to-existing-accounts</link>
		<comments>http://www.wapshere.com/missmiis/adding-exchange-mailboxes-to-existing-accounts#comments</comments>
		<pubDate>Thu, 14 Jun 2007 12:16:29 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[AD]]></category>
		<category><![CDATA[Exchange 2003]]></category>
		<category><![CDATA[ILM 2007]]></category>
		<category><![CDATA[MIIS 2003]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=19</guid>
		<description><![CDATA[Here’s another trick that is really very simple, but, for reasons I can’t figure out, difficult to find out about. Despite what the documentation seems to say (and despite what I have read MS employees categorically stating), you CAN add an Exchange mailbox to an account that already exists in AD. 
Bundled with MIIS are [...]]]></description>
			<content:encoded><![CDATA[<p><span lang="EN-GB"><span style="font-family: Times New Roman;">Here’s another trick that is really very simple, but, for reasons I can’t figure out, difficult to find out about. Despite what the documentation seems to say (and despite what I have read MS employees categorically stating), you CAN add an Exchange mailbox to an account that already exists in AD.</span></span><span lang="EN-GB"><span style="font-family: Times New Roman;"> </span></span></p>
<p><span lang="EN-GB"><span lang="EN-GB"><span style="font-family: Times New Roman;">Bundled with MIIS are various programming extensions we make use of, including the </span><a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mmsdev/mms/example__mailbox.asp"><span style="font-family: Times New Roman;">ExchangeUtils</span></a><span style="font-family: Times New Roman;">. This collection of methods simplifies the creation of Exchange users, contacts and distribution lists – but like all these things it has its own quirks and apparent oversights.</span></span><span lang="EN-GB"><span style="font-family: Times New Roman;"> </span></span></span></p>
<p><span lang="EN-GB"></span><span lang="EN-GB"><span lang="EN-GB"><span style="font-family: Times New Roman;">You may well think, on first glance, that ExchangeUtils.CreateMailEnabledUser would create a User+Mailbox, and ExchangeUtils.CreateMailbox would just create a mailbox, however this is not the case. If you want to create a User+Mailbox then what you need is actually ExchangeUtils.CreateMailbox. Don’t ask me what ExchangeUtils.CreateMailEnabledUser is for – I never did find a use for it.</span></span><span lang="EN-GB"><span style="font-family: Times New Roman;"> </span></span></span></p>
<p><span lang="EN-GB"><span lang="EN-GB"><span style="font-family: Times New Roman;">So, if you just need to create brand new users, complete with mailbox, then you’re set – use ExchangeUtils.CreateMailbox in your provisioning code, as per the examples in the Developers Reference.</span></span><span lang="EN-GB"><span style="font-family: Times New Roman;"> </span></span></span></p>
<p><span lang="EN-GB"><span lang="EN-GB"><span lang="EN-GB"><span style="font-family: Times New Roman;">BUT this isn’t always enough. There are plenty of cases where you may want to add a mailbox to an existing user account. You don’t want to create a new one, because then the poor ole user will lose her password and profile. Happily it is perfectly possible to do, you just use the export flow rules in your MAExtension to set the following values:</span></span></span></span></p>
<ul style="margin-top: 0cm" type="disc">
<li class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-GB"><span style="font-family: Times New Roman;">homeMDB</span></span></li>
<li class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-GB"><span style="font-family: Times New Roman;">mDBUseDefaults</span></span></li>
</ul>
<p><span lang="EN-GB"><span lang="EN-GB"><span style="font-family: Times New Roman;">You’re going to need some tests before you can decide if a mailbox is needed. The first question to answer is <em>does the user already have a mailbox?</em> I like to use msExchMailboxGUID for this. I flow the value from AD into the metaverse, and then it’s a simple matter of checking</span></span></span></p>
<blockquote><p><span lang="EN-GB"><span style="font-family: Times New Roman;">If mventry(“msExchMailboxGUID”).IsPresent</span></span><span lang="EN-GB"><span style="font-family: Times New Roman;"> </span></span></p></blockquote>
<p><span lang="EN-GB"><span lang="EN-GB"><span style="font-family: Times New Roman;">Your next question is <em>should the user have a mailbox?</em> This is a test you can perform either in the MVExtension or in the MAExtension, though if you use the MAExtension you will have to repeat the test for each export flow rule. If you make the decision in the MVExtension then use a </span><a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mmsdev/mms/utils_transactionproperties.asp"><span style="font-family: Times New Roman;">Utils.TransactionProperties</span></a><span style="font-family: Times New Roman;"> to set a flag:</span></span></span></p>
<blockquote><p><span lang="EN-GB"><span style="font-family: Times New Roman;">If &lt;&lt;some condition&gt;&gt; Then</span></span><br />
<span lang="EN-GB"><span style="font-family: Times New Roman;">Utils.TransactionProperties(“CreateMailbox”) = TRUE</span></span><br />
<span lang="EN-GB"><span style="font-family: Times New Roman;">End If</span></span><span lang="EN-GB"><span style="font-family: Times New Roman;"> </span></span></p></blockquote>
<p><span lang="EN-GB"><span style="font-family: Times New Roman;">The MAExtension code will then look something like this:</span></span><span lang="EN-GB"><span style="font-family: Times New Roman;"> </span></span></p>
<blockquote><p><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New';">Public</span><span style="font-size: 8pt; font-family: 'Courier New';"> <span style="color: #0000ff;">Sub</span> MapAttributesForExport(<span style="color: #0000ff;">ByVal</span> FlowRuleName <span style="color: #0000ff;">As</span> <span style="color: #0000ff;">String</span>, <span style="color: #0000ff;">ByVal</span> </span><span style="font-size: 8pt; font-family: 'Courier New';">mventry <span style="color: #0000ff;">As</span> MVEntry, <span style="color: #0000ff;">ByVal</span> csentry <span style="color: #0000ff;">As</span> CSEntry) </span><span style="font-size: 8pt; font-family: 'Courier New';"><span style="color: #0000ff;">Implements</span> </span><span style="font-size: 8pt; font-family: 'Courier New';">IMASynchronization.MapAttributesForExport()</span><br />
<span style="font-size: 8pt; font-family: 'Courier New';"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="color: #0000ff;">Select</span> <span style="color: #0000ff;">Case</span> FlowRuleName</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New';"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="color: #0000ff;">Case</span> &#8220;exportHomeMDB&#8221;</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New';"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="color: #0000ff;">If</span> Utils.TransactionProperties(“CreateMailbox”) <span style="color: #0000ff;">Then</span> </span><span style="font-size: 8pt; font-family: 'Courier New';"></span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New';"><span style="font-size: 8pt; font-family: 'Courier New';">csentry(&#8220;homeMDB&#8221;).Value = &#8220;CN=&#8221; &amp; _</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New';"><span style="font-size: 8pt; font-family: 'Courier New';">mventry(&#8220;MDB&#8221;).Value &amp; &#8220;,CN=&#8221; &amp; _</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New';"><span style="font-size: 8pt; font-family: 'Courier New';">mventry(&#8220;StorageGroup&#8221;).Value &amp; _</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New';"><span style="font-size: 8pt; font-family: 'Courier New';">&#8220;,CN=InformationStore,&#8221; &amp; _</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New';"><span style="font-size: 8pt; font-family: 'Courier New';">&#8220;CN=&#8221; &amp; mventry(&#8220;MailServer&#8221;).Value &amp; &#8220;,&#8221; &amp; _</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New';"><span style="font-size: 8pt; font-family: 'Courier New';">EXCHANGE_DN</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New';"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="color: #0000ff;">End</span> <span style="color: #0000ff;">If</span></span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New';"><span style="font-size: 8pt; font-family: 'Courier New';"></span></span><span style="font-size: 8pt; font-family: 'Courier New';"><span style="font-size: 8pt; font-family: 'Courier New';"></span></span></p>
<p><span style="font-size: 8pt; font-family: 'Courier New';"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="color: #0000ff;">Case</span> &#8220;exportMDBUseDefaults&#8221;</span><br />
</span><span style="font-size: 8pt; font-family: 'Courier New';"><span style="color: #0000ff;">If</span> Utils.TransactionProperties(“CreateMailbox”) <span style="color: #0000ff;">Then</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New';"></span><span style="font-size: 8pt; font-family: 'Courier New';">csentry(&#8220;mDBUseDefaults&#8221;).Value = <span style="color: #0000ff;">True</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New';"></span><span style="font-size: 8pt; font-family: 'Courier New';"><span style="color: #0000ff;">End</span> <span style="color: #0000ff;">If</span></span><span style="font-size: 8pt; font-family: 'Courier New';"> </span><br />
<span style="font-size: 8pt; font-family: 'Courier New';"><span style="font-size: 8pt; font-family: 'Courier New';"></span></span></p>
<p><span style="font-size: 8pt; font-family: 'Courier New';"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="color: #0000ff;">Case</span> <span style="color: #0000ff;">Else</span></span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New';"><span style="font-size: 8pt; font-family: 'Courier New';"></span><span style="font-size: 8pt; font-family: 'Courier New';"><span style="color: #0000ff;">Throw</span> <span style="color: #0000ff;">New</span> UnexpectedDataException(&#8220;Unexpected flow rule name: &#8221; &amp; FlowRuleName)</span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New';"> </span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New';"></span></p>
<p><span style="font-size: 8pt; font-family: 'Courier New';"><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New';">End</span><span style="font-size: 8pt; font-family: 'Courier New';"> <span style="color: #0000ff;">Sub</span></span><span lang="EN-GB"><span style="font-family: Times New Roman;"> </span></span><br />
</span></p></blockquote>
<p><span lang="EN-GB"><span lang="EN-GB"><span style="font-family: Times New Roman;">The flow rule for homeMDB looks a bit complicated, but we’re really just constructing a long string. Use your preferred LDAP tool (I like </span><a href="http://www.ldapbrowser.com/"><span style="font-family: Times New Roman;">Softerra</span></a><span style="font-family: Times New Roman;">, but you can use </span><a href="http://support.microsoft.com/kb/224543"><span style="font-family: Times New Roman;">Ldp</span></a><span style="font-family: Times New Roman;"> if you must) to have a look at some existing homeMDB settings in your AD forest. In my example I have the values for MDB, StorageGroup and MailServer already in the metaverse, but you may be looking them up in an XML file or something – whatever suits your installation best.</span></span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/adding-exchange-mailboxes-to-existing-accounts/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

