<?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>Exchange Archives - VirtJunkie</title>
	<atom:link href="/category/exchange/feed/" rel="self" type="application/rss+xml" />
	<link>/category/exchange/</link>
	<description>Virtualization, Automation, and anything else that might be on my mind</description>
	<lastBuildDate>Thu, 27 Jun 2013 12:04:37 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.2</generator>

<image>
	<url>/wp-content/uploads/2020/04/cropped-vj4-150x150.png</url>
	<title>Exchange Archives - VirtJunkie</title>
	<link>/category/exchange/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Exchange 2010 &#8211; Bulk Mailbox Migration In Batches</title>
		<link>/2013/06/27/exchange-2010-bulk-mailbox-migration-in-batches/</link>
					<comments>/2013/06/27/exchange-2010-bulk-mailbox-migration-in-batches/#comments</comments>
		
		<dc:creator><![CDATA[Jon]]></dc:creator>
		<pubDate>Thu, 27 Jun 2013 12:04:37 +0000</pubDate>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Windows Server]]></category>
		<guid isPermaLink="false">http://45.63.13.214/?p=483</guid>

					<description><![CDATA[<p>Update: I created a new version of this script here I recently completed a project that involved migrating Exchange 2010 Mailbox role from a standalone server to a Database Availability Group, or DAG. This was a large project that took a lot of time and planning, and had the potential to be very tedious. Fortunately, [&#8230;]</p>
<p>The post <a href="/2013/06/27/exchange-2010-bulk-mailbox-migration-in-batches/">Exchange 2010 &#8211; Bulk Mailbox Migration In Batches</a> appeared first on <a href="/">VirtJunkie</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>Update</strong>:<br />
<strong>I created a new version of this script <a title="Update: Exchange 2010 – Bulk Mailbox Migration In Batches (The Right Way)" href="http://45.63.13.214/?p=539">here</a></strong><br />
I recently completed a project that involved migrating Exchange 2010 Mailbox role from a standalone server to a Database Availability Group, or DAG. This was a large project that took a lot of time and planning, and had the potential to be very tedious. Fortunately, with a little knowhow, you can automate many of the tedious tasks.</p>
<p>I wanted to be in full control of mailbox migration, so my requirements were fairly strict:</p>
<p><span id="more-483"></span></p>
<ul>
<li><span style="line-height: 13px;">Don&#8217;t just submit all mailbox move requests en masse</span></li>
<li>Submit move requests in &#8220;Suspended&#8221; status, so that I can <del>manually</del> release them at a later time</li>
<li>Move smallest mailboxes first, and progress gradually to big mailboxes</li>
<li>Chose best destination mailbox database
<ul>
<li>I define best as the database with the most free space.</li>
</ul>
</li>
<li>Only pull mailboxes from one mailbox database at a time</li>
</ul>
<p>The script below will accomplish these objectives.</p>
<p>Keep in mind, your destination mailbox database is likely named differently than mine &#8211; make sure you change it on line number 21.</p>
<p>I&#8217;ll post the script I use to release these suspended jobs systematically at a later date.</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">$BatchSize = 5
$sourceMailboxDatabase = &quot;Mailbox Database 1&quot;

Write-Host &quot;Creating Move Requests and Suspending them&quot;

$allmbx = Get-Mailbox -database $sourceMailboxDatabase |
   Get-MailboxStatistics |
   Sort-Object TotalItemSize |
   Select-Object DisplayName,TotalItemSize
   $AllMBXCount = $allmbx.count

Write-Host &quot;There are&quot; $AllMBXCount &quot;mailboxes to be migrated&quot;
Start-Sleep -Seconds 8

$batch = 1
for ($i=1;$i -le $AllMBXCount;$i++)
{
	if ($i % $BatchSize -eq 0)
	{
		#write-host &quot;Batch $batch&quot; -ForegroundColor 'DarkCyan'
		$result = Get-MailboxDatabase -identity &quot;DAG*&quot; -Status |
                Select-Object name,DatabaseSize,AvailableNewMailboxSpace |
                Sort-Object -Property DatabaseSize
		$bestDatabase = $result[0].name
		$batch++
	}

	Write-Host &quot;New Move - Batch:&quot; $batch &quot;-&quot; $bestDatabase &quot;/&quot; $allmbx[$i].DisplayName -ForegroundColor 'DarkGreen'
	New-MoveRequest -TargetDatabase $bestDatabase -Suspend -Identity $allmbx[$i].DisplayName -BatchName &quot;Batch $batch&quot; | out-null

}</pre><p></p>
<p>The post <a href="/2013/06/27/exchange-2010-bulk-mailbox-migration-in-batches/">Exchange 2010 &#8211; Bulk Mailbox Migration In Batches</a> appeared first on <a href="/">VirtJunkie</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>/2013/06/27/exchange-2010-bulk-mailbox-migration-in-batches/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
