<?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 Server Pro &#187; Solutions</title>
	<atom:link href="http://exchangeserverpro.com/category/solutions/feed" rel="self" type="application/rss+xml" />
	<link>http://exchangeserverpro.com</link>
	<description>Microsoft Exchange Server News - Tips - Tutorials</description>
	<lastBuildDate>Mon, 21 May 2012 12:51:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Show Full Free/Busy Details for Exchange Server 2010 Room and Resource Mailboxes</title>
		<link>http://exchangeserverpro.com/show-full-freebusy-exchange-2010-room-resource-mailboxes</link>
		<comments>http://exchangeserverpro.com/show-full-freebusy-exchange-2010-room-resource-mailboxes#comments</comments>
		<pubDate>Sun, 06 May 2012 13:35:48 +0000</pubDate>
		<dc:creator>Paul Cunningham</dc:creator>
				<category><![CDATA[Solutions]]></category>
		<category><![CDATA[Calendars]]></category>
		<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[Free/Busy]]></category>
		<category><![CDATA[Resource Mailboxes]]></category>
		<category><![CDATA[Room Mailboxes]]></category>

		<guid isPermaLink="false">http://exchangeserverpro.com/?p=4788</guid>
		<description><![CDATA[How to show the full free/busy details to users for Exchange Server 2010 Room and Resource mailboxes.]]></description>
			<content:encoded><![CDATA[<p>In the comments of my article about <a href="http://exchangeserverpro.com/exchange-server-2010-room-mailboxes-step-by-step-guide">Exchange Server 2010 Room mailboxes</a> some readers wanted to know how they can configure the Room mailbox to show more details about existing meetings in the free/busy information that is revealed to other users on the network.</p>
<p>Consider the scenario where a room is booked, and perhaps another person wants to contact existing meeting organizers to ask if they can remove a booking to make room for a more important one, but the free/busy information (as seen in the Outlook Scheduling Assistant) doesn&#8217;t indicate who made the bookings.</p>
<p><img class="aligncenter size-full wp-image-4793" title="exchange-room-mailbox-free-busy-0" src="http://exchangeserverpro.com/wp-content/uploads/2012/05/exchange-room-mailbox-free-busy-01.jpg" alt="" width="280" height="118" /></p>
<p>This is caused by the default permissions on the mailbox&#8217;s calendar. These default permissions are set to show only the availability information (eg free, busy, tentative) but not any other details.</p>
<p>In the calendar permissions (if you were modifying them via Outlook) it would look like this.</p>
<p><img class="aligncenter size-full wp-image-4794" title="exchange-room-mailbox-free-busy-1" src="http://exchangeserverpro.com/wp-content/uploads/2012/05/exchange-room-mailbox-free-busy-1.jpg" alt="" width="391" height="363" /></p>
<p>If viewed in the shell it with <a href="http://technet.microsoft.com/en-us/library/dd335061.aspx">Get-MailboxFolderPermission</a> it would appear like this.</p>
<pre>[PS] C:\&gt;Get-MailboxFolderPermission homeetingroom1:\Calendar

RunspaceId   : 8706cde4-2cb5-4519-9a46-a46fcc0c450c
FolderName   : Calendar
User         : Default
AccessRights : {AvailabilityOnly}
Identity     : Default
IsValid      : True</pre>
<p>If you modified the permissions using Outlook the new permission level of Reviewer would allow other users to see more details about existing meetings.</p>
<p><img class="aligncenter size-full wp-image-4796" title="exchange-room-mailbox-free-busy-2" src="http://exchangeserverpro.com/wp-content/uploads/2012/05/exchange-room-mailbox-free-busy-2.jpg" alt="" width="395" height="366" /></p>
<p>You can apply that same permission in the Exchange Management Shell using the <a href="http://technet.microsoft.com/en-us/library/ff522363.aspx">Set-MailboxFolderPermission</a> cmdlet (note: Set-MailboxFolderPermission modifies an existing entry, whereas <a href="http://technet.microsoft.com/en-us/library/dd298062.aspx">Add-MailboxFolderPermission</a> would be used to add a new entry to the permissions).</p>
<pre>Set-MailboxFolderPermission homeetingroom1:\Calendar -User Default -AccessRights Reviewer</pre>
<p>The results can be seen in the Get-MailboxFolderPermission output.</p>
<pre>[PS] C:\&gt;Get-MailboxFolderPermission homeetingroom1:\Calendar

RunspaceId   : 8706cde4-2cb5-4519-9a46-a46fcc0c450c
FolderName   : Calendar
User         : Default
AccessRights : {Reviewer}
Identity     : Default
IsValid      : True

RunspaceId   : 8706cde4-2cb5-4519-9a46-a46fcc0c450c
FolderName   : Calendar
User         : Anonymous
AccessRights : {None}
Identity     : Anonymous
IsValid      : True</pre>
<p>When creating a new meeting request users are now able to see more details about the meeting organizer.</p>
<p><img class="aligncenter size-full wp-image-4797" title="exchange-room-mailbox-free-busy-3" src="http://exchangeserverpro.com/wp-content/uploads/2012/05/exchange-room-mailbox-free-busy-3.jpg" alt="" width="285" height="128" /></p>
<p>You can modify all the default permissions on Room mailboxes with the following commands in the Exchange Management Shell.</p>
<pre>[PS] C:\&gt;$rooms = Get-Mailbox -RecipientTypeDetails RoomMailbox
[PS] C:\&gt;$rooms | %{Set-MailboxFolderPermission $_":\Calendar" -User Default -AccessRights Reviewer}</pre>
<h3  class="related_post_title">Related posts:</h3><ul class="related_post"><li><a href="http://exchangeserverpro.com/find-meeting-rooms" title="How to Find Available Meeting Rooms">How to Find Available Meeting Rooms</a></li><li><a href="http://exchangeserverpro.com/exchange-server-2010-room-mailboxes-step-by-step-guide" title="Exchange Server 2010 Room Mailboxes Step by Step Guide">Exchange Server 2010 Room Mailboxes Step by Step Guide</a></li><li><a href="http://exchangeserverpro.com/exchange-2010-restricting-room-mailbox-bookings-to-specific-groups" title="Restricting Room Mailbox Bookings to Specific Groups in Exchange Server 2010">Restricting Room Mailbox Bookings to Specific Groups in Exchange Server 2010</a></li><li><a href="http://exchangeserverpro.com/exchange-2007-room-mailbox-automatically-accepting-bookings" title="Exchange 2007 Room Mailbox Not Automatically Accepting Bookings">Exchange 2007 Room Mailbox Not Automatically Accepting Bookings</a></li><li><a href="http://exchangeserverpro.com/exchange-2010-shared-calendar-permissions-nested-groups" title="Exchange 2010 Shared Calendar Permissions and Nested Groups">Exchange 2010 Shared Calendar Permissions and Nested Groups</a></li></ul><hr />
<p>This article <a href="http://exchangeserverpro.com/show-full-freebusy-exchange-2010-room-resource-mailboxes">Show Full Free/Busy Details for Exchange Server 2010 Room and Resource Mailboxes</a> is © 2012 ExchangeServerPro.com</p>
<p>Get more <a href="http://exchangeserverpro.com">Exchange Server tips</a> at <a href="http://exchangeserverpro.com">ExchangeServerPro.com</a></p>]]></content:encoded>
			<wfw:commentRss>http://exchangeserverpro.com/show-full-freebusy-exchange-2010-room-resource-mailboxes/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Dealing with Exchange Server Update Rollups and Forefront Protection for Exchange</title>
		<link>http://exchangeserverpro.com/exchange-server-update-rollups-forefront-fscutility</link>
		<comments>http://exchangeserverpro.com/exchange-server-update-rollups-forefront-fscutility#comments</comments>
		<pubDate>Mon, 23 Apr 2012 13:41:32 +0000</pubDate>
		<dc:creator>Paul Cunningham</dc:creator>
				<category><![CDATA[Solutions]]></category>
		<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Update Rollups]]></category>

		<guid isPermaLink="false">http://exchangeserverpro.com/?p=4743</guid>
		<description><![CDATA[How to use the CustomPatchInstallerActions.ps1 to avoid problems installing update rollups on Exchange servers that have Forefront installed]]></description>
			<content:encoded><![CDATA[<p>When Microsoft recently released the <a href="http://exchangeserverpro.com/update-rollup-2-exchange-2010-service-pack-2">latest update rollup for Exchange Server 2010</a> a few disgruntled customers left comments about the situation with Exchange update rollups and Forefront Protection for Exchange.</p>
<p>If you&#8217;re not a Forefront user or you&#8217;re otherwise unaware of the situation, the issue is that Forefront Protection for Exchange and update rollups don&#8217;t play nicely together. For example during installation the update rollup can hang at stages such as restarting the Exchange services after the update has been applied.</p>
<div id="attachment_4744" class="wp-caption aligncenter" style="width: 600px"><img class="size-full wp-image-4744" title="Services not starting after Exchange Server rollup installation" src="http://exchangeserverpro.com/wp-content/uploads/2012/04/exchange-2010-installing-updates-forefront-fscutility-01.jpg" alt="Services not starting after Exchange Server rollup installation" width="590" height="351" /><p class="wp-caption-text">Services not starting after Exchange Server rollup installation</p></div>
<p>This is why each update rollup release comes with the following instructions:</p>
<blockquote><p>Note for Forefront Protection for Exchange users For those of you running Forefront Protection for Exchange, be sure you perform these important steps from the command line in the Forefront directory before and after this rollup&#8217;s installation process. Without these steps, Exchange services for Information Store and Transport will not start after you apply this update. Before installing the update, disable ForeFront by using this command: fscutility /disable. After installing the update, re-enable ForeFront by running fscutility /enable.</p></blockquote>
<p>As a result we see comments like these from disgruntled customers.</p>
<blockquote><p>Note for Forefront Protection for Exchange users: We still don&#8217;t care enough about you to add two lines to the setup script. Instead you have to do it manually. Or you can install the update via Microsoft Update and you&#8217;ll be in for a funny surprise.</p>
<p>Hey Microsoft&#8230;. could you not detect for your own software and automatically run the command fscutility /disable????, Now I cannot even get WUS to do this…. Annoyed! and feeling unappreciated as a FF customer</p></blockquote>
<p>Microsoft actually has <a href="http://blogs.technet.com/b/exchange/archive/2010/06/02/3410046.aspx">provided a solution for this</a>, back when Exchange Server 2007 SP2 was released, and appears to have carried it forward for Exchange Server 2010 as well. A script named <strong>CustomPatchInstallerActions.ps1</strong> can be used to perform pre- and post-installation tasks for update rollups.</p>
<p>I&#8217;m not sure why they don&#8217;t refer to it with each update rollup release, but as far as I can tell from my own testing it works fine.</p>
<p>Here is what you need to do.</p>
<ol>
<li>In the <strong>\Scripts</strong> folder of your Exchange 2010 installation find the file named <strong>CustomPatchInstallerActions.ps1.template</strong></li>
<li>Create a new sub-folder in \Scripts named <strong>Customizations</strong></li>
<li>Copy the script template into that sub-folder, and remove the <strong>.template</strong> extension</li>
<li>Edit the file with the customizations you want, and the next time you install an update rollup the script will be called automatically</li>
</ol>
<p>So what kind of customizations should you include? I did a little testing and here is what I suggest as a minimum. You&#8217;ll also find Microsoft&#8217;s advice <a href="http://support.microsoft.com/kb/929080">here</a>.</p>
<p>First, I ran <strong>fscutility /disable</strong> (from the <strong>C:\Program Files (x86)\Microsoft Forefront Protection for Exchange Server</strong> folder) to see what happens. I received the following output.</p>
<pre>Error:
  Microsoft Forefront Protection cannot be disabled at this time.  Please stop
  the following services and then rerun this utility.

   FSCController
   MSExchangeTransport
   MSExchangeIS</pre>
<p>So clearly some services need to be stopped first. That will need to go in the script.</p>
<p>After disabling those services <strong>fscutility /disable</strong> works successfully. So that can be run second.</p>
<pre>  Removing dependencies...

      dependency on FSCController removed from Microsoft Exchange Information Store
      dependency on FSEIMC removed from Microsoft Exchange Transport Service
      Microsoft Exchange Transport Service Agent registration removed

Status:  Microsoft Forefront Protection NOT Integrated.</pre>
<p>In the custom script itself the actions to perform before installing an update rollup go in the <strong>PrePatchInstallationActions</strong> function.</p>
<pre>function PrePatchInstallActions
{
                Log "Running PrePatchInstallActions"

		Log "Stopping services"
		Stop-Service FSCController,MSExchangeTransport,MSExchangeIS -Force

		Log "Disabling Forefront"
		$fscutility = "C:\Program Files (x86)\Microsoft Forefront Protection for Exchange Server\fscutility.exe"
		Invoke-Expression $fscutility /disable

}</pre>
<p>Notice I&#8217;ve also made use of the Log function that is in the script so that I can see in the log file later that my custom actions were run (or at least attempted to run). The log file is written to <strong>C:\ExchangeSetupLogs\CustomPatchInstallActions.log</strong></p>
<p>After the update rollup is finished installing there is a similar process involved to re-enable Forefront. These steps go in the <strong>PostPatchInstallActions</strong> function.</p>
<pre>function PostPatchInstallActions
{
                Log "Running PostPatchInstallActions"

		Log "Stopping services"
		Stop-Service FSCController,MSExchangeTransport,MSExchangeIS -Force

		Log "Enabling Forefront"
		$fscutility = "C:\Program Files (x86)\Microsoft Forefront Protection for Exchange Server\fscutility.exe"
		Invoke-Expression $fscutility /enable

		Log "Starting services"
		Start-Service FSCController,MSExchangeTransport,MSExchangeIS

}</pre>
<p>When I upgraded two servers side-by-side, one with the <strong>CustomPatchInstallerActions.ps1</strong> and one without, the one with the script updated without any problems and the one without hung while trying to start the services afterwards.</p>
<p>So in my testing this appears to work well, but it is something you should test in your own environment before relying on it too heavily.</p>
<p>Note that this script can be used for all kinds of situations even when Forefront is not installed. If you have any pre- or post-install actions required in your environment (eg running the <a href="http://exchangeserverpro.com/how-to-install-updates-on-exchange-server-2010-database-availability-groups">StartDagServerMaintenance.ps1</a> script, disabling backups, disabling other antivirus software, <a href="http://exchangeserverpro.com/powershell-how-to-send-email">sending an email alert</a> to your team) you can include those in this <strong>CustomPatchInstallerActions.ps1</strong> script.</p>
<h3  class="related_post_title">Related posts:</h3><ul class="related_post"><li><a href="http://exchangeserverpro.com/test-lab-email-traffic-generator-powershell-script" title="PowerShell Script to Generate Email Traffic in a Test Lab Environment">PowerShell Script to Generate Email Traffic in a Test Lab Environment</a></li><li><a href="http://exchangeserverpro.com/health-check-exchange-2010-mailbox-server" title="How to Health Check an Exchange 2010 Mailbox Server">How to Health Check an Exchange 2010 Mailbox Server</a></li><li><a href="http://exchangeserverpro.com/list-users-access-exchange-mailboxes" title="How to List all Users Who Have Access to Other Exchange Mailboxes">How to List all Users Who Have Access to Other Exchange Mailboxes</a></li><li><a href="http://exchangeserverpro.com/generate-html-report-exchange-2010-environment" title="How to Generate a HTML Report of Your Exchange 2010 Environment">How to Generate a HTML Report of Your Exchange 2010 Environment</a></li><li><a href="http://exchangeserverpro.com/powershell-script-check-exchange-mailbox-database-backup-time" title="PowerShell Script: Check Exchange Mailbox Database Last Backup Time">PowerShell Script: Check Exchange Mailbox Database Last Backup Time</a></li></ul><hr />
<p>This article <a href="http://exchangeserverpro.com/exchange-server-update-rollups-forefront-fscutility">Dealing with Exchange Server Update Rollups and Forefront Protection for Exchange</a> is © 2012 ExchangeServerPro.com</p>
<p>Get more <a href="http://exchangeserverpro.com">Exchange Server tips</a> at <a href="http://exchangeserverpro.com">ExchangeServerPro.com</a></p>]]></content:encoded>
			<wfw:commentRss>http://exchangeserverpro.com/exchange-server-update-rollups-forefront-fscutility/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The User Hasn&#8217;t Logged on to Mailbox So There is No Data to Return</title>
		<link>http://exchangeserverpro.com/user-logged-mailbox-data-return</link>
		<comments>http://exchangeserverpro.com/user-logged-mailbox-data-return#comments</comments>
		<pubDate>Fri, 23 Mar 2012 13:05:05 +0000</pubDate>
		<dc:creator>Paul Cunningham</dc:creator>
				<category><![CDATA[Solutions]]></category>
		<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[Mailboxes]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://exchangeserverpro.com/?p=4631</guid>
		<description><![CDATA[When running Get-MailboxStatistics against a new mailbox you receive a warning instead of an expected result.]]></description>
			<content:encoded><![CDATA[<p>A reader asks:</p>
<blockquote><p>I have been trying to get a script that can log into mailboxes automatically. The reason is that I have 500 mailboxes and when I attempt to query their statistics I get an error that the mailbox has never been logged into and therefore can&#8217;t generate any stats.</p></blockquote>
<p>Let&#8217;s take a quick look at the issue itself. When a new mailbox is created and you attempt to use <a href="http://technet.microsoft.com/en-us/library/bb124612.aspx">Get-MailboxStatistics</a> to query the mailbox, you will receive a warning similar to this.</p>
<blockquote><p>WARNING: The user hasn&#8217;t logged on to mailbox &#8216;exchangeserverpro.net/Company/Branch Office/Users/Blake Johnson&#8217;<br />
(&#8217;0971ff8e-d6d1-4bd6-98b9-384b35103a2d&#8217;), so there is no data to return. After the user logs on, this longer appear.</p></blockquote>
<p><img class="aligncenter size-full wp-image-4634" title="user-hasnt-logged-on-to-mailbox" src="http://exchangeserverpro.com/wp-content/uploads/2012/03/user-hasnt-logged-on-to-mailbox.jpg" alt="" width="580" height="42" /></p>
<p>In itself this is not a problem, but it might produce undesirable results for some <a href="http://exchangeserverpro.com/powershell-script-create-mailbox-size-report-exchange-server-2010">mailbox reporting tasks</a>, or at the very least make them a little more difficult.</p>
<p>The idea of creating a script that automatically logs on to new mailboxes is one approach to solving the problem. However it is probably more difficult than another solution which is also available.</p>
<p>That other solution is to simply <a href="http://exchangeserverpro.com/powershell-how-to-send-email">send the mailbox an email</a>. Once you do that the Get-MailboxStatistics cmdlet will return a result for the mailbox like this:</p>
<pre>[PS] C:\&gt;get-mailbox blake.johnson | Get-MailboxStatistics | ft -auto

DisplayName   ItemCount StorageLimitStatus LastLogonTime
-----------   --------- ------------------ -------------
Blake Johnson 1                 BelowLimit</pre>
<p>But is it practical to send 500 mailboxes an email? If it is a test lab you could simply add them all to one distribution group, and send that group an email. It would take just a few moments.</p>
<p>If it is a production system and new mailboxes are created regularly, you can automate the task. MVP Pat Richard has written a PowerShell script that can be run as a scheduled task to <a href="http://www.ehloworld.com/175">automatically send a welcome email to new mailboxes</a>. You can customize the welcome message to provide useful information to new users on the network. It really is a great idea if you ask me, plus it solves this issue with mailbox reporting. Check out Pat&#8217;s script <a href="http://www.ehloworld.com/175">here</a>.</p>
<h3  class="related_post_title">Related posts:</h3><ul class="related_post"><li><a href="http://exchangeserverpro.com/powershell-script-create-mailbox-size-report-exchange-server-2010" title="Get-MailboxReport.ps1 &#8211; PowerShell Script to Generate Mailbox Reports">Get-MailboxReport.ps1 &#8211; PowerShell Script to Generate Mailbox Reports</a></li><li><a href="http://exchangeserverpro.com/calculate-exchange-2010-mailbox-sizes-powershell" title="How to Calculate Exchange 2010 Mailbox Sizes with PowerShell">How to Calculate Exchange 2010 Mailbox Sizes with PowerShell</a></li><li><a href="http://exchangeserverpro.com/reconnect-disconnected-mailbox-exchange-server-2010" title="How to Reconnect a Disconnected Mailbox in Exchange Server 2010">How to Reconnect a Disconnected Mailbox in Exchange Server 2010</a></li><li><a href="http://exchangeserverpro.com/move-exchange-mailboxes-text-file-powershell" title="How to Move Exchange Mailboxes in a Text File using PowerShell">How to Move Exchange Mailboxes in a Text File using PowerShell</a></li><li><a href="http://exchangeserverpro.com/counting-exchange-server-2010-mailboxes-powershell" title="Counting Exchange Server 2010 Mailboxes with PowerShell">Counting Exchange Server 2010 Mailboxes with PowerShell</a></li></ul><hr />
<p>This article <a href="http://exchangeserverpro.com/user-logged-mailbox-data-return">The User Hasn&#8217;t Logged on to Mailbox So There is No Data to Return</a> is © 2012 ExchangeServerPro.com</p>
<p>Get more <a href="http://exchangeserverpro.com">Exchange Server tips</a> at <a href="http://exchangeserverpro.com">ExchangeServerPro.com</a></p>]]></content:encoded>
			<wfw:commentRss>http://exchangeserverpro.com/user-logged-mailbox-data-return/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PowerShell Script to Generate Email Traffic in a Test Lab Environment</title>
		<link>http://exchangeserverpro.com/test-lab-email-traffic-generator-powershell-script</link>
		<comments>http://exchangeserverpro.com/test-lab-email-traffic-generator-powershell-script#comments</comments>
		<pubDate>Mon, 19 Mar 2012 12:50:57 +0000</pubDate>
		<dc:creator>Paul Cunningham</dc:creator>
				<category><![CDATA[Solutions]]></category>
		<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Training]]></category>

		<guid isPermaLink="false">http://exchangeserverpro.com/?p=4599</guid>
		<description><![CDATA[This PowerShell script will automatically generate email traffic within an Exchange Server 2010 test lab environment.]]></description>
			<content:encoded><![CDATA[<p>For a long time now I&#8217;ve wanted to write a script that would automatically generate email traffic within an <a href="http://exchangeserverpro.com">Exchange Server</a> test lab environment.</p>
<p>Having realistic email traffic within a test lab environment means you can do such real world activities as:</p>
<ul>
<li>test backup and recovery scenarios</li>
<li>learn how to use message tracking logs</li>
<li>test archiving solutions</li>
</ul>
<p>In the past I&#8217;ve used some simple VBScripts that just sent random messages via SMTP as a way to fill up test lab mailboxes. That approach had some disadvantages though. The scripts I wrote only sent a stream of email messages at a single rate rather than at varying rates through the day as you would see in the real world. They also filled up inboxes only, never putting the messages in the Sent Items folder for the From address.</p>
<p>So last week I got to work creating a new <a href="http://exchangeserverpro.com/powershell">PowerShell</a> script to generate the email traffic. I <a href="http://exchangeserverpro.com/forums/powershell-corner/1210-building-test-lab-email-traffic-generator-script-powershell.html">tracked some of the development in the forums</a> and can now share the complete script here.</p>
<p>This script does require some setting up before you run it, so please read the instructions to get it working in your test lab. I have only written and tested this script for <a href="http://exchangeserverpro.com/training">Exchange 2010 training</a> lab environments on the assumption that most people will be training for the latest version of Exchange.</p>
<p class="alert">Before we go further let me be absolutely clear that this script is for <strong>test lab environments only</strong>. Under no circumstances should you attempt to run this script in a production environment.</p>
<h2>Using the Start-MailGen.ps1 Script in Your Test Lab</h2>
<p>The scripts uses the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=C3342FB3-FBCC-4127-BECF-872C746840E1&amp;amp;displaylang=en&amp;displaylang=en">Exchange Web Services Managed API</a> so the first step is to <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=C3342FB3-FBCC-4127-BECF-872C746840E1&amp;amp;displaylang=en&amp;displaylang=en">download</a> and install that on your test lab server.</p>
<div id="attachment_4601" class="wp-caption aligncenter" style="width: 590px"><img class="size-full wp-image-4601" title="ews-api" src="http://exchangeserverpro.com/wp-content/uploads/2012/03/ews-api.jpg" alt="EWS Managed API" width="580" height="286" /><p class="wp-caption-text">EWS Managed API</p></div>
<p>Next, download the script and extract the three files to your server. I placed mine in C:\Scripts\MailGen.</p>
<p class="alert">Download the script file here: <a class="downloadlink" href="http://exchangeserverpro.com/wp-content/plugins/download-monitor/download.php?id=Mailgen.zip" title="Version 1.0 downloaded 286 times" >Start-MailGen.ps1</a> (downloaded 286 times so far)</p>
<p>Open the Start-MailGen.ps1 file in the PowerShell editor or in Notepad and check the following items.</p>
<p>The $dllfolderpath variable is set to the default installation path for the EWS Managed API v1.1. If you install a different version, or to a different path, update this variable.</p>
<pre>#Path to the Exchange Web Services DLL
$dllfolderpath = "C:\Program Files\Microsoft\Exchange\Web Services\1.1\Microsoft.Exchange.WebServices.dll"</pre>
<p>The script uses a switch statement to determine how many emails to send each hour of the day. These values are what I use but you can change them up or down to suit your test lab. The hours 6am to 7pm are individually specified, and then the default value at the end is used for the remaining hours of the day.</p>
<pre>06 {$sendcount = 50}
07 {$sendcount = 80}
08 {$sendcount = 600}
09 {$sendcount = 600}
10 {$sendcount = 800}
11 {$sendcount = 1000}
12 {$sendcount = 600}
13 {$sendcount = 600}
14 {$sendcount = 800}
15 {$sendcount = 800}
16 {$sendcount = 900}
17 {$sendcount = 400}
18 {$sendcount = 200}
19 {$sendcount = 80}
default {$sendcount = 10}</pre>
<p>You can just specify even numbers like the above because the script varies the send count further by adding a random number each time. This will give you a realistic level of email traffic through the different hours of the day.</p>
<div id="attachment_4604" class="wp-caption aligncenter" style="width: 590px"><img class="size-full wp-image-4604" title="email-graph" src="http://exchangeserverpro.com/wp-content/uploads/2012/03/email-graph.jpg" alt="Sample email traffic graph" width="580" height="325" /><p class="wp-caption-text">Sample email traffic graph</p></div>
<p>The service account that will be running the script needs impersonation rights granted to it. I run mine as Administrator since it is just a test lab. Open the Exchange Management Shell and run the following command to grant the impersonation rights.</p>
<pre>[PS] C:\&gt;New-ManagementRoleAssignment -Name:impersonationAssignmentName -Role:ApplicationImpersonation -User:administrator</pre>
<p>You may also need to set your script execution policy to unrestricted.</p>
<pre>[PS] C:\&gt;Set-ExecutionPolicy Unrestricted</pre>
<p>Also, as the script file was downloaded from the internet you may need to right-click the file and choose <strong>Properties</strong>, and then click the <strong>Unblock</strong> button.</p>
<p>The script also depends on the Active Directory remote administration tools. These should be installed already on an Exchange 2010 mailbox server, but if you&#8217;re running the script from a non-Exchange server you may need to install them.</p>
<p>Finally, to start generating email traffic open the Exchange Management Shell and run the script.</p>
<pre>[PS] C:\Scripts\Mailgen&gt;.\Start-MailGen.ps1</pre>
<p>The script begins to send email and will show a progress indicator.</p>
<div id="attachment_4605" class="wp-caption aligncenter" style="width: 590px"><img class="size-full wp-image-4605" title="exchange-2010-test-lab-email-generator" src="http://exchangeserverpro.com/wp-content/uploads/2012/03/exchange-2010-test-lab-email-generator.jpg" alt="Start-MailGen.ps1 running" width="580" height="243" /><p class="wp-caption-text">Start-MailGen.ps1 running</p></div>
<p>The script will select a random sender and recipient from the available mailboxes in your test lab environment, and then construct a random email message using the two files that are provided with the script.</p>
<p>After sending the applicable number of emails for that hour of the day the script will sleep for 5 minute blocks until it reaches the next hour, and will start sending again.</p>
<p>You can leave the script running for several days if you wish, or set it as a scheduled task to ensure that it starts up again if the server is rebooted.</p>
<h3  class="related_post_title">Related posts:</h3><ul class="related_post"><li><a href="http://exchangeserverpro.com/exchange-server-update-rollups-forefront-fscutility" title="Dealing with Exchange Server Update Rollups and Forefront Protection for Exchange">Dealing with Exchange Server Update Rollups and Forefront Protection for Exchange</a></li><li><a href="http://exchangeserverpro.com/health-check-exchange-2010-mailbox-server" title="How to Health Check an Exchange 2010 Mailbox Server">How to Health Check an Exchange 2010 Mailbox Server</a></li><li><a href="http://exchangeserverpro.com/list-users-access-exchange-mailboxes" title="How to List all Users Who Have Access to Other Exchange Mailboxes">How to List all Users Who Have Access to Other Exchange Mailboxes</a></li><li><a href="http://exchangeserverpro.com/generate-html-report-exchange-2010-environment" title="How to Generate a HTML Report of Your Exchange 2010 Environment">How to Generate a HTML Report of Your Exchange 2010 Environment</a></li><li><a href="http://exchangeserverpro.com/powershell-script-check-exchange-mailbox-database-backup-time" title="PowerShell Script: Check Exchange Mailbox Database Last Backup Time">PowerShell Script: Check Exchange Mailbox Database Last Backup Time</a></li></ul><hr />
<p>This article <a href="http://exchangeserverpro.com/test-lab-email-traffic-generator-powershell-script">PowerShell Script to Generate Email Traffic in a Test Lab Environment</a> is © 2012 ExchangeServerPro.com</p>
<p>Get more <a href="http://exchangeserverpro.com">Exchange Server tips</a> at <a href="http://exchangeserverpro.com">ExchangeServerPro.com</a></p>]]></content:encoded>
			<wfw:commentRss>http://exchangeserverpro.com/test-lab-email-traffic-generator-powershell-script/feed</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>You Can&#8217;t Add the First Passive Copy of a Mailbox Database While Circular Logging is Enabled</title>
		<link>http://exchangeserverpro.com/add-passive-copy-mailbox-database-circular-logging-enabled</link>
		<comments>http://exchangeserverpro.com/add-passive-copy-mailbox-database-circular-logging-enabled#comments</comments>
		<pubDate>Sat, 10 Mar 2012 11:51:29 +0000</pubDate>
		<dc:creator>Paul Cunningham</dc:creator>
				<category><![CDATA[Solutions]]></category>
		<category><![CDATA[Circular Logging]]></category>
		<category><![CDATA[DAGs]]></category>
		<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[Mailbox Database]]></category>

		<guid isPermaLink="false">http://exchangeserverpro.com/?p=4590</guid>
		<description><![CDATA[On an Exchange Server 2010 server you may encounter an error when you try to add a database copy to a mailbox database that is enabled for circular logging.]]></description>
			<content:encoded><![CDATA[<p>On an <a href="http://exchangeserverpro.com">Exchange 2010</a> server when you attempt to add a mailbox database copy you may receive an error:</p>
<p>Database &#8220;MB-BR-01&#8243; has circular logging enabled. You can&#8217;t add the first passive copy of a mailbox database while circular logging is enabled. Please disable circular logging before adding the first passive copy of this mailbox database.</p>
<div id="attachment_4591" class="wp-caption aligncenter" style="width: 600px"><img class="size-full wp-image-4591" title="exchange-2010-cant-add-first-passive-copy-01" src="http://exchangeserverpro.com/wp-content/uploads/2012/03/exchange-2010-cant-add-first-passive-copy-01.jpg" alt="Error adding first database copy" width="590" height="327" /><p class="wp-caption-text">Error adding first database copy</p></div>
<p>This error will occur if you&#8217;re trying to add the first database copy for a mailbox database that already has circular logging enabled.</p>
<div id="attachment_4592" class="wp-caption aligncenter" style="width: 454px"><img class="size-full wp-image-4592" title="exchange-2010-cant-add-first-passive-copy-02" src="http://exchangeserverpro.com/wp-content/uploads/2012/03/exchange-2010-cant-add-first-passive-copy-02.jpg" alt="Circular logging enabled for a mailbox database" width="444" height="253" /><p class="wp-caption-text">Circular logging enabled for a mailbox database</p></div>
<p>The reason this occurs is that <a href="http://technet.microsoft.com/en-us/library/dd298080.aspx">circular logging operates in two different modes</a> depending on whether the mailbox database has copies or not.</p>
<p>Circular logging for non-replicated databases (just referred to as &#8220;circular logging&#8221;) operates in a constant state of log files being written, closed, and overwritten.</p>
<p>Circular logging for replicated databases (known as Continuous Replication Circular Logging, or CRCL) operates differently. With CRCL a log file is written, closed, and then needs to be shipped to the other DAG members that hold a replica of that database and replayed into their copy of the database as well. It is only when the reply has occurred on all other replicas that a log file is removed.</p>
<p>So, in order to add the first database copy for a mailbox database that has circular logging enabled, you must first disable circular logging by unticking the box or running the following <a href="http://technet.microsoft.com/en-us/library/bb123971.aspx">Set-MailboxDatabase</a> cmdlet the Exchange Management Shell.</p>
<pre>Set-MailboxDatabase mb-br-01 -CircularLoggingEnabled $false</pre>
<p>The database must then be dismounted and remounted for the change to take effect. After this you can add the database copy as originally intended.</p>
<p>After the first database copy has been added you can re-enable circular logging if you wish.</p>
<pre>Set-MailboxDatabase mb-br-01 -CircularLoggingEnabled $true</pre>
<p>Unlike a mailbox database with no additional copies, you can enable circular logging for a mailbox database that has copies in a DAG without dismounting and remounting the database.</p>
<p>As a final word, note that a similar issue will occur if you have CRCL enabled for a mailbox database and try to remove the last database copy. In that situation you will need to disable circular logging, remove the last copy so that only the standalone database exists, and then re-enable circular logging again if you wish.</p>
<h3  class="related_post_title">Related posts:</h3><ul class="related_post"><li><a href="http://exchangeserverpro.com/exchange-2010-database-portability-disaster-recovery" title="Exchange Server 2010: Using Database Portability for Disaster Recovery">Exchange Server 2010: Using Database Portability for Disaster Recovery</a></li><li><a href="http://exchangeserverpro.com/exchange-2010-mailbox-database-backup-restore-windows-server-backup" title="Exchange 2010 Mailbox Database Backup and Restore with Windows Server Backup">Exchange 2010 Mailbox Database Backup and Restore with Windows Server Backup</a></li><li><a href="http://exchangeserverpro.com/how-to-reseed-a-failed-mailbox-database-copy-in-exchange-server-2010" title="How to Reseed a Failed Mailbox Database Copy in Exchange Server 2010">How to Reseed a Failed Mailbox Database Copy in Exchange Server 2010</a></li><li><a href="http://exchangeserverpro.com/how-to-find-exchange-server-2010-databases-with-circular-logging-enabled" title="How to Find Exchange Server 2010 Databases with Circular Logging Enabled">How to Find Exchange Server 2010 Databases with Circular Logging Enabled</a></li><li><a href="http://exchangeserverpro.com/exchange-2010-error-registry-key-has-subkeys-and-recursive-removes-are-not-supported-by-this-method" title="Exchange 2010 Error: Registry key has subkeys and recursive removes are not supported by this method.">Exchange 2010 Error: Registry key has subkeys and recursive removes are not supported by this method.</a></li></ul><hr />
<p>This article <a href="http://exchangeserverpro.com/add-passive-copy-mailbox-database-circular-logging-enabled">You Can&#8217;t Add the First Passive Copy of a Mailbox Database While Circular Logging is Enabled</a> is © 2012 ExchangeServerPro.com</p>
<p>Get more <a href="http://exchangeserverpro.com">Exchange Server tips</a> at <a href="http://exchangeserverpro.com">ExchangeServerPro.com</a></p>]]></content:encoded>
			<wfw:commentRss>http://exchangeserverpro.com/add-passive-copy-mailbox-database-circular-logging-enabled/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Remove the Default Public Folder Database for an Exchange Mailbox Database</title>
		<link>http://exchangeserverpro.com/remove-default-public-folder-database-exchange-mailbox-database</link>
		<comments>http://exchangeserverpro.com/remove-default-public-folder-database-exchange-mailbox-database#comments</comments>
		<pubDate>Wed, 29 Feb 2012 11:36:55 +0000</pubDate>
		<dc:creator>Paul Cunningham</dc:creator>
				<category><![CDATA[Solutions]]></category>
		<category><![CDATA[Exchange 2007]]></category>
		<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[Public Folders]]></category>

		<guid isPermaLink="false">http://exchangeserverpro.com/?p=4552</guid>
		<description><![CDATA[How to remove the default public folder database from an Exchange Server mailbox database.]]></description>
			<content:encoded><![CDATA[<p>Microsoft has made it pretty clear in recent years that public folders will be going away at some stage in the future of <a href="http://exchangeserverpro.com">Exchange Server</a>.</p>
<p>If you&#8217;ve been using public folders in your Exchange organization and decided to get rid of them completely then you may run into this particular issue.</p>
<p>In this scenario I have gone ahead and prepared to <a href="http://exchangeserverpro.com/exchange-2010-remove-public-folder-database">remove the public folder database</a> by:</p>
<ul>
<li>Removing all of the public folder content</li>
<li>Ensured OAB distribution is set to web only</li>
<li>Ensured all my clients are Outlook 2007 and above</li>
</ul>
<p>When I attempt to remove the public folder database I receive this error.</p>
<div id="attachment_4553" class="wp-caption aligncenter" style="width: 490px"><img class="size-full wp-image-4553" title="exchange-2010-public-folder-database-cannot-be-deleted" src="http://exchangeserverpro.com/wp-content/uploads/2012/02/exchange-2010-public-folder-database-cannot-be-deleted.jpg" alt="The public folder database cannot be deleted" width="480" height="350" /><p class="wp-caption-text">The public folder database cannot be deleted</p></div>
<blockquote><p>The public folder database &#8216;PF-BR-01&#8242; cannot be deleted.</p>
<p>PF-BR-01</p>
<p>Failed</p>
<p>Error:</p>
<p>Public folder database &#8220;PF-BR-01&#8243; is the default public folder database for the following mailbox database(s):</p>
<p>MB-BR-01</p>
<p>. Before deleting the public folder database, assign a new default public folder database to the mailbox database(s).</p></blockquote>
<p>The solution seems logical. All I need to do is modify that mailbox database so it no longer uses the public folder database.</p>
<p>It is simple enough to change the public folder database configured for a mailbox database to <em>some other</em> public folder database, but in this situation I&#8217;m trying to get rid of public folders entirely. So instead I want to set the mailbox database to have <em>no default public folder database</em>.</p>
<p>Here is what happens if I try to use <a href="http://technet.microsoft.com/en-us/library/bb123971.aspx">Set-MailboxDatabase</a> to set the value to $null.</p>
<pre>[PS] C:\&gt;Set-MailboxDatabase MB-BR-01 -PublicFolderDatabase $null
Cannot validate argument on parameter 'PublicFolderDatabase'. The argument is null or empty. Supply an argument that is
 not null or empty and then try the command again.
    + CategoryInfo          : InvalidData: (:) [Set-MailboxDatabase], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Set-MailboxDatabase</pre>
<p>It doesn&#8217;t work. However all is not lost, there is another way, using <strong>ADSIEdit.msc</strong>.</p>
<p>Open ADSIEdit.msc and connect to the <strong>Configuration</strong> naming context.</p>
<div id="attachment_4554" class="wp-caption aligncenter" style="width: 394px"><img class="size-full wp-image-4554" title="adsiedit-configuration" src="http://exchangeserverpro.com/wp-content/uploads/2012/02/adsiedit-configuration.jpg" alt="Connect to the Configuration naming context with ADSIEdit" width="384" height="240" /><p class="wp-caption-text">Connect to the Configuration naming context with ADSIEdit</p></div>
<p>Navigate to the container that holds the Exchange databases. For Exchange 2010 you&#8217;ll find this in <strong>CN=Services -&gt; CN=Microsoft Exchange -&gt; CN=(your organization name) -&gt; CN=Administrative Groups -&gt; CN=Exchange Administrative Group (FYDIBOHF23SPDLT) -&gt; CN=Databases</strong>.</p>
<p>Right-click the mailbox database you want to remove the default public folder database from and choose <strong>Properties</strong>.</p>
<p>Scroll down until you find the <strong>msExchHomePublicMDB</strong> attribute. Highlight it and then click <strong>Edit</strong>.</p>
<p><img class="aligncenter size-full wp-image-4556" title="msExchHomePublicMDB-01" src="http://exchangeserverpro.com/wp-content/uploads/2012/02/msExchHomePublicMDB-011.jpg" alt="" /></p>
<p>Click the <strong>Clear</strong> button so that the value changes to &#8220;not set&#8221;.</p>
<p>Click <strong>OK</strong>, and <strong>OK</strong> again to commit the change.</p>
<p>Depending on the size of your network you may need to wait for that change to replicate throughout your Active Directory.</p>
<p>When you try to remove the public folder database again you should find that it now removes without error.</p>
<div id="attachment_4557" class="wp-caption aligncenter" style="width: 490px"><img class="size-full wp-image-4557" title="remove-public-folder-database-successful" src="http://exchangeserverpro.com/wp-content/uploads/2012/02/remove-public-folder-database-successful.jpg" alt="Public folder database successfully removed" width="480" height="166" /><p class="wp-caption-text">Public folder database successfully removed</p></div>
<h3  class="related_post_title">Related posts:</h3><ul class="related_post"><li><a href="http://exchangeserverpro.com/poll-public-folders-exchange-environment" title="Poll: Do You Still Use Public Folders in Your Exchange Environment?">Poll: Do You Still Use Public Folders in Your Exchange Environment?</a></li><li><a href="http://exchangeserverpro.com/exchange-2007-2010-public-folder-store-inconsistent-state" title="Exchange 2007/2010 Public Folder Store in an Inconsistent State">Exchange 2007/2010 Public Folder Store in an Inconsistent State</a></li><li><a href="http://exchangeserverpro.com/powershell-configuring-settings-multiple-exchange-mailbox-databases" title="PowerShell: Configuring Settings on Multiple Exchange Mailbox Databases">PowerShell: Configuring Settings on Multiple Exchange Mailbox Databases</a></li><li><a href="http://exchangeserverpro.com/public-folders-not-replicating-between-exchange-2007-and-2010" title="Public Folders Not Replicating Between Exchange 2007 and 2010">Public Folders Not Replicating Between Exchange 2007 and 2010</a></li><li><a href="http://exchangeserverpro.com/object-is-read-only-removing-exchange-server-2007-public-folder-database" title="Error “Object is Read Only” During Exchange Server 2007 Public Folder Database Removal">Error “Object is Read Only” During Exchange Server 2007 Public Folder Database Removal</a></li></ul><hr />
<p>This article <a href="http://exchangeserverpro.com/remove-default-public-folder-database-exchange-mailbox-database">How to Remove the Default Public Folder Database for an Exchange Mailbox Database</a> is © 2012 ExchangeServerPro.com</p>
<p>Get more <a href="http://exchangeserverpro.com">Exchange Server tips</a> at <a href="http://exchangeserverpro.com">ExchangeServerPro.com</a></p>]]></content:encoded>
			<wfw:commentRss>http://exchangeserverpro.com/remove-default-public-folder-database-exchange-mailbox-database/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How to Configure a File Share Witness for an Exchange 2010 Database Availability Group</title>
		<link>http://exchangeserverpro.com/configure-file-share-witness-exchange-2010-database-availability-group</link>
		<comments>http://exchangeserverpro.com/configure-file-share-witness-exchange-2010-database-availability-group#comments</comments>
		<pubDate>Mon, 20 Feb 2012 11:19:11 +0000</pubDate>
		<dc:creator>Paul Cunningham</dc:creator>
				<category><![CDATA[Solutions]]></category>
		<category><![CDATA[DAG]]></category>
		<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[High Availability]]></category>

		<guid isPermaLink="false">http://exchangeserverpro.com/?p=4478</guid>
		<description><![CDATA[Learn how to configure a File Share Witness server for an Exchange Server 2010 Database Availability Group.]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://exchangeserverpro.com">Exchange Server 2010</a> lab environment I unwittingly created a problem for the <a href="http://exchangeserverpro.com/exchange-server-2010-database-availability-group-installation-step-by-step">Database Availability Group</a>. In preparing to consolidate all of the server roles onto just two servers and implement a hardware load balancer I went ahead and decommissioned the two CAS/HT servers that previously made up the <a href="http://exchangeserverpro.com/how-to-install-an-exchange-server-2010-client-access-server-array">CAS array</a> in the site.</p>
<p>Naturally one of those CAS/HT servers also happened to be the File Share Witness for my two-member DAG. Whoops!</p>
<p>Now my DAG displays a warning when I check the health of it.</p>
<blockquote><p>WARNING: Database availability group &#8216;dag-headoffice&#8217; witness is in a failed state. The database availability group requires the witness server to maintain quorum. Please use the Set-DatabaseAvailabilityGroup cmdlet to re-create the witness server and directory.</p></blockquote>
<p>In this real world this situation may also arise if the server hosting the File Share Witness was being decommissioned, or if it had failed. Fortunately we can resolve the problem by specifying a new FSW for the DAGm which I will demonstrate here.</p>
<p>I&#8217;m going to use another member server within the site as my FSW, which allows me to demonstrate a related problem. The server is named <strong>HO-MGT</strong> so using the <a href="http://technet.microsoft.com/en-us/library/dd297934.aspx">Set-DatabaseAvailabilityGroup</a> cmdlet to configure the FSW would mean I run this command.</p>
<pre>[PS] C:\&gt;Set-DatabaseAvailabilityGroup dag-headoffice -WitnessServer ho-mgt -WitnessDirectory C:\DAGFSW</pre>
<p>However in this case I get an error.</p>
<blockquote><p>WARNING: The Exchange Trusted Subsystem is not a member of the local Administrators group on specified witness server<br />
ho-mgt.<br />
WARNING: Insufficient permissions to access file shares on witness server &#8216;HO-MGT.exchangeserverpro.net&#8217;. Until this problem is corrected, the database availability group may be more vulnerable to failures. You can use the Set-DatabaseAvailabilityGroup cmdlet to try the operation again. Error: Access is denied<br />
Unable to change the quorum for database availability group dag-headoffice. Witness server &#8216;\\HO-MGT.exchangeserverpro.net\dag-headoffice.exchangeserverpro.net&#8217; network name wasn&#8217;t found. This may be due to firewall settings.<br />
+ CategoryInfo : InvalidArgument: (:) [Set-DatabaseAvailabilityGroup], DagTaskProblemC&#8230;ptionBadNetName<br />
+ FullyQualifiedErrorId : 75321C4E,Microsoft.Exchange.Management.SystemConfigurationTasks.SetDatabaseAvailabilityGroup</p></blockquote>
<p>If you were running the same command but specifying another Exchange 2010 server to be the FSW you would not receive that error. This is because Exchange servers trust each other to perform this type of administration, thanks to a group called <strong>Exchange Trusted Subsystem</strong>.</p>
<p>All of the Exchange 2010 servers have this group as a member of their local Administrators group, for example here the local Administrators group of one of my DAG members.</p>
<div id="attachment_4479" class="wp-caption aligncenter" style="width: 414px"><img class="size-full wp-image-4479" title="exchange-2010-dag-fsw-exchange-trusted-subsystem" src="http://exchangeserverpro.com/wp-content/uploads/2012/02/exchange-2010-dag-fsw-exchange-trusted-subsystem.jpg" alt="Exchange Trusted Subsystem group in local Administrators" width="404" height="309" /><p class="wp-caption-text">Exchange Trusted Subsystem group in local Administrators</p></div>
<p>So the solution is to add the <strong>Exchange Trusted Subsystem</strong> group to the local Administrators group on my HO-MGT server, and then run the Set-DatabaseAvailabilityGroup command again.</p>
<p>After running the command you can see that Exchange has created the folder and shared it on the FSW server, no need to manually create the folder or set any permissions yourself.</p>
<div id="attachment_4480" class="wp-caption aligncenter" style="width: 590px"><img class="size-full wp-image-4480" title="exchange-2010-dag-fsw-file-share" src="http://exchangeserverpro.com/wp-content/uploads/2012/02/exchange-2010-dag-fsw-file-share.jpg" alt="Database Availability Group File Share Witness directory" width="580" height="295" /><p class="wp-caption-text">Database Availability Group File Share Witness directory</p></div>
<p>Now when checking the health of the Database Availability Group you should not receive any warnings about missing File Share Witness servers.</p>
<h3  class="related_post_title">Related posts:</h3><ul class="related_post"><li><a href="http://exchangeserverpro.com/teched-video-exchange-server-2010-high-availability-deep-dive" title="TechEd Video: Exchange Server 2010 High Availability Deep Dive">TechEd Video: Exchange Server 2010 High Availability Deep Dive</a></li><li><a href="http://exchangeserverpro.com/benefits-exchange-server-2010-compared-exchange-2007" title="What Are The Benefits of Exchange Server 2010 Compared to Exchange 2007">What Are The Benefits of Exchange Server 2010 Compared to Exchange 2007</a></li><li><a href="http://exchangeserverpro.com/exchange-2010-faq-version-exchange-server-2010" title="Exchange 2010 FAQ: Which Version of Exchange Server 2010 Do I Need?">Exchange 2010 FAQ: Which Version of Exchange Server 2010 Do I Need?</a></li><li><a href="http://exchangeserverpro.com/migrating-single-exchange-2010-server-high-availability" title="Migrating from a Single Exchange 2010 Server to High Availability ">Migrating from a Single Exchange 2010 Server to High Availability </a></li><li><a href="http://exchangeserverpro.com/exchange-server-2010-database-availability-group-installation-step-by-step" title="Exchange Server 2010 Database Availability Group Installation Step by Step">Exchange Server 2010 Database Availability Group Installation Step by Step</a></li></ul><hr />
<p>This article <a href="http://exchangeserverpro.com/configure-file-share-witness-exchange-2010-database-availability-group">How to Configure a File Share Witness for an Exchange 2010 Database Availability Group</a> is © 2012 ExchangeServerPro.com</p>
<p>Get more <a href="http://exchangeserverpro.com">Exchange Server tips</a> at <a href="http://exchangeserverpro.com">ExchangeServerPro.com</a></p>]]></content:encoded>
			<wfw:commentRss>http://exchangeserverpro.com/configure-file-share-witness-exchange-2010-database-availability-group/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Get-MailboxReport.ps1 &#8211; PowerShell Script to Generate Mailbox Reports</title>
		<link>http://exchangeserverpro.com/powershell-script-create-mailbox-size-report-exchange-server-2010</link>
		<comments>http://exchangeserverpro.com/powershell-script-create-mailbox-size-report-exchange-server-2010#comments</comments>
		<pubDate>Mon, 06 Feb 2012 12:05:54 +0000</pubDate>
		<dc:creator>Paul Cunningham</dc:creator>
				<category><![CDATA[Solutions]]></category>
		<category><![CDATA[Exchange 2007]]></category>
		<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[Mailboxes]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Reporting]]></category>

		<guid isPermaLink="false">http://exchangeserverpro.com/?p=4170</guid>
		<description><![CDATA[This PowerShell script produces a nicely formatted mailbox size report for Exchange Server 2010 or 2007]]></description>
			<content:encoded><![CDATA[<p>One of the <a href="http://exchangeserverpro.com">Exchange Server</a> administration tasks I perform almost every day is creating mailbox size reports. There are a few different reasons that I create these reports, such as planning a mailbox migration project, responding to a storage capacity alert for a particular database, or providing a specific team of people with a report of their mailbox sizes.</p>
<p>Now it is pretty easy to <a href="http://exchangeserverpro.com/browsing-mailbox-databases-in-exchange-2007-and-2010">get the sizes for Exchange mailboxes</a> and to handle the formatting of the<a href="http://exchangeserverpro.com/calculate-exchange-2010-mailbox-sizes-powershell"> Exchange 2010 mailbox statistics</a> so that they are easier to perform calculations on, but it gets a bit boring running those commands day after day.</p>
<p>Even worse, after running the commands to create a CSV report I still had to open that in Excel, remove the unwanted details, use Excel formulas to convert the values from bytes to megabytes, sort them into order, and so on. Again not difficult, just boring after doing it hundreds of times.</p>
<p>So I created a <a href="http://exchangeserverpro.com/tag/powershell">PowerShell</a> script, <strong>Get-MailboxReport.ps1</strong>, to do all of the heavy lifting for me, and I&#8217;m sharing that script with you here.</p>
<p class="alert"><strong>Download the script file here:</strong> <a class="downloadlink" href="http://exchangeserverpro.com/wp-content/plugins/download-monitor/download.php?id=Get-MailboxReport.zip" title="Version 1.1 downloaded 3537 times" >Get-MailboxReport.ps1</a> (downloaded 3537 times so far)</p>
<p>Let&#8217;s take a look at how the script works. Here if a video to demonstrate:<br />
<iframe src="http://www.youtube.com/embed/lEn6mjY4zws?rel=0" frameborder="0" width="600" height="437"></iframe></p>
<p>I&#8217;ve included help information within the script itself so you can use Get-Help to discover how to run the script.</p>
<pre>[PS] C:\Scripts\demo&gt;Get-Help .\Get-MailboxReport.ps1

NAME
    C:\Scripts\demo\Get-MailboxReport.ps1

SYNOPSIS
    Get-MailboxReport.ps1 - Mailbox report generation script.

SYNTAX
    C:\Scripts\demo\Get-MailboxReport.ps1 [-database ] []

    C:\Scripts\demo\Get-MailboxReport.ps1 [-file ] []

    C:\Scripts\demo\Get-MailboxReport.ps1 [-server ] []

    C:\Scripts\demo\Get-MailboxReport.ps1 [-mailbox ] []

    C:\Scripts\demo\Get-MailboxReport.ps1 [-all] []

DESCRIPTION
    Generates a report of useful information for
    the specified server, database, mailbox or list of mailboxes.
    Use only one parameter at a time depending on the scope of
    your mailbox report.

RELATED LINKS
    For more script details, a video demo, or to give feedback please go to:

http://exchangeserverpro.com/powershell-script-create-mailbox-size-report-exchange-server-2010

REMARKS
    To see the examples, type: "get-help C:\Scripts\demo\Get-MailboxReport.ps1 -examples".
    For more information, type: "get-help C:\Scripts\demo\Get-MailboxReport.ps1 -detailed".
    For technical information, type: "get-help C:\Scripts\demo\Get-MailboxReport.ps1 -full".</pre>
<p>Depending on which parameter you use the output will vary.</p>
<ul>
<li>If you use the <strong>-mailbox</strong> parameter to query a single mailbox, then the output will appear in the console window. I don&#8217;t really see the need to output a single mailbox&#8217;s details to a CSV file.</li>
<li>If you use any of the other parameters, <strong>-server</strong>, <strong>-database</strong>, <strong>-file</strong>, or <strong>-all</strong>, the output will be written to a CSV file in the same folder you&#8217;re running the script from.</li>
<li>You can use the optional <strong>-filename</strong> parameter to specify your own output file name</li>
</ul>
<p>Once you&#8217;ve generated the CSV report you can open it with Excel and begin to analyze the data.</p>
<p class="alert"><strong>Download the script file here:</strong> <a class="downloadlink" href="http://exchangeserverpro.com/wp-content/plugins/download-monitor/download.php?id=Get-MailboxReport.zip" title="Version 1.1 downloaded 3537 times" >Get-MailboxReport.ps1</a> (downloaded 3537 times so far)</p>
<p>Change Log:</p>
<ul>
<li>6/02/2012 &#8211; V1.0 &#8211; Initial version</li>
<li>27/02/2012 &#8211; V1.1 - Improved recipient scope settings, exception handling, and custom file name parameter.</li>
</ul>
<h3  class="related_post_title">Related posts:</h3><ul class="related_post"><li><a href="http://exchangeserverpro.com/move-exchange-mailboxes-text-file-powershell" title="How to Move Exchange Mailboxes in a Text File using PowerShell">How to Move Exchange Mailboxes in a Text File using PowerShell</a></li><li><a href="http://exchangeserverpro.com/exchange-2010-message-tracking-event-ids-powershell" title="Reporting Exchange Server 2010 Message Tracking Event IDs with PowerShell">Reporting Exchange Server 2010 Message Tracking Event IDs with PowerShell</a></li><li><a href="http://exchangeserverpro.com/exchange-2010-message-tracking-log-search-powershell" title="Searching Exchange Server 2010 Message Tracking Logs with PowerShell">Searching Exchange Server 2010 Message Tracking Logs with PowerShell</a></li><li><a href="http://exchangeserverpro.com/user-logged-mailbox-data-return" title="The User Hasn&#8217;t Logged on to Mailbox So There is No Data to Return">The User Hasn&#8217;t Logged on to Mailbox So There is No Data to Return</a></li><li><a href="http://exchangeserverpro.com/test-mailflow-exchange-2003-servers" title="Using Test-Mailflow with Exchange 2003 Servers">Using Test-Mailflow with Exchange 2003 Servers</a></li></ul><hr />
<p>This article <a href="http://exchangeserverpro.com/powershell-script-create-mailbox-size-report-exchange-server-2010">Get-MailboxReport.ps1 &#8211; PowerShell Script to Generate Mailbox Reports</a> is © 2012 ExchangeServerPro.com</p>
<p>Get more <a href="http://exchangeserverpro.com">Exchange Server tips</a> at <a href="http://exchangeserverpro.com">ExchangeServerPro.com</a></p>]]></content:encoded>
			<wfw:commentRss>http://exchangeserverpro.com/powershell-script-create-mailbox-size-report-exchange-server-2010/feed</wfw:commentRss>
		<slash:comments>90</slash:comments>
		</item>
		<item>
		<title>Avoid Running Out of Transaction Log Disk Space on Exchange Servers</title>
		<link>http://exchangeserverpro.com/avoid-running-transaction-log-disk-space-exchange-servers</link>
		<comments>http://exchangeserverpro.com/avoid-running-transaction-log-disk-space-exchange-servers#comments</comments>
		<pubDate>Sat, 28 Jan 2012 12:45:12 +0000</pubDate>
		<dc:creator>Paul Cunningham</dc:creator>
				<category><![CDATA[Solutions]]></category>
		<category><![CDATA[Backups]]></category>
		<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Storage]]></category>

		<guid isPermaLink="false">http://exchangeserverpro.com/?p=4398</guid>
		<description><![CDATA[Don't take the risk that your Exchange Servers will run out of transaction log disk space. Use this script to monitor and alert on failed backups that can cause service outages later on.]]></description>
			<content:encoded><![CDATA[<p>Paul Robichaux&#8217;s <a href="http://www.windowsitpro.com/content2/tabid/4436/catpath/exchange-server/topic/messaging-world-news-142038">recent Windows IT Pro column</a> contains this passage:</p>
<blockquote><p>If you don&#8217;t know when you&#8217;re about to run out of disk space on the log LUN, you&#8217;re totally doing it wrong. It leaves me slack-jawed with astonishment that in 2012 we still have administrators who suffer unplanned downtime due to log volumes filling up because of poor design or problems with backups. Stop the madness! Check your backups regularly and use monitoring, be it however primitive, to ensure that you don&#8217;t have this problem.</p></blockquote>
<p>Paul is referring to <a href="http://blogs.technet.com/b/exchange/archive/2011/11/09/capacity-planning-yes-transaction-log-space-is-critical-to-keeping-your-databases-healthy-and-mounted.aspx">this post</a> on the MS Exchange Team blog, which mentions that:</p>
<blockquote><p>&#8230;the number one reason why our Premier customers open Exchange 2010 critical situations is because Mailbox databases dismount due to running out of disk space on the transaction log LUN.</p></blockquote>
<p>Either I missed that post when it was published a few months ago or I glossed over it and it didn&#8217;t catch my attention enough.</p>
<p>I&#8217;ve been stung by transaction log disks running out of space, even as recently as last year. I work in a very large Exchange environment where backups and storage monitoring are performed by two different teams, both of them outside of my team.</p>
<p>That puts us in the situation where failed backups, combined with either a storage monitoring problem or a human error in the escalation processes can (and has) caused a log volume to fill up. Another situation that can arise is when new servers are provisioned, our help desks begin putting mailboxes on them before they&#8217;ve been added to the backups.</p>
<p>Which is why I wrote this <a href="http://exchangeserverpro.com/set-automated-exchange-2010-database-backup-alert-email">script to check the Exchange database backups</a> and alert my team when they have not been backed up in the 48 hours or more. In fact that script is a better version than the one we run in production (I haven&#8217;t ported over the improvements I later made at home to the original).</p>
<p>Ever since we put it in place that script has alerted us to numerous situations before they could evolve into disasters.</p>
<p>Setting it up as a scheduled task to run daily is a job that will take you less than half an hour. I highly recommend it, not just because I wrote the script, but because it adds a valuable layer of protection to your environment.</p>
<h3  class="related_post_title">Related posts:</h3><ul class="related_post"><li><a href="http://exchangeserverpro.com/set-automated-exchange-2010-database-backup-alert-email" title="How to Set Up an Automated Exchange 2010 Database Backup Alert Email">How to Set Up an Automated Exchange 2010 Database Backup Alert Email</a></li><li><a href="http://exchangeserverpro.com/powershell-script-check-exchange-mailbox-database-backup-time" title="PowerShell Script: Check Exchange Mailbox Database Last Backup Time">PowerShell Script: Check Exchange Mailbox Database Last Backup Time</a></li><li><a href="http://exchangeserverpro.com/exchange-server-update-rollups-forefront-fscutility" title="Dealing with Exchange Server Update Rollups and Forefront Protection for Exchange">Dealing with Exchange Server Update Rollups and Forefront Protection for Exchange</a></li><li><a href="http://exchangeserverpro.com/test-lab-email-traffic-generator-powershell-script" title="PowerShell Script to Generate Email Traffic in a Test Lab Environment">PowerShell Script to Generate Email Traffic in a Test Lab Environment</a></li><li><a href="http://exchangeserverpro.com/exchange-2010-automate-rebalancing-database-availability-group" title="Exchange 2010 FAQ: Can You Automate Rebalancing a Database Availability Group?">Exchange 2010 FAQ: Can You Automate Rebalancing a Database Availability Group?</a></li></ul><hr />
<p>This article <a href="http://exchangeserverpro.com/avoid-running-transaction-log-disk-space-exchange-servers">Avoid Running Out of Transaction Log Disk Space on Exchange Servers</a> is © 2012 ExchangeServerPro.com</p>
<p>Get more <a href="http://exchangeserverpro.com">Exchange Server tips</a> at <a href="http://exchangeserverpro.com">ExchangeServerPro.com</a></p>]]></content:encoded>
			<wfw:commentRss>http://exchangeserverpro.com/avoid-running-transaction-log-disk-space-exchange-servers/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Error: Outlook Was Unable to Recover Some or All of the Items in this Folder</title>
		<link>http://exchangeserverpro.com/error-outlook-unable-recover-items-folder</link>
		<comments>http://exchangeserverpro.com/error-outlook-unable-recover-items-folder#comments</comments>
		<pubDate>Wed, 14 Dec 2011 10:13:26 +0000</pubDate>
		<dc:creator>Paul Cunningham</dc:creator>
				<category><![CDATA[Solutions]]></category>
		<category><![CDATA[Exchange 2003]]></category>
		<category><![CDATA[Exchange 2007]]></category>
		<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[Outlook]]></category>

		<guid isPermaLink="false">http://exchangeserverpro.com/?p=4355</guid>
		<description><![CDATA[While attempting to restore items from the Outlook recoverable deleted items you may encounter an error message.]]></description>
			<content:encoded><![CDATA[<p>While attempting to restore items from the Outlook recoverable deleted items you may encounter the following error message.</p>
<blockquote><p>Outlook was unable to recover some or all of the items in this folder. Make sure you have the required permissions to recover items in this folder, and try again. If the problem persists, contact your administrator.</p></blockquote>
<p><img class="aligncenter size-full wp-image-4356" title="outlook-unable-to-recover-all-of-the-items" src="http://exchangeserverpro.com/wp-content/uploads/2011/12/outlook-unable-to-recover-all-of-the-items.jpg" alt="" width="580" height="72" /></p>
<p>The error may occur when you attempt to recover a folder that contains a large number of sub-folders or mail items in it.</p>
<p>On the <a href="http://exchangeserverpro.com">Exchange Server</a> you may see a corresponding Application event log entry similar to this:</p>
<pre>Log Name:      Application
Source:        MSExchangeIS
Date:          11/14/2011 12:57:59 PM
Event ID:      9646
Task Category: General
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      exchangeserver.domain.local
Description:
Mapi session "3bbea118-07e3-4746-b7bf-0e5b65e28314" exceeded the maximum of 500 objects of type "objtFolder".</pre>
<p>This can occur due to the default limits configured on the Exchange Server for the number of items that can be opened by a single MAPI session. In the example above the MAPI session was trying to open more than the default 500 allowed objects of type &#8220;objtFolder&#8221; (in other words, Folders).</p>
<p>The solution is provided by Microsoft in <a href="http://support.microsoft.com/kb/830829/en-us">this support article,</a> which refers to Exchange Server 2003 but applies to later versions as well.</p>
<ol>
<li>Open Regedit and navigate to <strong>\\HKEY_LOCAL_MACHINE \SYSTEM\CurrentControlSet\Services\MSExchangeIS\ParametersSystem</strong></li>
<li>If the key &#8220;MaxObjsPerMapiSession&#8221; does not already exist, right-click on ParametersSystem and create a new key of that name.</li>
<li>Create a new DWORD value with a name matching the object type in the event log error on your server (eg &#8220;objtFolder&#8221; in this example)</li>
<li>Set the DWORD value to a decimal value higher than the default. For the case above I first tried 1000, then 10000 when that did not work.</li>
<li>Wait 15-30 minutes for the registry change to take effect, then retry the Outlook operation.</li>
</ol>
<p>You may find that you need to try gradually increasing the value until you can successfully recover the items in Outlook. You may also find that after you&#8217;ve removed one limit that another object type&#8217;s limit may also suddenly come into play, so always check your event log for new errors identifying additional object types that you may need to add a registry value for.</p>
<p>After you&#8217;ve successfully recovered the Outlook items revert the registry keys to their default values (listed in the Microsoft support article above) to prevent issues with server resources in the future.</p>
<h3  class="related_post_title">Related posts:</h3><ul class="related_post"><li><a href="http://exchangeserverpro.com/test-mailflow-exchange-2003-servers" title="Using Test-Mailflow with Exchange 2003 Servers">Using Test-Mailflow with Exchange 2003 Servers</a></li><li><a href="http://exchangeserverpro.com/upgrading-exchange-servers" title="Why Haven&#8217;t You Upgraded Your Exchange Servers Yet?">Why Haven&#8217;t You Upgraded Your Exchange Servers Yet?</a></li><li><a href="http://exchangeserverpro.com/poll-version-exchange-server-running" title="Poll: Which Version of Exchange Server Are You Running?">Poll: Which Version of Exchange Server Are You Running?</a></li><li><a href="http://exchangeserverpro.com/update-rollup-3-exchange-2010-sp1-exchange-2007-sp3" title="Update Rollup 3 for Exchange 2010 SP1 and Exchange 2007 SP3">Update Rollup 3 for Exchange 2010 SP1 and Exchange 2007 SP3</a></li><li><a href="http://exchangeserverpro.com/exchange-2010-direct-migration-2003-2010-or-2007" title="Exchange 2010 FAQ: Is Direct Exchange Migration from 2003 to 2010 Possible Without Upgrading to 2007?">Exchange 2010 FAQ: Is Direct Exchange Migration from 2003 to 2010 Possible Without Upgrading to 2007?</a></li></ul><hr />
<p>This article <a href="http://exchangeserverpro.com/error-outlook-unable-recover-items-folder">Error: Outlook Was Unable to Recover Some or All of the Items in this Folder</a> is © 2011 ExchangeServerPro.com</p>
<p>Get more <a href="http://exchangeserverpro.com">Exchange Server tips</a> at <a href="http://exchangeserverpro.com">ExchangeServerPro.com</a></p>]]></content:encoded>
			<wfw:commentRss>http://exchangeserverpro.com/error-outlook-unable-recover-items-folder/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

