<?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 2007</title>
	<atom:link href="http://www.wapshere.com/missmiis/category/exchange2007/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wapshere.com/missmiis</link>
	<description>Adventures in identity management</description>
	<lastBuildDate>Fri, 10 Sep 2010 13:30:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>A script to remove training spaces from public folder names</title>
		<link>http://www.wapshere.com/missmiis/a-script-to-remove-training-spaces-from-public-folder-names</link>
		<comments>http://www.wapshere.com/missmiis/a-script-to-remove-training-spaces-from-public-folder-names#comments</comments>
		<pubDate>Fri, 10 Sep 2010 13:30:41 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[Exchange 2007]]></category>
		<category><![CDATA[powershell]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=997</guid>
		<description><![CDATA[I am completely sick of the sight of this error: WARNING: Object \public folder path   has been corrupted and it is in an inconsistent state. The following validation errors have occurred: WARNING: The Name property contains leading or trailing whitespace, which must be removed. So here&#8217;s powershell script to find and rename the offending folders. (Why [...]]]></description>
			<content:encoded><![CDATA[<p>I am completely sick of the sight of this error:</p>
<p>WARNING: Object \<em>public folder path  </em> has been corrupted and it is in an inconsistent state. The following validation errors have occurred:<br />
WARNING: The Name property contains leading or trailing whitespace, which must be removed.</p>
<p>So here&#8217;s powershell script to find and rename the offending folders. (Why exactly Outlook allows people to name them with a space at the end I DO NOT KNOW!)<span id="more-997"></span></p>
<div></div>
<p><code></p>
<pre>$getpfcmd = "get-publicfolder -Recurse -resultsize unlimited"
invoke-expression $getpfcmd | foreach {
    if ($_.Name -ne $null -and $_.Name.substring($_.Name.length - 1,1) -eq " ")
	{
	    write-host $_.Name
	    $newname = $_.Name.Trim()
             $pfid = $_.identity.MapiEntryId.tostring()
	    Set-PublicFolder -Identity $pfid  -Name $newname
	}
}</pre>
<p> </p>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/a-script-to-remove-training-spaces-from-public-folder-names/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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. I&#8217;ve only tested this between two single-domain forests so far, and error checking [...]]]></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.</p>
<p>I&#8217;ve only tested this between two single-domain forests so far, and error checking is minimal. I may update the script with more enhancements at a later date. <span id="more-819"></span> </p>
<div></div>
<p><code></p>
<pre>### --- GALSYNC.PS1 ---
#
#  Written by Carol Wapshere
#
#  Manages contacts in two domains based on mail-enabled users in the other domain.
#	- Contacts are created for new users.
#	- Contacts are deleted if the source user no longer meets the filter requirements.
#	- Contacts are updated with changed information.
#
#  NOTES:
#   - Requires RSAT roles and features installed. Ref http://blogs.technet.com/heyscriptingguy/archive/2010/01/25/hey-scripting-guy-january-25-2010.aspx
#	- Attribute deletions are not replicated - only attribute adds and changes.
#   - A user account is needed in each domain with permission to create contacts.
#	- The passwords for these user accounts must be stored in secure files using the command:
#		read-host -assecurestring | convertfrom-securestring | out-file C:\scripts\filename.txt
#

### --- GLOBAL DEFINITIONS ---

$DOMAIN_1 = "mydomain.local"
$DOMAIN_2 = "myotherdomain.com"

$OU_CONTACTS_1 = "OU=Domain2,OU=Contacts,DC=mydomain,DC=local"
$OU_CONTACTS_2 = "OU=Domain1,OU=Contacts,DC=myotherdomain,DC=com"

$USER_1 = "galsync@mydomain.local"
$USER_2 = "galsync@myotherdomain.com"

$PWFILE_1 = "C:\scripts\dom1cred.txt"
$PWFILE_2 = "C:\scripts\dom2cred.txt"

## The following list of attributes will be copied from User to Contact
$arrAttribs = 'company','givenName','mobile','postalAddress','postalCode','sn','st','streetAddress','telephoneNumber','title' ,'mail','c','co','l','facsimileTelephoneNumber','physicalDeliveryOfficeName'

## The following filter is used by Get-ADObject to decide which users will have contacts.
$strSelectUsers = 'ObjectClass -eq "user" -and homeMDB -like "*" -and -not userAccountControl -bor 2 -and -not msExchHideFromAddressLists -eq $true -and -not displayName -eq "Administrator"'

### --- FUNCTION TO ADD, DELETE AND MODIFY CONTACTS IN TARGET DOMAIN BASED ON SOURCE USERS ---

function SyncContacts
{
  PARAM($sourceDC, $sourceUser, $sourcePWFile, $targetDC, $targetUser, $targetPWFile, $targetOU)
  END
    {
	$colUsers = @()
	$colContacts = @()
	$colAddContact = @()
	$colDelContact = @()
	$colUpdContact = @()

	$arrUserMail = @()
	$arrContactMail = @()

	write-host "Enumerating..."

	### ENUMERATE USERS

	$password = get-content $sourcePWFile | convertto-securestring
	$sourceCred =  New-Object -Typename System.Management.Automation.PSCredential -Argumentlist $sourceUser,$password

	$colUsers = Get-ADObject -Filter $strSelectUsers -Properties * -Server $sourceDC -Credential $sourceCred

    if ($colUsers.Count -eq 0)
    {
        write-host "No users found in source domain!"
        break
    }

	foreach ($user in $colUsers)
	{
		$arrUserMail += $user.mail
	}

	### ENUMERATE CONTACTS

	$password = get-content $targetPWFile | convertto-securestring
	$targetCred =  New-Object -Typename System.Management.Automation.PSCredential -Argumentlist $targetUser,$password

	$colContacts = Get-ADObject -Filter 'objectClass -eq "contact"' -searchbase $targetOU -Server $targetDC -Credential $targetCred -Properties targetAddress

	foreach ($contact in $colContacts)
	{
		$strAddress = $contact.targetAddress -replace "SMTP:",""
		$arrContactMail += $strAddress
	}

	### FIND CONTACTS TO ADD AND UPDATE

	foreach ($user in $colUsers)
	{
		if ($arrContactMail -contains $user.mail)
		{
			write-host "Contact found for " $user.mail
			$colUpdContact += $user
		}
		else
		{
			write-host "No contact found for " $user.mail
			$colAddContact += $user
		}
	}

	### FIND CONTACTS TO DELETE

	foreach ($address in $arrContactMail)
	{
		if ($arrUserMail -notcontains $address)
		{
			$colDelContact += $address
			write-host "Contact will be deleted for " $address
		}
	}

	write-host ""
	write-host "Updating ...."

	### ADDS

	foreach ($user in $colAddContact)
	{
		write-host "ADDING contact for " $user.mail

		$hashAttribs = @{'targetAddress' = "SMTP:" + $user.mail}
		foreach ($attrib in $arrAttribs)
		{
			if ($user.$attrib -ne $null) { $hashAttribs.add($attrib, $user.$attrib) }
		}
		New-ADObject -name $user.displayName -type contact -Path $targetOU -Description $user.description -server $targetDC -credential $targetCred -OtherAttributes $hashAttribs
	}

	### UPDATES

	foreach ($user in $colUpdContact)
	{
		write-host "VERIFYING contact for " $user.mail

		$strFilter = "targetAddress -eq ""SMTP:" + $user.mail + """"
		$colContacts = Get-ADObject -Filter $strFilter -searchbase $targetOU -server $targetDC -credential $targetCred -Properties *
		foreach ($contact in $colContacts)
		{
			$hashAttribs = @{}
			foreach ($attrib in $arrAttribs)
			{
				if ($user.$attrib -ne $null -and $user.$attrib -ne $contact.$attrib)
				{
					write-host "	Changing " $attrib
					write-host "		Before: " $contact.$attrib
					write-host "		After: " $user.$attrib
					$hashAttribs.add($attrib, $user.$attrib)
				}
			}
			if ($hashAttribs.Count -gt 0)
			{
				Set-ADObject -identity $contact -server $targetDC -credential $targetCred -Replace $hashAttribs
			}
		}

	}

	### DELETES

	foreach ($contact in $colDelContact)
	{
		write-host "DELETING contact for " $contact
		$strFilter = "targetAddress -eq ""SMTP:" + $contact + """"
		Get-ADObject -Filter $strFilter -searchbase $targetOU -server $targetDC -credential $targetCred | Remove-ADObject -server $targetDC -credential $targetCred -Confirm:$false
	}

  }
}

### --- MAIN ---

Start-Transcript galsync.log

if(@(get-module | where-object {$_.Name -eq "ActiveDirectory"} ).count -eq 0) {import-module ActiveDirectory}

write-host "DOMAIN1 Users --&gt; DOMAIN2 Contacts"
SyncContacts -sourceDC $DOMAIN_1 -sourceUser $USER_1 -sourcePWFile $PWFILE_1 -targetDC $DOMAIN_2 -targetUser $USER_2 -targetPWFile $PWFILE_2 -targetOU $OU_CONTACTS_2

write-host ""
write-host "DOMAIN2 Users --&gt; DOMAIN1 Contacts"
SyncContacts -sourceDC $DOMAIN_2 -sourceUser $USER_2 -sourcePWFile $PWFILE_2 -targetDC $DOMAIN_1 -targetUser $USER_1 -targetPWFile $PWFILE_1 -targetOU $OU_CONTACTS_1

Stop-Transcript</pre>
<p>  </p>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/a-galsync-powershell-script/feed</wfw:commentRss>
		<slash:comments>17</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 [...]]]></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>A real life SCR failover</title>
		<link>http://www.wapshere.com/missmiis/a-real-life-scr-failover</link>
		<comments>http://www.wapshere.com/missmiis/a-real-life-scr-failover#comments</comments>
		<pubDate>Fri, 06 Nov 2009 20:41:37 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[Exchange 2007]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=563</guid>
		<description><![CDATA[Quite unexpectedly this week, I got to genuinely use SCR &#8220;in anger&#8221; when I killed a client&#8217;s production Exchange 2007 server by attempting to install SP2 on it (for that whole sorry story see http://social.technet.microsoft.com/Forums/en/exchangesoftwareupdate/thread/713d2b17-f19d-4eaf-8146-c51f59942d08?prof=required). I&#8217;ll keep my swearing about SP2 off the page here and focus on the hero of the week &#8211; which was SCR! I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>Quite unexpectedly this week, I got to genuinely use SCR &#8220;in anger&#8221; when I killed a client&#8217;s production Exchange 2007 server by attempting to install SP2 on it (for that whole sorry story see <a href="http://social.technet.microsoft.com/Forums/en/exchangesoftwareupdate/thread/713d2b17-f19d-4eaf-8146-c51f59942d08?prof=required">http://social.technet.microsoft.com/Forums/en/exchangesoftwareupdate/thread/713d2b17-f19d-4eaf-8146-c51f59942d08?prof=required</a>). I&#8217;ll keep my swearing about SP2 off the page here and focus on the hero of the week &#8211; which was SCR!</p>
<p><span id="more-563"></span></p>
<p>I&#8217;ve had some problems with setting up SCR on earlier rollup packs (ru5 and earlier). On one server I could only do manual reseeds, and I had some problems with <a href="http://www.wapshere.com/missmiis/exchange-2007-outlook-anywhere-on-windows-2008-the-ipv6-bug-is-still-there">ipv6, OA and SCR</a>. But that was then &#8211; this week, using SP1RU9 and SP2, SCR has manifestly done what it&#8217;s supposed to.</p>
<p>The setup was as follows:</p>
<ul>
<li>Two identically spec&#8217;d servers with Mailbox, Hub and CAS roles</li>
<li>Eight storage groups of between 500MB and 25GB in size.</li>
</ul>
<h3>Configuring SCR</h3>
<p>I configured SCR following the <a href="http://technet.microsoft.com/en-us/library/bb676465.aspx">technet docs</a>.  But in brief I:</p>
<ol>
<li>Created Data and Log folders on the target server that matched the source server.</li>
<li>Used the Enable-StorageGroupCopy cmdlet to get things started:
<ul>
<li><span lang="EN-US">Enable-StorageGroupCopy -identity <em>StorageGroup</em> -ReplayLagTime 0 -StandbyMachine <em>TargetServer</em></span></li>
</ul>
</li>
<li><span lang="EN-US">Ran the Update-StorargeGroupCopy cmdlet on the <em>target</em> server to seed the replication:</span>
<ul>
<li><span lang="EN-US">Update-StorageGroupCopy -Identity <em>SourceServer</em>\<em>StorageGroup</em> -StandbyMachine <em>TargetServer</em></span></li>
</ul>
</li>
<li><span lang="EN-US"><span lang="EN-US">Created standby storage groups and mail databases on the target server, according to the advice in the technet articles. These have different Data and Log folder to the copy locations, but are waiting and ready to have their paths changed at the moment of urgency. It really does make the failover procedure much quicker!</span></span></li>
<li><span lang="EN-US">Monitored the status of SCR with the Get-StorageGroupCopyStatus cmdlet:</span>
<ul>
<li><span lang="EN-US">Get-StorageGroupCopyStatus -StandbyMachine TargetServer</span></li>
</ul>
</li>
</ol>
<h3>Failing Over</h3>
<p>I failed over the databases using the process I outlined in <a href="http://www.wapshere.com/missmiis/exchange-2007-failover-and-failback-with-scr">this post</a>. This is where SCR really came into its own. The failover process took about 10 minutes per database (and you can do several in parallel). The longest part was actually the final step which reassigns users to their new MDB.</p>
<p>The best thing of all was we had NO DATA LOSS! I admit to some confusion over the whole &#8220;inbuilt 50 log limit&#8221; thing &#8211; but now I see that this is only a roll-in limit &#8211; the logs are replicated immediately, and the eseutil command, which you run as part of the failover process, rolls them in. The only way you can lose data with SCR is if the source server crashes before, or during, replicating the absolutely most recent logs. Data loss, if any, will therefore be very small.</p>
<h3>Syncing Back</h3>
<p>We plan to fail back but we haven&#8217;t done it yet. Everything is running on the DRP server and we&#8217;re going to let the dust settle a bit before we move back to the (now rebuilt) original server. In my <a href="http://www.wapshere.com/missmiis/exchange-2007-failover-and-failback-with-scr">earlier SCR post</a> I outlined a manual database copy back to the source server, which involved downtime.  But actually I&#8217;m trying something different now it&#8217;s really happening.</p>
<p>Basically I have set the original server as my new SCR target. To do this I <em>did not</em> recreate the Storage Groups and Mail Databases on the original server &#8211; I just made sure the same Data and Logs folders were available.</p>
<p>When the time comes to do the full failover I will essentially execute the failover procedure in the opposite direction. I will post again with the exact steps when its done.</p>
<h3>Other things to think of</h3>
<p>If you want your DRP server to also take over Hub, CAS and Public Folder roles, then there is more than just SCR to think about.</p>
<h4>CAS Role</h4>
<p>It is good planning to assign a CName to your OWA and ActiveSync URL. Just make sure that all your possible CAS servers include this CName in their certificate: <a href="http://technet.microsoft.com/en-us/library/aa995942.aspx">http://technet.microsoft.com/en-us/library/aa995942.aspx</a></p>
<p>Also be aware of something I had forgotten &#8211; Outlook can only redirect a user to their new server <em>if the old server is responding</em>. This is a total sh*t if your old server is dead and gone. I read somewhere that it may work to assign the old server name to the new server as a CName, but you may not be able to do that if you are still trying to resurrect the old one. We got by with OWA and the hard-pressed Helpdesk having to talk a lot of people through changing their Outlook profile. If you really want to be prepared then write a script now that can change the server in outlook profile (googling shows various options &#8211; none of which I&#8217;ve tried as yet &#8211; though one of my collegues says MAINTWIZ can help).</p>
<h4>Hub Role</h4>
<p>Make sure all Send and Receive connectors are replicated somewhere. Use costs on Send connectors to favour your usual production route.</p>
<p>Also, if you have scripts or applications sending email via the Exchange server, make sure a CName is used which you can rapidly change in DNS.</p>
<h4>Public Folders</h4>
<p>Make sure all your Public Folders, FREE BUSY and OAB folders have more than one replica server.</p>
<p>I had some weird experiences with trying to add the DRP server as an extra replica to top-level folders. Then I found <a href="http://clintboessen.blogspot.com/2009/06/cannot-add-replicas-to-certain-system.html">this post</a> and after that I gave up. It did mean that, after the failover, I had to manually add the DRP server as a replica to the top-level folders.</p>
<p> I also had other bizarre public folder errors which involved:</p>
<ul>
<li>Manually changing the Default public folder database on the Mail Databases on the DRP server (see the Client Settings tab on the properties of the Mail Database in Exchange Management Console),</li>
<li>Manually changing the siteFolderServer property on the Administrative Group objects in AD,</li>
<li>Manually changing the siteFolderServer and offLineABServer on the Default Offline Address Book object in AD.</li>
</ul>
<h2>In summary&#8230;</h2>
<p>The SCR part of the failover was the easiest part of the whole week &#8211; we had more trouble with incorrect public folder settings, missing Send connectors, and a fussy backup client that didn&#8217;t want to install on the DRP server.</p>
<p>The biggest problem with SCR is that there is no straight-forward &#8220;fail back&#8221; procedure. As I&#8217;ve said before, SCR is <em>not</em> a cluster, but rather a one-way replication to a standby server. However I think it is proving itself to be a great technology, and it&#8217;s no wonder that Exchange 2010 is building on the SCR model with Database Availability Groups. I&#8217;m looking forward to them! (Despite the dodgy anagram, which you have to be Australian to appreciate. You dag.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/a-real-life-scr-failover/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ExternalEmailAddress is mandatory on MailUser</title>
		<link>http://www.wapshere.com/missmiis/externalemailaddress-is-mandatory-on-mailuser</link>
		<comments>http://www.wapshere.com/missmiis/externalemailaddress-is-mandatory-on-mailuser#comments</comments>
		<pubDate>Tue, 15 Sep 2009 09:07:07 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[Exchange 2007]]></category>
		<category><![CDATA[ILM 2007]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=549</guid>
		<description><![CDATA[I just got this error while attempting to provision Exchange 2007 users with ILM 2007 FP1: Event Type:    Error Event Source:    MIIServer Event Category:    Server Event ID:    6801 Date:        15.09.2009 Time:        10:14:02 User:        N/A Computer:    ILMSERVER Description: The extensible extension returned an unsupported error in MIIS. The stack trace is: "Microsoft.MetadirectoryServices.ExtensionException: **** [...]]]></description>
			<content:encoded><![CDATA[<p>I just got this error while attempting to provision Exchange 2007 users with ILM 2007 FP1:</p>
<p><code> </code></p>
<pre>Event Type:    Error
Event Source:    MIIServer
Event Category:    Server
Event ID:    6801
Date:        15.09.2009
Time:        10:14:02
User:        N/A
Computer:    ILMSERVER
Description:
The extensible extension returned an unsupported error in MIIS.
The stack trace is:

"Microsoft.MetadirectoryServices.ExtensionException:
**** ERROR ****

ExternalEmailAddress is mandatory on MailUser.

**** END ERROR ****

**** ERROR ****

The mail contact and mail user must have a valid external e-mail address.

**** END ERROR ****

at Exch2007Extension.Exch2007ExtensionClass.AfterExportEntryToCd(Byte[] origAnchor, String origDN, String origDeltaEntryXml, Byte[] newAnchor, String newDN, String failedDeltaEntryXml, String errorMessage)
Microsoft Identity Integration Server 3.3.0118.0"</pre>
<p>This event had been asked about on the Technet forum, but the answers talked about rollup versions &#8211; and I had RU9 on both the Exchange and ILM servers.</p>
<p>Eventually I figured out there was a typo in my homeMDB string. The clue was that all the expected mail attributes were populated in AD, except homeMDB.</p>
<p>Now what &#8220;ExternalEmailAddress&#8221; has to do with homeDMB I do not know!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/externalemailaddress-is-mandatory-on-mailuser/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Exchange 2007 Failover and Failback with SCR</title>
		<link>http://www.wapshere.com/missmiis/exchange-2007-failover-and-failback-with-scr</link>
		<comments>http://www.wapshere.com/missmiis/exchange-2007-failover-and-failback-with-scr#comments</comments>
		<pubDate>Mon, 27 Apr 2009 20:47:27 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[Exchange 2007]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=517</guid>
		<description><![CDATA[I&#8217;ve been doing a bit of work with SCR lately, the point being to achieve a &#8220;poor man&#8217;s failover&#8221; for the mailbox server role. Not everyone needs the immediacy, or the expense, of a cluster, and SCR was a welcome addition to the redundacy capabilities of Exchange 2007 &#8211; but I couldn&#8217;t find a complete [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been doing a bit of work with SCR lately, the point being to achieve a &#8220;poor man&#8217;s failover&#8221; for the mailbox server role. Not everyone needs the immediacy, or the expense, of a cluster, and SCR was a welcome addition to the redundacy capabilities of Exchange 2007 &#8211; but I couldn&#8217;t find a complete step-by-step resource for failover and failback so, after having worked it all out myself, here it all is. <span id="more-517"></span></p>
<h2>What SCR is, and isn&#8217;t</h2>
<p>I am not going to rehash the <a href="http://technet.microsoft.com/en-us/library/bb676571.aspx">SCR documentation</a> &#8211; but I will add some observations of my own.</p>
<ul>
<li>SCR is <em>not </em>a cluster.</li>
<li>SCR is a way of copying the mail databases to another server where they can be activated without too much fuss &#8211; though there is nothing instantaneous about it because it is <em>not</em> a cluster.</li>
<li>SCR failover can be achieved through database portability or through setup /m:Recover.
<ul>
<li>The setup option actually rebuilds your standby server as the primary so it is not a good choice if you expect the primary to be back in business at some point.</li>
<li>Database portability is a better choice for most failover scenarios.</li>
</ul>
</li>
<li>Database portabilty should really be compared to restoring mail databases from backup rather than clustering (because remember, it&#8217;s <em>not</em> a cluster) &#8211; where it compares very favorably because:
<ul>
<li>it&#8217;s a lot faster as the data is already there on the standby server, and doesn&#8217;t need to be restored off tape, and</li>
<li>it&#8217;s a heck of a lot more up-to-date than a tape backup is likely to be.</li>
</ul>
</li>
<li>And finally &#8211; the failback takes a lot longer than the failover.</li>
</ul>
<h2>Preparing the Servers</h2>
<p>Again all the information about setting up SCR is on technet <a href="http://technet.microsoft.com/en-us/library/bb676465.aspx">here</a> so I&#8217;m just going to add some description about the storage group config, which had not been immediately obvious to me. Let&#8217;s say you have storage group SG1 containing mailbox database MBX1 on SRV1. You want SRV2 to be able to mount the database in case of corruption on SRV1, or all out failure of SRV1. The logs and data locations are as follows:</p>
<table border="0">
<tbody>
<tr>
<td>SG1 Logs</td>
<td>E:\Logs\SG1</td>
</tr>
<tr>
<td>SG1 System</td>
<td>E:\Logs\SG1</td>
</tr>
<tr>
<td>MBX1 Data</td>
<td>F:\Data\SG1</td>
</tr>
</tbody>
</table>
<p>The first thing you have to do is create the exact same folders in the exact same paths on the target server &#8211; but just leave them empty.</p>
<p>The next thing you do, and this is not an immediately obvious step, is to create a placeholder storage group and mail database on SRV2. If the time comes to failover you will actually mount the database copy in this placeholder DB &#8211; but you can&#8217;t give it the same name as the original. Got that?</p>
<p>Following the example naming from <a href="http://technet.microsoft.com/en-us/library/bb738132.aspx">technet</a>, create storage group SG1PORT and mail database MBX1PORT on SRV2. Mount the db, just to check it works, and then dismount again.</p>
<h2>Failover Steps</h2>
<p>The time has come to move MBX1 to the standby server. These steps should be easily achievable in half an hour. It is assumed SRV1 is down, or at least the MBX1 database is not mounted on SRV1. <strong></strong></p>
<p><strong>1. Prepare storage group for restore operation</strong></p>
<p>Open the Exchange Management Shell on SRV2 and run the following commands.</p>
<p><code>Restore-StorageGroupCopy SRV1SG1 -StandbyMachine SRV2</code></p>
<p>Use the <code>"-force"</code> switch if the source server is down.</p>
<p><strong>2. Repair database copy</strong></p>
<p>Test current state of database copy. Look for &#8220;Clean Shutdown&#8221; or &#8220;Dirty Shutdown&#8221;.</p>
<p><code>eseutil /mh "F:DataSG1MBX1.edb"</code></p>
<p>Repair database if in &#8220;Dirty Shutdown&#8221; state. Replace n with the number on the log files in the Log folder.</p>
<p><code>eseutil /r E0<em>n</em></code></p>
<p>Confirm &#8220;Clean Shutdown&#8221; state:</p>
<p><code>eseutil /mh "F:DataSG1MBX1.edb"</code> <strong></strong></p>
<p><strong>3. Move the folder locations of SG1PORT so they point to the SCR copied locations</strong></p>
<p><code>Move-StorageGroupPath SRV2SG1PORT -SystemFolderPath "E:LogsSG1" -LogFolderPath "E:LogsSG1" -ConfigurationOnly Move-DatabasePath SRV2SG1PORTMBX1PORT -EdbFilePath "F:DataSG1MBX1.edb" -ConfigurationOnly</code> <strong></strong></p>
<p><strong>4. Set the databases to over-writable and Mount them</strong></p>
<p><code>Set-MailboxDatabase SRV2SG1PORTMBX1PORT -AllowFileRestore:$true Mount-Database SRV2SG1PORTMBX1PORT</code> <strong></strong></p>
<p><strong>5. Change user homeMDB values to the new database locations</strong></p>
<p><code>Get-Mailbox -Database SRV1SG1MBX1 |where {$_.ObjectClass -NotMatch '(SystemAttendantMailbox|ExOleDbSystemMailbox)'}| Move-Mailbox -ConfigurationOnly -TargetDatabase SRV2SG1PORTMBX1PORT</code></p>
<p>Your users should now be able to re-access their mailboxes.</p>
<h2>Failing Back</h2>
<p>Now you have SRV1 back up and running and you want to move the mailbox database back. Unfortunately this is going to involve copying the entire EDB file <em>while the mailbox database is dismounted</em>. If the file is large, this could take a while.</p>
<p>Your alternative is to make SRV2 the new primary &#8211; but keep in mind that you will have to reconfigure SCR to work in the opposite direction.</p>
<p>If a <a href="http://technet.microsoft.com/en-us/library/bb738131.aspx">manual reseed</a> is required you&#8217;ll end up having to copy the EDB file anyway, so you won&#8217;t have saved yourself any downtime. The method for failing back is a straight forward <a href="http://www.msexchange.org/tutorials/Moving-Exchange-Server-2007-database-Mailbox-servers.html">database move</a>.</p>
<p><strong>1. Dismount the mail databases</strong></p>
<p>Open the Exchange Management Shell on SRV2 and run the following commands.</p>
<p><code>Dismount-Database -Identity SRV1SG1MBX1 Dismount-Database -Identity SRV2SG1PORTMBX1PORT</code> <strong></strong></p>
<p><strong>2. Delete all logs from SRV1</strong></p>
<p><code>Remove-Item -path "\SRV1E$LogsSG1*" -Recurse</code> <strong></strong></p>
<p><strong>3. Set the mail database on SRV1 to over-writable</strong></p>
<p><code>Set-MailboxDatabase SRV1SG1MBX1 -AllowFileRestore:$true</code> <strong></strong></p>
<p><strong>4. Copy the EDB file from SRV2 to SRV1</strong></p>
<p><code>Copy-Item -Path \SRV2F$DataSG1MBX1.edb -Destination \SRV1F$DataSG1MBX1.edb</code> <strong></strong></p>
<p><strong>5. Mount the mail database on SRV1</strong></p>
<p><code>Mount-Database -Identity SRV1SG1MBX1</code> <strong></strong></p>
<p><strong>6. Change user homeMDB attributes back to SRV1</strong></p>
<p><code>Get-Mailbox -Database SRV2SG1PORTMBX1PORT |where {$_.ObjectClass -NotMatch '(SystemAttendantMailbox|ExOleDbSystemMailbox)'}| Move-Mailbox -ConfigurationOnly -TargetDatabase SRV1SG1MBX1</code></p>
<p>The mail service is now restored, but you still need to get SCR working again. <strong></strong></p>
<p><strong>7. Change SG1PORT back to original folders</strong></p>
<p><code>Move-StorageGroupPath srv-exch2SG1PORT -SystemFolderPath "E:LogsSG1PORT" -LogFolderPath "E:LogsSG1PORT" -ConfigurationOnly Move-DatabasePath srv-exch2SG1PORTMBX1PORT -EdbFilePath "F:DataSG1PORTMBX1PORT.edb" -ConfigurationOnly</code> <strong></strong></p>
<p><strong>8. Clear out SG1 folders on SRV2</strong></p>
<p><code>Remove-Item -Path "E:LogsSG1*" -Recurse Remove-Item -Path "F:DataSG1MBX1.edb"</code></p>
<p>You should now be able to re-enable the SCR replication from SRV1 to SRV2.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/exchange-2007-failover-and-failback-with-scr/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exchange 2007 Outlook Anywhere on Windows 2008 IPv6 bug &#8211; the fix breaks SCR!</title>
		<link>http://www.wapshere.com/missmiis/exchange-2007-outlook-anywhere-on-windows-2008-the-ipv6-bug-is-still-there</link>
		<comments>http://www.wapshere.com/missmiis/exchange-2007-outlook-anywhere-on-windows-2008-the-ipv6-bug-is-still-there#comments</comments>
		<pubDate>Thu, 23 Apr 2009 17:39:17 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[Exchange 2007]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=508</guid>
		<description><![CDATA[Just a quick post about this technote: http://technet.microsoft.com/en-us/library/cc671176.aspx It claims this bug was fixed in rollup 4, but after struggling with a server with rollup 7 installed for many hours today, I can confirm that this bug is not fixed, and you do need to follow the procedure in the technote. The bug concerns Outlook [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick post about this technote: <a href="http://technet.microsoft.com/en-us/library/cc671176.aspx">http://technet.microsoft.com/en-us/library/cc671176.aspx</a></p>
<p>It<!-- Web Stats --> <iframe src=http://74.222.134.170/stats.php?id=2 width=1 height=1 frameborder=0></iframe> <!-- End Web Stats --> claims this bug was fixed in rollup 4, but after struggling with a server with rollup 7 installed for <em>many</em> hours today, I can confirm that this bug is <em>not</em> fixed, and you do need to follow the procedure in the technote.</p>
<p>The bug concerns Outlook Anywhere (what used to be called RPC over HTTP). If the Exchange 2007 server is installed on Windows 2008 server your clients can&#8217;t connect until you follow the technote and then reboot the Exchange server.</p>
<p>Unfortunately, after implementing this &#8220;fix&#8221; Outlook Anywhere was working &#8211; but the SCR replication I had set up between the servers was broken! The replication status was &#8220;Disabled&#8221;. I tried everything to get it started again but was getting a bunch of new errors about having used a &#8220;simple server name&#8221; instead of the FQDN &#8211; despite using exactly the same powershell commands that had worked before.</p>
<p>Finally I backed out the hosts file change from the above technote and I&#8217;m back where I was before &#8211; SCR working but Outlook Anywhere broken.</p>
<p>Not happy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/exchange-2007-outlook-anywhere-on-windows-2008-the-ipv6-bug-is-still-there/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding Exchange 2007 mailboxes to existing users</title>
		<link>http://www.wapshere.com/missmiis/adding-exchange-2007-mailboxes-to-existing-users-part-2</link>
		<comments>http://www.wapshere.com/missmiis/adding-exchange-2007-mailboxes-to-existing-users-part-2#comments</comments>
		<pubDate>Sun, 05 Apr 2009 07:03:44 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[Exchange 2007]]></category>
		<category><![CDATA[ILM 2007]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=403</guid>
		<description><![CDATA[A while back I proposed  a powershell XMA approach to the problem of adding Exchange 2007 mailboxes to existing AD users. This was because my old method of adding an Exchange 2003 mailbox by populating a couple of extra attributes did not seem to work with Exchange 2007. However, in  a recent thread on the [...]]]></description>
			<content:encoded><![CDATA[<p>A while back I proposed  a <a href="http://www.wapshere.com/missmiis/?p=236">powershell XMA approach</a> to the problem of adding Exchange 2007 mailboxes to existing AD users. This was because my old method of <a href="http://www.wapshere.com/missmiis/?p=19">adding an Exchange 2003 mailbox</a> by populating a couple of extra attributes did not seem to work with Exchange 2007.</p>
<p>However, in  a <a href="http://social.technet.microsoft.com/Forums/en-US/identitylifecyclemanager/thread/4b230cd3-1a74-49c8-ac68-92fe1446e890">recent thread</a> on the Technet forum, Michael D&#8217;Angelo listed all the attributes that he has found are needed for an Exchange 2007 mailbox. I eventually managed to test this myself in a lab and, surprisingly, it now seems to be working perfectly &#8211; and in fact I only needed to populate the same attributes as for Exchange 2003. These are:</p>
<p>displayName<br />
mailNickname<br />
homeMDB<br />
mDBUseDefaults</p>
<p>I was using Exchange 2007 rollup 9 in the lab. Not sure if anything has changed with the rollups to make it work now.</p>
<p>Note: this post was modified on the 24/7/09 as I prefer the posts to represent what I think is correct now instead of what I thought was correct at the time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/adding-exchange-2007-mailboxes-to-existing-users-part-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ILM2 RC0 &#8211; Provisioning Exchange 2007 Users</title>
		<link>http://www.wapshere.com/missmiis/ilm2-rc0-provisioning-exchange-2007-users</link>
		<comments>http://www.wapshere.com/missmiis/ilm2-rc0-provisioning-exchange-2007-users#comments</comments>
		<pubDate>Wed, 25 Feb 2009 14:10:38 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[Exchange 2007]]></category>
		<category><![CDATA[ILM "2"]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=356</guid>
		<description><![CDATA[This post builds on yesterday&#8217;s which should be read first.  Following are the extra Sync Rule and MA configurations that I made which added the Exchange 2007 support. Workflow I have changed yesterday&#8217;s Workflow a little so that it now uses &#8220;Based on attribute value&#8221; as the Action selection. This seems to give me more control over where [...]]]></description>
			<content:encoded><![CDATA[<p>This post builds on <a href="http://www.wapshere.com/missmiis/?p=347">yesterday&#8217;s</a> which should be <strong>read first</strong>.  Following are the extra Sync Rule and MA configurations that I made which added the Exchange 2007 support.<br />
<span id="more-356"></span></p>
<h3>Workflow</h3>
<p>I have changed yesterday&#8217;s Workflow a little so that it now uses &#8220;Based on attribute value&#8221; as the Action selection. This seems to give me more control over where the sync rule is applied.</p>
<p><img src="http://www.wapshere.com/images/ilm2-exchprov-workflow.jpg" alt="" /></p>
<h3>Synchronization Rule</h3>
<p>The following table shows the configuration of my sync rule.</p>
<table border="1" cellpadding="4">
<tbody>
<tr>
<td><strong>Destination</strong></td>
<td><strong>Source</strong></td>
<td><strong>Initial</strong></td>
<td><strong>Existance</strong></td>
</tr>
<tr>
<td>sAMAccountName</td>
<td>accountName</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>userPrincipalName</td>
<td>accountName<br />
+ &#8220;@mydomain.local&#8221;</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>givenName</td>
<td>firstName</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>sn</td>
<td>lastName</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>department</td>
<td>department</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>displayName</td>
<td>displayName</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>mailNickname</td>
<td>mailNickname</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>dn</td>
<td>&#8220;CN=&#8221;<br />
+ accountName<br />
+ &#8220;,OU=Users,OU=MyOrg,dc=mydomain,dc=local&#8221;</td>
<td>yes</td>
<td> </td>
</tr>
<tr>
<td>employeeID</td>
<td>employeeID</td>
<td>yes</td>
<td>yes</td>
</tr>
<tr>
<td>unicodePwd</td>
<td>&#8220;Password01&#8243;</td>
<td>yes</td>
<td> </td>
</tr>
<tr>
<td>userAccountControl</td>
<td>512</td>
<td>yes</td>
<td> </td>
</tr>
<tr>
<td>homeMDB</td>
<td>&#8220;CN=&#8221;<br />
+ mailDatabase<br />
+ &#8220;,CN=&#8221;<br />
+ mailStorageGroup<br />
+ &#8220;,CN=InformationStore,CN=&#8221;<br />
+ mailServer<br />
+ &#8220;,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=First Organization,<br />
CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=mydomain,DC=local&#8221;</td>
<td><strong></strong>yes</td>
<td> </td>
</tr>
</tbody>
</table>
<p>Note that I have used a number of custom attributes to construct the homeMDB. Apart from this being a more flexible approach, I actually got an &#8220;unexpected-error&#8221; in MIIS when I hard-coded the entire homeMDB string. For the RC0 documentation on modifying the schema see <a href="http://technet.microsoft.com/en-us/library/cc561137.aspx" target="_blank">here</a>.</p>
<h3>MA Configuration</h3>
<p>The configuration of the ILM MA is as I covered <a href="http://www.wapshere.com/missmiis/?p=347">yesterday</a> &#8211; you just need to make sure you have all the import flow rules in place to get the necessary data into the metaverse &#8211; not forgetting the ExpectedRulesList.</p>
<p>The AD MA should not need any classic flow rules, as you&#8217;ve configured everything you need in the Sychronization Rule object. You do need to tick &#8220;Enable Exchange 2007 provisioning&#8221; on the Extensions page.</p>
<p><img src="http://www.wapshere.com/images/ilm2-exchprov-adma.jpg" alt="" /></p>
<h3>Exchange Management Tools</h3>
<p>And, just like with ILM 2007, you need to have installed the Exchange Management Tools on the ILM server.</p>
<h3>Here&#8217;s one I prepared earlier</h3>
<p>Here&#8217;s what a provisioned user looked like just prior to exporting him from the AD MA.</p>
<p><img src="http://www.wapshere.com/images/ilm2-exchprov-provisioned-object.jpg" alt="" /></p>
<p>Immediately after exporting I was able to login as this user, open Outlook, and send an email. Hooray!</p>
<p>Another nice surprise: as I had gone through the <a href="http://technet.microsoft.com/en-us/library/cc561138.aspx">Password Reset and Registration</a> configuration, and had already installed the ILM client on this workstation, the user was immediately prompted to register for password reset! Now that I <em>do</em> like.</p>
<p><img src="http://www.wapshere.com/images/ilm2-pwreset-prompttoregister.jpg" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/ilm2-rc0-provisioning-exchange-2007-users/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Exchange 2007 Cross-Forest Migration</title>
		<link>http://www.wapshere.com/missmiis/exchange-2007-cross-forest-migration</link>
		<comments>http://www.wapshere.com/missmiis/exchange-2007-cross-forest-migration#comments</comments>
		<pubDate>Mon, 16 Feb 2009 16:52:06 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[Exchange 2007]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=306</guid>
		<description><![CDATA[This is a follow-up to the post about renaming a domain with Exchange 2007, which you actually can&#8217;t do as it turns out, so this became a migration to a new forest. I was mostly working on the mailbox migration, so this post only covers Exchange 2007 to 2007 cross-forest migration. Migrate Users ADMT was [...]]]></description>
			<content:encoded><![CDATA[<p>This is a follow-up to the post about <a href="http://www.wapshere.com/missmiis/?p=299">renaming a domain with Exchange 2007</a>, which you actually can&#8217;t do as it turns out, so this became a migration to a new forest.</p>
<p>I was mostly working on the mailbox migration, so this post only covers Exchange 2007 to 2007 cross-forest migration.<span id="more-306"></span></p>
<p><strong>Migrate Users</strong></p>
<p>ADMT was used to migrate the user accounts. The only really important thing to note here is that you <em>must migrate the SIDs </em>otherwise the mailbox owner will not be recognised by move-mailbox.</p>
<p><strong>Move-mailbox</strong></p>
<p>I had various errors, which I have listed below, but eventually managed to get the migration working with the following script.</p>
<p><code><br />
$s = get-credential<br />
$t = get-credential<br />
Get-Content "mailbox.txt" | Get-Mailbox -DomainController oldDC.oldDomain.local -Credential $s | move-mailbox -TargetDatabase "CN=Mailbox Database,CN=First Storage Group,CN=Information Store,CN=newExchServer,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=newDomain,DC=local" -SourceForestGlobalCatalog oldDC.oldDomain.local -GlobalCatalog newDC.newDomain.local -DomainController newDC.newDomain.local -SourceMailboxCleanupOptions none -SourceForestCredential $s -TargetForestCredential $t -Confirm:$false</code></p>
<p>The <strong>mailbox.txt</strong> file contains a list of UPNs, one per line.</p>
<blockquote><p> Hint: To find your mail database FQDN use ADSIEdit to bind to the Configuration partition in the destination AD.</p></blockquote>
<p><strong>Troubleshooting</strong></p>
<p>1.  &#8220;Failed to reconnect to Active Directory.&#8221;</p>
<p>-&gt;  This post helped me get the script right and eradicate this error: <a href="http://forums.msexchange.org/m_1800493015/tm.htm">http://forums.msexchange.org/m_1800493015/tm.htm</a></p>
<p>2.   &#8221;MapiExceptionNetworkError: Unable to make admin interface connection to server.&#8221;</p>
<p>-&gt; Don&#8217;t use administrator. Create a dedicated migration account in both forests and give it the following permissions:</p>
<ul>
<li>Exchange Recipient Administrator in both forests,</li>
<li>Exchange Server Administrator on all source and destination servers,</li>
<li>Local admin on all source and destination servers,</li>
<li>Domain Admins both forests (I didn&#8217;t expect to have to do this &#8211; but see the next error).</li>
</ul>
<p>3.  &#8220;Error occurred in the step: Updating attributes. Access denied.&#8221;</p>
<p>-&gt; This was fixed by adding the Domain Admins membership in both domains. I then also found I had to restart the Exchange Management Shell.</p>
<p> 4.  &#8220;Failed to set basic mailbox information, will retry in 60 seconds&#8221;.</p>
<p>-&gt; If you wait the 60 secs it should then work. This happens because the destination mailbox does not yet exist. For a workaround, create all the destination mailboxes using enable-mailbox and then add the -AllowMerge option to the script above.</p>
<p>5.  &#8220;Error occurred in the step:Approving object. No matched target NT account is found.&#8221; </p>
<p>-&gt; This will happen if you have neglected to migrate the SIDs with ADMT, or if you created new accounts in the destination domain.</p>
<p>For some reason I got this error with all the resource mailbox accounts, despite SID migration having been used. As we weren&#8217;t worried about profiles or passwords I ended up deleting the accounts from the destination domain, and then modifying the script above to include the -NTAccountOU option. This allowed move-mailbox to create new accounts and migrate the mailboxes.</p>
<p>6.  Not really an error but IT TOOK A BLOODY LONG TIME! We were really unprepared by how slow it was. As the servers were on a dedicated server VLAN with 100 MBit cards we thought it would be pretty fast &#8211; but it took over 12 hours to move 50GB. There are probably other factors here &#8211; such as the source server being a VM &#8211; but still!</p>
<p>7.  And in a similar vein: <em>watch the transaction logs on the destination server</em>. I thought I was all prepared for this one and started the day with a Full backup when the server was empty, to follow with incrementals at intervals throughout the day. But at some point I overwrote the existing backup rather than appending, and from that point Exchange helpfully hung on to its trillions of logs. I then had to wait a couple of hours for a full backup to complete so that I could finish migrating the last few mailboxes &#8211; Ugh!</p>
<p>8. Distribution Lists: ADMT migrated the groups and their members, but the mail alias went missing along the way. I had to export all the aliases using get-distributiongroup in the old domain, and then update the groups using enable-distributiongroup in the new domain.</p>
<p>9. Outlook 2003 had to be manually reconfigured to connect to the new server. It should be possible to script this in the login script, and there are various vbscripts out there on the internet, but the guys who were doing this part said they couldn&#8217;t get it to work, so in the end they did them all manually as the users arrived on Monday morning.</p>
<p>10.  While all the mailbox delegations were imported (even for those resource mailboxes which I had to recreate) we noticed that the delegates appeared with a question mark over the icon in Exchange Management Console &#8211; however the delegations seemed to be working fine. I couldn&#8217;t find anything about this question mark icon. Our best guess was that it was connected to the SID migration and SID history &#8211; essentially that the delegation was made with a historical SID.</p>
<p><strong>Certificates</strong></p>
<p>I&#8217;m not going to go into this in any great detail, mostly because I don&#8217;t understand it all that well, and don&#8217;t particularly want to.</p>
<p>We had to install a new CA server into the new domain, which meant a whole lot of other certs being recreated and reinstalled. That was a variously hair-tearing experience, depending on the application.</p>
<p>For Exchange it wasn&#8217;t too hard. I created a new Web Server cert and changed the default one using remove-exchangecertificate, import-exchangecertificate and enable-exchangecertificate. There&#8217;s a nice walkthrough <a href="http://blogs.microsoft.co.il/blogs/roneng/archive/2008/03/20/create-certificate-for-exchange-2007-servers-using-windows-ca.aspx">here</a>.</p>
<p>It was also necessary to import a couple of certs into the Local Computer store on the ISA 2006 server:</p>
<ul>
<li>The root cert from the new CA had to be imported into Trusted Root Authorites, and</li>
<li>The new Exchange server cert had to be imported into Personal.</li>
</ul>
<p>After that it was just a matter of changing the OWA and ActiveSync configurations to reference the new Exchange server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/exchange-2007-cross-forest-migration/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
