<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>mahuynh</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/mahuynh/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/mahuynh/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 04:02:09 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Setup of first Exchange 2013 or 2016 server fails in a child domain due to AD replication</title>
      <link>https://docs.microsoft.com/archive/blogs/mahuynh/setup-of-first-exchange-2016-server-fails-in-a-child-domain-due-to-ad-replication</link>
      <pubDate>Fri, 16 Jun 2017 21:12:21 GMT</pubDate>
      <dc:creator><![CDATA[Matthew Huynh [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mahuynh/?p=246</guid>
      <description><![CDATA[Let's say you have a parent-child Active Directory topology of tailspintoys.com and...]]></description>
      <content:encoded><![CDATA[Let's say you have a parent-child Active Directory topology of tailspintoys.com and child.tailspintoys.com. You have Exchange 2010 installed in the parent domain, and you want to install 2013 or 2016 into the child domain. You run through all the <a href="https://technet.microsoft.com/en-us/library/bb125224(v=exchg.160).aspx">AD prep work</a>. You then run Exchange setup to install your first mailbox server and it bombs out. Being the handy Exchange admin that you are, you know to consult C:\ExchangeSetupLogs\ExchangeSetup.log for all the gory details about the error.

You see various errors such as:
<ul>
 	<li>Couldn't find recipient "tailspintoys.com/Users/SystemMailbox{bb558c35-97f1-4cb9-8ff7-d53741dc928c}". Reason: tailspintoys.com/Users/SystemMailbox{bb558c35-97f1-4cb9-8ff7-d53741dc928c} isn't a mailbox user.</li>
 	<li>DSID-03152C45, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 200f4 (homeMDB)</li>
</ul>
There are various permutations of this issue, but the root cause is the same: slow AD replication between the root domain and the child domain. In one version of this issue, here is Exchange setup is doing:
<ol>
 	<li>A mailbox database is created in the child domain.</li>
 	<li>The arbitration mailbox (residing in the root domain) is mail-enabled which modifies its homeMDB value.</li>
 	<li>The root DC processing this modification rejects it because the homeMDB value does not point to a valid object.</li>
</ol>
The root DC thinks the new homeMDB value is not valid because it hasn't replicated the newly-created mailbox database object from the child domain yet. What should we do here?

Unfortunately, there are no great workarounds. One option is to wait for AD replication to catch up (at least 15 minutes usually), and then re-run setup.

The other option is a bit more involved:
<ol>
 	<li>Install the first Exchange 2013 or 2016 mailbox server into the root domain so that the arbitration mailboxes will be staged properly.</li>
 	<li>Install another Exchange 2013 or 2016 mailbox server into the child domain.</li>
 	<li>Move all the arbitration mailboxes to the child domain's Exchange server (Get-Mailbox -Arbitration | New-MoveRequest -TargetDatabase MyCoolDb)</li>
 	<li>Uninstall the root domain's Exchange server.</li>
</ol>
This solution is a bit tedious but it'll get the job done without potentially re-running setup multiple times.]]></content:encoded>
    </item>
    <item>
      <title>Check Managed Availability Probe Results in application log when your Exchange 2013 server has sustained high CPU</title>
      <link>https://docs.microsoft.com/archive/blogs/mahuynh/check-managed-availability-probe-results-in-application-log-when-your-exchange-2013-server-has-sustained-high-cpu</link>
      <pubDate>Sat, 17 Dec 2016 00:05:11 GMT</pubDate>
      <dc:creator><![CDATA[Matthew Huynh [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mahuynh/?p=215</guid>
      <description><![CDATA[I stumbled upon this neat feature in Exchange 2013. When your Exchange 2013 (and probably later)...]]></description>
      <content:encoded><![CDATA[I stumbled upon this neat feature in Exchange 2013. When your Exchange 2013 (and probably later) server is experiencing sustained high CPU, an event 2 error occurs inside your <strong>Microsoft-Exchange-ActiveMonitoring\ProbeResult</strong> channel.

<a href="https://msdnshared.blob.core.windows.net/media/2016/12/Capture20.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/12/Capture20-130x300.png" alt="capture" width="130" height="300" class="alignnone size-medium wp-image-225" /></a>

Look for an event with ResultName of EDS/ExchangeProcessorTimeTrigger_Warning/_total. Inside the details view, there are a bunch of top N lists that will give you quick insights into what is happening:
<pre>&lt;Event xmlns="https://schemas.microsoft.com/win/2004/08/events/event"&gt;
 &lt;System&gt;
 &lt;Provider Name="Microsoft-Exchange-ActiveMonitoring" Guid="{ECD64F52-A3BC-47B8-B681-A11B7A1C8770}" /&gt;
 &lt;EventID&gt;2&lt;/EventID&gt;
 &lt;Version&gt;0&lt;/Version&gt;
 &lt;Level&gt;2&lt;/Level&gt;
 &lt;Task&gt;2&lt;/Task&gt;
 &lt;Opcode&gt;0&lt;/Opcode&gt;
 &lt;Keywords&gt;0x800000000000000&lt;/Keywords&gt;
 &lt;TimeCreated SystemTime="2016-12-14T16:49:57.491981400Z" /&gt;
 &lt;EventRecordID&gt;75627993&lt;/EventRecordID&gt;
 &lt;Correlation /&gt;
 &lt;Execution ProcessID="2792" ThreadID="10440" /&gt;
 &lt;Channel&gt;Microsoft-Exchange-ActiveMonitoring/ProbeResult&lt;/Channel&gt;
 &lt;Computer&gt;EXCH2013.contoso.com&lt;/Computer&gt;
 &lt;Security UserID="S-1-5-18" /&gt;
 &lt;/System&gt;
 &lt;UserData&gt;
 &lt;EventXML xmlns:auto-ns2="https://schemas.microsoft.com/win/2004/08/events" xmlns="myNs"&gt;
 &lt;ResultId&gt;75697922&lt;/ResultId&gt;
 &lt;ServiceName&gt;EDS&lt;/ServiceName&gt;
 &lt;IsNotified&gt;1&lt;/IsNotified&gt;
 &lt;ResultName&gt;<span style="color: #ff0000">EDS/ExchangeProcessorTimeTrigger_Warning/_total</span>&lt;/ResultName&gt;
 &lt;WorkItemId&gt;-74577656&lt;/WorkItemId&gt;
 &lt;DeploymentId&gt;0&lt;/DeploymentId&gt;
 &lt;MachineName&gt;EXCH2013&lt;/MachineName&gt;
 &lt;Error&gt;The performance counter '\\EXCH2013\Processor(_Total)\% Processor Time' sustained a value of '89.80', for the '5' minute(s) interval starting at '12/14/2016 4:42:00 PM'.%nAdditional information: 
<span style="color: #ff0000">Top 10 process time breakdown:</span>
<span style="color: #ff0000">CPU % Process Name</span>
<span style="color: #ff0000">279.5 w3wp#MSExchangeSyncAppPool</span>
<span style="color: #ff0000">184.2 Microsoft.Exchange.Store.Worker</span>
<span style="color: #ff0000">141.8 Microsoft.Exchange.Store.Worker#2</span>
<span style="color: #ff0000">111.9 NodeRunner#ContentEngineNode1</span>
<span style="color: #ff0000"> 86.9 w3wp#MSExchangeRpcProxyFrontEndAppPool</span>
<span style="color: #ff0000"> 66.4 Microsoft.Exchange.RpcClientAccess.Service</span>
<span style="color: #ff0000"> 61.1 powershell#4</span>
<span style="color: #ff0000"> 47.3 powershell#5</span>
<span style="color: #ff0000"> 43.8 MSExchangeDelivery</span>
<span style="color: #ff0000"> 40.4 NodeRunner#IndexNode1</span>

The total CPU in Kernel : 17.55441

\\EXCH2013\MSExchange Active Manager(_Total)\Database Mounted : 2

\\EXCH2013\MSExchange Active Manager(_Total)\Database Copy Role Active : 3

\\EXCH2013\MSExchange Search Indexes(_Total)\Crawler: Mailboxes Remaining : 0

\\EXCH2013\MSExchange Search Indexes(_Total)\Notifications: Awaiting Processing : 10247.25

\\EXCH2013\MSExchange Search Indexes(_Total)\Retry: Retriable Items : 1356622

<span style="color: #ff0000">Top 15 W3WP AppPools with the highest request rate:</span>
<span style="color: #ff0000">Requests/sec: W3WP AppPool</span>
<span style="color: #ff0000"> 25.4 Total</span>
<span style="color: #ff0000"> 9.9 MSExchangeServicesAppPool</span>
<span style="color: #ff0000"> 4.9 MSExchangeSyncAppPool</span>
<span style="color: #ff0000"> 4.8 MSExchangeRpcProxyFrontEndAppPool</span>
<span style="color: #ff0000"> 1.8 MSExchangeRpcProxyAppPool</span>
<span style="color: #ff0000"> 1.2 MSExchangeAutodiscoverAppPool</span>
<span style="color: #ff0000"> 1.0 MSExchangeOWAAppPool</span>
<span style="color: #ff0000"> 0.9 MSExchangePowerShellAppPool</span>
<span style="color: #ff0000"> 0.3 MSExchangeMapiFrontEndAppPool</span>
<span style="color: #ff0000"> 0.2 MSExchangeOABAppPool</span>
<span style="color: #ff0000"> 0.2 MSExchangeMapiMailboxAppPool</span>
<span style="color: #ff0000"> 0.1 MSExchangePowerShellFrontEndAppPool</span>
<span style="color: #ff0000"> 0.1 MSExchangeECPAppPool</span>
<span style="color: #ff0000"> 0.0 MSExchangeOWACalendarAppPool</span>

<span style="color: #ff0000">Top 15 components with the highest ROPs rate:</span>
<span style="color: #ff0000">RPC Operations/sec: Component</span>
<span style="color: #ff0000">1,977.6 _total</span>
<span style="color: #ff0000">982.4 momt</span>
<span style="color: #ff0000">402.9 contentindexing</span>
<span style="color: #ff0000">333.0 airsync</span>
<span style="color: #ff0000">159.5 transport</span>
<span style="color: #ff0000"> 79.1 eventbasedassistants</span>
<span style="color: #ff0000"> 10.5 webservices</span>
<span style="color: #ff0000"> 4.6 timebasedassistants</span>
<span style="color: #ff0000"> 2.5 owa</span>
<span style="color: #ff0000"> 1.0 availabilityservice</span>
<span style="color: #ff0000"> 0.6 storeactivemonitoring</span>
<span style="color: #ff0000"> 0.6 monitoring</span>
<span style="color: #ff0000"> 0.4 pop</span>
<span style="color: #ff0000"> 0.2 simplemigration</span>
<span style="color: #ff0000"> 0.2 management</span>

<span style="color: #ff0000">Top 15 components with the highest RPC average latency:</span>
<span style="color: #ff0000">RPC Average Latency: Component</span>
<span style="color: #ff0000"> 11.7 transport</span>
<span style="color: #ff0000"> 10.3 airsync</span>
<span style="color: #ff0000"> 6.4 eventbasedassistants</span>
<span style="color: #ff0000"> 5.4 _total</span>
<span style="color: #ff0000"> 4.8 contentindexing</span>
<span style="color: #ff0000"> 4.2 momt</span>
<span style="color: #ff0000"> 3.4 webservices</span>
<span style="color: #ff0000"> 1.9 management</span>
<span style="color: #ff0000"> 1.8 pop</span>
<span style="color: #ff0000"> 1.6 owa</span>
<span style="color: #ff0000"> 1.3 availabilityservice</span>
<span style="color: #ff0000"> 1.2 monitoring</span>
<span style="color: #ff0000"> 1.2 timebasedassistants</span>
<span style="color: #ff0000"> 1.1 storeactivemonitoring</span>
<span style="color: #ff0000"> 0.6 simplemigration</span>
. Trigger Name:ExchangeProcessorTimeTrigger. Instance:_total&lt;/Error&gt;
 ...snip...
 &lt;/EventXML&gt;
 &lt;/UserData&gt;
&lt;/Event&gt;</pre>]]></content:encoded>
    </item>
    <item>
      <title>Script: Enable and collect ExTRA tracing across all Exchange servers</title>
      <link>https://docs.microsoft.com/archive/blogs/mahuynh/script-enable-and-collect-extra-tracing-across-all-exchange-servers</link>
      <pubDate>Fri, 05 Aug 2016 22:19:21 GMT</pubDate>
      <dc:creator><![CDATA[Matthew Huynh [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mahuynh/?p=205</guid>
      <description><![CDATA[Here is a PowerShell script that can be used to kick off an ExTRA trace on every Exchange server in...]]></description>
      <content:encoded><![CDATA[Here is a PowerShell script that can be used to kick off an ExTRA trace on every Exchange server in the org and collect the traces into a single location. I've highlighted in red the variables you'll likely want to edit prior to running the script.
<pre># Description:
#   Initiates an ExTRA trace on all the Exchange 2013 servers
#   in an environment and collects the results into a single location.
# Use:
#   In an Exchange Management Shell (EMS), run either of these commands:
#     .\extraTrace.ps1 -Start
#     .\extraTrace.ps1 -Stop
# Author:
#   mahuynh@microsoft.com
# Last modified:
#   2016-06-28

[CmdletBinding()]
Param(
 [switch]$Start,
 [switch]$Stop
)

# check that user ran with either Start or Stop switch params
if (($Start -and $Stop) -or (-not $Start -and -not $Stop)) {
 Write-Error "Please specify only 1 parameter: -Start or -Stop."
 exit
}

$traceConfigFilepath = "C:\EnabledTraces.Config"
$script:nl = "`r`n"
# network path to save the resulting traces (default is local c:\temp\extra)
<span style="color: #ff0000">$TRACES_FILEPATH = "\\" + (hostname) + "\c$\temp\extra"</span>

function CreateExtraTraceConfig
{
 new-item -path $traceConfigFilepath -type file -force
 $string = "TraceLevels:Debug,Warning,Error,Fatal,Info,Performance,Function,Pfd" + $nl
 <span style="color: #ff0000">$string += "MSExchangeWebServices:AllRequests,AllResponses,SubscribeCall,Subscriptions,UnsubscribeCall" + $nl</span>
 $string += "FilteredTracing:No" + $nl
 $string += "InMemoryTracing:No" + $nl
 $string | Out-File -filepath $traceConfigFilepath -Encoding ASCII -Append
}

# main script start

# get a list of all the Exchange servers
<span style="color: #ff0000">$servers = Get-ExchangeServer</span>

if ($Stop) {
 Get-Date
 Write-Host "Stopping ExTRA traces..." -ForegroundColor Cyan $nl

# create target path if it does not exist yet
 if (-not (Test-Path $TRACES_FILEPATH)) {
 mkdir $TRACES_FILEPATH | Out-Null
 Get-Date
 Write-Host "Created $TRACES_FILEPATH as it did not exist yet" -ForegroundColor Green $nl
 }

# stop and delete the trace configs, collect the results
 foreach ($serv in $servers) {
 Get-Date
 Write-Host "Disabling ExTRA tracing on" ($serv.Name) -ForegroundColor green $nl
 logman stop ExchangeDebugTraces -s $serv.Name
 logman delete ExchangeDebugTraces -s $serv.Name
 $fileToMovePath = "\\" + $serv.Name + "\c$\tracing\" + $serv.Name + "_*.etl"
 Move-Item $fileToMovePath $TRACES_FILEPATH -Force
 }

Get-Date
 Write-Host "Finished copying data to" $TRACES_FILEPATH -ForegroundColor Green $nl

} elseif ($Start) {
 Get-Date
 Write-Host "Starting ExTRA traces..." -ForegroundColor Cyan
 
 # create a local extra config file
 Get-Date
 Write-host "Creating local ExTRA trace..." -foregroundcolor Green $nl
 CreateExtraTraceConfig

# for each server
 foreach ($serv in $servers) {
 # copy the extra config file as long as it's not the local computer
 Get-Date
 Write-Host "Enabling ExTRA tracing on" ($serv.Name) -ForegroundColor green $nl
 if ((hostname).ToString().CompareTo($serv.Name) -ne 0) {
 Write-Debug "copying config file..."
 Copy-Item $traceConfigFilepath ("\\" + $serv.Name + "\c$\EnabledTraces.config") -Force
 }

# create a trace
 $outputFilepath = "c:\tracing\" + $serv.Name + ".etl"
 logman create trace ExchangeDebugTraces -p "Microsoft Exchange Server 2010" -o $outputFilepath -s $serv.Name -ow -f bincirc -max 1024

# start the trace
 logman start ExchangeDebugTraces -s $serv.Name
 }
}</pre>]]></content:encoded>
    </item>
    <item>
      <title>How to take an ExTRA trace of Exchange setup</title>
      <link>https://docs.microsoft.com/archive/blogs/mahuynh/how-to-take-an-extra-trace-of-exchange-setup</link>
      <pubDate>Fri, 05 Feb 2016 11:30:03 GMT</pubDate>
      <dc:creator><![CDATA[Matthew Huynh [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mahuynh/2016/02/05/how-to-take-an-extra-trace-of-exchange-setup/</guid>
      <description><![CDATA[This blog post is mainly for us Exchange support engineers but I like to surface things externally...]]></description>
      <content:encoded><![CDATA[<p>This blog post is mainly for us Exchange support engineers but I like to surface things externally because it&#39;s easier to search and link to. This blog post is heavily inspired by <a href="/b/mikelag/archive/2008/08/22/how-to-enable-store-pfd-tracing-upon-reboot.aspx">https://blogs.technet.com/b/mikelag/archive/2008/08/22/how-to-enable-store-pfd-tracing-upon-reboot.aspx</a>.</p>
<p>With&nbsp;Exchange 2007 and onwards, debug code tracing is logged to the ETW provider GUID 79BB49E6-2A2C-46E4-9167-FA122525D540. When you install Exchange, this ETW provider is registered formally and the GUI ExTRA application works. However, we can still manually do capture an ExTRA trace even if Exchange is not installed; the most common use would be setup issues.</p>
<ol>
<li>Launch an administrative command prompt.</li>
<li>Create the c:\tracing folder.</li>
<li>Create the trace:<ol>
<li><span style="font-family:courier new,courier;">logman create trace ExchangeDebugTraces -p {79bb49e6-2a2c-46e4-9167-fa122525d540} -nb 128 256 -bs 128 -o c:\tracing\ExchangeDebugTraces</span></li>
</ol></li>
<li>Create the trace configuration file at C:\EnabledTraces.Config and put in what you need. Its content will look something like this:<br /><ol>
<li><span style="font-family:courier new,courier;">TraceLevels:Debug,Warning,Error,Fatal,Info,Performance,Function,Pfd</span><br /><span style="font-family:courier new,courier;">ADProvider:Connection,ConnectionDetails,GetConnection,ADFind,DirectoryException</span><br /><span style="font-family:courier new,courier;">Setup:Trace</span><br /><span style="font-family:courier new,courier;">TopologyService:SuitabilityVerifier</span><br /><span style="font-family:courier new,courier;">FilteredTracing:No</span><br /><span style="font-family:courier new,courier;">InMemoryTracing:No</span></li>
</ol></li>
<li>Start the trace:<ol>
<li><span style="font-family:courier new,courier;">logman start ExchangeDebugTraces</span></li>
</ol></li>
<li>Reproduce the issue.</li>
<li>Stop the trace:<ol>
<li><span style="font-family:courier new,courier;">logman stop ExchangeDebugTraces</span></li>
</ol></li>
<li>Parse the trace ETLs&nbsp;with extrace.exe. Remember to use the proper version of Microsoft.Exchange.Diagnostics.dll for proper parsing.</li>
</ol>
<p>Cheers,</p>
<p>Matt</p>
<p style="padding:0;margin:0;"></p>]]></content:encoded>
    </item>
    <item>
      <title>EWS script to create an appointment in a set of mailboxes defined in a CSV file using an impersonation account</title>
      <link>https://docs.microsoft.com/archive/blogs/mahuynh/ews-script-to-create-an-appointment-in-a-set-of-mailboxes-defined-in-a-csv-file-using-an-impersonation-account</link>
      <pubDate>Thu, 03 Dec 2015 11:42:51 GMT</pubDate>
      <dc:creator><![CDATA[Matthew Huynh [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mahuynh/2015/12/03/ews-script-to-create-an-appointment-in-a-set-of-mailboxes-defined-in-a-csv-file-using-an-impersonation-account/</guid>
      <description><![CDATA[A customer recently wanted a script that would allow him to create an appointment with a reminder in...]]></description>
      <content:encoded><![CDATA[<p>A customer recently wanted a script that would allow him to create an appointment with a reminder in a set of mailboxes that he defined in a CSV file. I was happy to oblige and this is the result. My script is based off of <a href="https://mikepfeiffer.net/2011/01/creating-calendar-items-with-powershell-and-the-ews-managed-api/">https://mikepfeiffer.net/2011/01/creating-calendar-items-with-powershell-and-the-ews-managed-api/</a>. I wanted to post my script as it does do a couple of things differently:</p>
<ul>
<li>has reminder support</li>
<li>has free/busy status support</li>
<li>it&#39;s a script rather than a cmdlet</li>
<li>has logging so you know against which mailboxes the script worked</li>
<li>it&#39;s been validated against Office 365</li>
</ul>
<p>To run the script, you must:</p>
<ol>
<li>Allow execution of unsigned PowerShell scripts: <span style="font-family:courier new,courier;">Set-ExecutionPolicy unrestricted</span></li>
<li>Install the EWS Managed API 2.2 from <a href="https://www.microsoft.com/en-us/download/details.aspx?id=42951">https://www.microsoft.com/en-us/download/details.aspx?id=42951</a></li>
<li>Create an impersonation account using <a href="https://msdn.microsoft.com/en-us/library/office/dn722376%28v=exchg.150%29.aspx">https://msdn.microsoft.com/en-us/library/office/dn722376%28v=exchg.150%29.aspx</a></li>
<li>Create a CSV file where one of the columns has a header named <span style="font-family:courier new,courier;">EmailAddress</span></li>
</ol>
<p>Notes:</p>
<ul>
<li>There should be no throttling concerns as impersonated actions are counted against the target&nbsp;user&#39;s throttling policy rather than the impersonation account.</li>
<li>This script should work against any modern versions of Exchange.</li>
</ul>
<p style="padding:0;margin:0;"></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/telligent.evolution.components.attachments/01/9496/00/00/03/65/78/20/CreateAppointmentItem.ps1" original-url="https://blogs.technet.com/cfs-filesystemfile.ashx/__key/telligent-evolution-components-attachments/01-9496-00-00-03-65-78-20/CreateAppointmentItem.ps1">CreateAppointmentItem.ps1</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Restoring mail-enabled public folders after accidental deletion</title>
      <link>https://docs.microsoft.com/archive/blogs/mahuynh/restoring-mail-enabled-public-folders-after-accidental-deletion</link>
      <pubDate>Thu, 02 Jul 2015 14:02:00 GMT</pubDate>
      <dc:creator><![CDATA[Matthew Huynh [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mahuynh/2015/07/02/restoring-mail-enabled-public-folders-after-accidental-deletion/</guid>
      <description><![CDATA[Sometimes, your entire public folder tree gets accidentally deleted. Luckily for you, this has...]]></description>
      <content:encoded><![CDATA[<p>Sometimes, your entire public folder tree gets accidentally deleted. Luckily for you, this has happened to enough of our customers that the steps to do an authoritative restore of Public Folders is outlined in <a href="/b/exchange/archive/2012/02/06/recovering-public-folders-after-accidental-deletion-part-1-recovery-process.aspx">https://blogs.technet.com/b/exchange/archive/2012/02/06/recovering-public-folders-after-accidental-deletion-part-1-recovery-process.aspx</a>. Sometimes, after doing an auth restore of your PF, some or all of your mail-enabled PF aren&#39;t mail-enabled anymore. You&#39;re forced to mail disable and then mail enable each previously mail-enabled PF. Not only this, but you need to set up the email addresses, mail forwarding, and all the other settings for each MPF again. Why is that? Let&#39;s take a quick dive into how mail-enabled public folders work.</p>
<p>When you mail enable a PF, an Active Directory (AD) object of objectClass <strong>publicFolder</strong> is created inside the <strong>Microsoft Exchange System Objects (MESO) container</strong>.</p>
<p><span style="font-family:courier new,courier;">[PS] C:\&gt;Get-MailPublicFolder | fl legacy*,emailAddresses,externalEmailAddress,organizationalUnit,*forward*</span></p>
<p><span style="font-family:courier new,courier;">LegacyExchangeDN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : /O=PULSARWINDS/OU=EXCHANGE ADMINISTRATIVE GROUP (FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=F8B6366B5B039A4590816BCB85ED7832-00000000000E</span><br /><span style="font-family:courier new,courier;">EmailAddresses&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : {smtp:<span style="background-color:#ff9900;">myLittlePF@pulsarwinds.com</span>, smtp:mahuynh1@PulsarWinds.mail.onmicrosoft.com, SMTP:mahuynh1@pulsarwinds.com}</span><br /><span style="font-family:courier new,courier;">ExternalEmailAddress&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : expf:F8B6366B5B039A4590816BCB85ED7832-00000000000E</span><br /><span style="font-family:courier new,courier;">OrganizationalUnit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : pulsarwinds.com/Microsoft Exchange System Objects</span><br /><span style="font-family:courier new,courier;">DeliverToMailboxAndForward : <span style="background-color:#ff9900;">True</span></span><br /><span style="font-family:courier new,courier;">ForwardingAddress&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : <span style="background-color:#ff9900;">pulsarwinds.com/Users/Administrator</span></span></p>
<p>When you mail disable a PF, its corresponding AD object in the MESO container gets deleted and thus all settings are lost. When you mail re-enable a PF, various fields like LegacyExchangeDN and ExternalEmailAddress calculate to the same values but other fields like email addresses and mail forwarding (highlighted above) are not preserved. For example:</p>
<p><span style="font-family:courier new,courier;">[PS] C:\&gt;Get-PublicFolder \mahuynh | Disable-MailPublicFolder -Confirm:$false</span><br /><span style="font-family:courier new,courier;">[PS] C:\&gt;Get-PublicFolder \mahuynh | Enable-MailPublicFolder</span><br /><span style="font-family:courier new,courier;">[PS] C:\&gt;Get-MailPublicFolder | fl legacy*,emailAddresses,externalEmailAddress,organizationalUnit,*forward*</span></p>
<p><span style="font-family:courier new,courier;">LegacyExchangeDN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : /O=PULSARWINDS/OU=EXCHANGE ADMINISTRATIVE GROUP (FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=F8B6366B5B039A4590816BCB85ED7832-00000000000E</span><br /><span style="font-family:courier new,courier;">EmailAddresses&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : {smtp:mahuynh1@PulsarWinds.mail.onmicrosoft.com, SMTP:mahuynh1@pulsarwinds.com}</span><br /><span style="font-family:courier new,courier;">ExternalEmailAddress&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : expf:F8B6366B5B039A4590816BCB85ED7832-00000000000E</span><br /><span style="font-family:courier new,courier;">OrganizationalUnit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : pulsarwinds.com/Microsoft Exchange System Objects</span><br /><span style="font-family:courier new,courier;">DeliverToMailboxAndForward : False</span><br /><span style="font-family:courier new,courier;">ForwardingAddress&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :</span></p>
<p>The easiest resolution here is to <strong>restore</strong> the deleted publicFolder AD objects. If your forest functional level is below 2008 R2, you&#39;ll have to do an auth restore of the MESO container to a backup taken before the PF tree deletion. Otherwise, you can use the AD recycle bin, which I will show you now.</p>
<p>First, ensure <strong>Active Directory module for Windows PowerShell</strong> is installed on your domain-joined computer. Launch a PowerShell window, load the AD module, and find your deleted PF objects.</p>
<p><span style="font-family:courier new,courier;">Import-Module ActiveDirectory</span><br /><span style="font-family:courier new,courier;">cd AD:</span><br /><span style="font-family:courier new,courier;">$deletedMPF = Get-ADObject &ndash;SearchBase &quot;CN=Deleted Objects,DC=pulsarwinds,DC=com&quot; -Filter {lastKnownParent -eq &#39;CN=Microsoft Exchange System Objects,DC=pulsarwinds,DC=com&#39; -and objectClass -eq &#39;publicFolder&#39;} -IncludeDeletedObjects -Properties *</span></p>
<p>You can drill into the objects to selectively pick out which ones you want to restore. Let&#39;s say I wanted to identify only objects deleted since midnight and restore them.</p>
<p><span style="font-family:courier new,courier;">PS AD:\&gt; $recentlyDeletedMPF = $deletedMPF | ? {$_.whenChanged -gt &quot;7/2/2015&quot;}</span><br /><span style="font-family:courier new,courier;">PS AD:\&gt; $recentlyDeletedMPF | sort whenChanged -desc | ft mail,whenChanged -auto</span></p>
<p><span style="font-family:courier new,courier;">mail&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; whenChanged</span><br /><span style="font-family:courier new,courier;">----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -----------</span><br /><span style="font-family:courier new,courier;">mahuynh1@pulsarwinds.com 7/2/2015 4:26:11 PM</span></p>
<p><span style="font-family:courier new,courier;">PS AD:\&gt; $recentlyDeletedMPF | Restore-ADObject</span></p>
<p>Pretty easy and nifty, eh? Now go find out who deleted your PF tree and discipline them!</p>]]></content:encoded>
    </item>
    <item>
      <title>Mailbox and mail sending permissions</title>
      <link>https://docs.microsoft.com/archive/blogs/mahuynh/mailbox-and-mail-sending-permissions</link>
      <pubDate>Tue, 30 Dec 2014 11:59:00 GMT</pubDate>
      <dc:creator><![CDATA[Matthew Huynh [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mahuynh/2014/12/30/mailbox-and-mail-sending-permissions/</guid>
      <description><![CDATA[I recently had a case where we encountered an "issue" where users granted full mailbox access and...]]></description>
      <content:encoded><![CDATA[I recently had a case where we encountered an "issue" where users granted full mailbox access and send-on-behalf-of to a shared mailbox were able to use OWA to <strong>send as </strong>the shared mailbox.

First, let's take a step back and review permissions. I've summarized it in a table here:
<table style="width: 920px;height: 240px" border="1">
<tbody>
<tr>
<td><strong>Type</strong></td>
<td><strong>Permission</strong></td>
<td><strong>Description</strong></td>
<td><strong>How to Grant</strong></td>
</tr>
<tr>
<td>Mailbox</td>
<td>Folder-level permissions</td>
<td>allows a user to access particular folders (e.g. Inbox, Calendar, Tasks, etc.) inside a mailbox</td>
<td>Add-MailboxFolderPermission -Identity manager:\Inbox -User delegate -AccessRights Author</td>
</tr>
<tr>
<td>Mailbox</td>
<td>Full mailbox access</td>
<td>allows a user to do a secondary logon and browse the contents of a mailbox (read messages, edit the calendar, add new items, etc.)</td>
<td>Add-MailboxPermission -Identity manager -User delegate -AccessRights FullAccess</td>
</tr>
<tr>
<td>Mail sending</td>
<td>Send as</td>
<td>allows a user to spoof a manager</td>
<td>Add-ADPermission -Identity manager -User delegate -AccessRights ExtendedRight -ExtendedRights "Send As"</td>
</tr>
<tr>
<td>Mail sending</td>
<td>Send on behalf of</td>
<td>allows a user to send an email on behalf of a manager</td>
<td>Set-Mailbox -Identity manager -GrantSendOnBehalfTo delegate</td>
</tr>
</tbody>
</table>
If a manager grants a user full mailbox access, they'll be able to log onto the mailbox (OWA -&gt; Open mailbox, Outlook -&gt; Open these additional mailboxes). If a manager grants a user delegate access (using Outlook), they'll have to use Outlook's File -&gt; Open functionality and choose a particular folder. If it is a special/default folder like the Calendar, the delegate will be able to use OWA's calendar view to view/edit the manager's calendar. In both these cases, the delegates won't be able to send as or send on behalf of the manager because mailbox and mail sending permissions are of two different types.

Also something else to note: there are many ways to grant these permissions and I've only put down the Exchange PowerShell version. You can use Outlook, Exchange Management Console, Exchange Admin Center, and a host of other GUI tools to achieve the right permissions as long as they modify the appropriate data structures.

<span style="text-decoration: line-through">As it turns out, the "issue" I described earlier is a by-design behavior of Exchange and is documented here: <a href="/b/ehlro/archive/2012/04/06/full-mailbox-access-rights-send-on-behalf-send-as.aspx">https://blogs.technet.com/b/ehlro/archive/2012/04/06/full-mailbox-access-rights-send-on-behalf-send-as.aspx</a>. Basically, <strong>full mailbox access + send-on-behalf-of rights = send as permissions</strong>. Even if you add an explicit deny for the send as right, delegates will still be able to send as the manager or shared mailbox. Usually, this issue surfaces with delegates because organizations grant delegates access to their manager's mailbox using 2 sets of permissions:</span>
<ul>
 	<li><span style="text-decoration: line-through">The manager uses Outlook to grant a delegate access to their mailbox so the delegate receives copies of meeting requests and other delegate-y features. What's happening under the covers is that Outlook is performing a variety of configuration changes, including granting folder-level permissions and <strong>send-on-behalf-of rights</strong>.</span></li>
 	<li><span style="text-decoration: line-through">The Exchange administrator then grants the delegate <strong>full mailbox access</strong> to the manager's mailbox so the mailbox is automapped into the Outlook profile (what's really happening is that Autodiscover is returning an additional mailbox for Outlook to open).</span></li>
</ul>
I hope this adds some clarity to the different types of permissions used in Exchange and Outlook as I know it is a frequent source of confusion, even for me.

Edit on 7/27/2015: As of Exchange 2010 SP3 RU8, the Exchange Product Group acknowledged that a delegate that has full mailbox access should not be able to send-as the manager but only on-behalf-of. The previous behavior is a bug (<a href="https://support.microsoft.com/en-us/kb/2987104">https://support.microsoft.com/en-us/kb/2987104</a>) and is fixed in 2010 SP3 RU8 and future versions.

Edit on 3/23/2017: TechNet has a good page summarizing these permissions as well: <a href="https://technet.microsoft.com/en-us/library/jj919240(v=exchg.160).aspx">Manage permissions for recipients [Exchange 2016]</a>

Cheers,

Matt]]></content:encoded>
    </item>
    <item>
      <title>Exchange 2013 domainprep (prepareAD) fails with Microsoft.Exchange.Data.Directory.AdminLimitExceededException [ERROR_DS_ADMIN_LIMIT_EXCEEDED]</title>
      <link>https://docs.microsoft.com/archive/blogs/mahuynh/exchange-2013-domainprep-preparead-fails-with-microsoft-exchange-data-directory-adminlimitexceededexception-error_ds_admin_limit_exceeded</link>
      <pubDate>Wed, 29 Oct 2014 15:03:00 GMT</pubDate>
      <dc:creator><![CDATA[Matthew Huynh [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mahuynh/2014/10/29/exchange-2013-domainprep-preparead-fails-with-microsoft-exchange-data-directory-adminlimitexceededexception-error_ds_admin_limit_exceeded/</guid>
      <description><![CDATA[We&#39;ve seen 2 cases in support with this issue that affected hosting companies. I anticipate...]]></description>
      <content:encoded><![CDATA[<p>We&#39;ve seen 2 cases in support with this issue that affected hosting companies. I anticipate we&#39;ll see more instances of this issue as more customers migrate to Exchange 2013, especially hosting companies, so I&#39;ve decided to blog it out.</p>
<p>As with any installation issue, you start off by inspecting C:\ExchangeSetupLogs\ExchangeSetup.log. In there, you&#39;ll find that we were in the midst of creating Microsoft Exchange Security Groups (setup is inside the function initialize-ExchangeUniversalGroups) and then this error happens:</p>
<p>[10/15/2014 19:49:01.0934] [2] [ERROR] The administrative limit for this request was exceeded.<br />[10/15/2014 19:49:01.0934] [2] [ERROR] The administration limit on the server was exceeded.<br />[10/15/2014 19:49:01.0965] [2] Ending processing initialize-ExchangeUniversalGroups<br />[10/15/2014 19:49:02.0059] [1] The following 1 error(s) occurred during task execution:<br />[10/15/2014 19:49:02.0106] [1] 0.&nbsp; ErrorRecord: The administrative limit for this request was exceeded.<br />[10/15/2014 19:49:02.0106] [1] 0.&nbsp; ErrorRecord: Microsoft.Exchange.Data.Directory.AdminLimitExceededException: The administrative limit for this request was exceeded. ---&gt; System.DirectoryServices.Protocols.DirectoryOperationException: The administration limit on the server was exceeded.<br />&nbsp;&nbsp; at System.DirectoryServices.Protocols.LdapConnection.ConstructResponse(Int32 messageId, LdapOperation operation, ResultAll resultType, TimeSpan requestTimeOut, Boolean exceptionOnTimeOut)<br />&nbsp;&nbsp; at System.DirectoryServices.Protocols.LdapConnection.SendRequest(DirectoryRequest request, TimeSpan requestTimeout)<br />&nbsp;&nbsp; at Microsoft.Exchange.Data.Directory.PooledLdapConnection.SendRequest(DirectoryRequest request, LdapOperation ldapOperation, Nullable`1 clientSideSearchTimeout, IActivityScope activityScope, String callerInfo)<br />&nbsp;&nbsp; at Microsoft.Exchange.Data.Directory.ADDataSession.ExecuteModificationRequest(ADObject entry, DirectoryRequest request, ADObjectId originalId, Boolean emptyObjectSessionOnException, Boolean isSync)<br />&nbsp;&nbsp; --- End of inner exception stack trace ---<br />&nbsp;&nbsp; at Microsoft.Exchange.Data.Directory.ADDataSession.AnalyzeDirectoryError(PooledLdapConnection connection, DirectoryRequest request, DirectoryException de, Int32 totalRetries, Int32 retriesOnServer)<br />&nbsp;&nbsp; at Microsoft.Exchange.Data.Directory.ADDataSession.ExecuteModificationRequest(ADObject entry, DirectoryRequest request, ADObjectId originalId, Boolean emptyObjectSessionOnException, Boolean isSync)<br />&nbsp;&nbsp; at Microsoft.Exchange.Data.Directory.ADDataSession.ExecuteModificationRequest(ADObject entry, DirectoryRequest request, ADObjectId originalId, Boolean emptyObjectSessionOnException)<br />&nbsp;&nbsp; at Microsoft.Exchange.Data.Directory.ADDataSession.Save(ADObject instanceToSave, IEnumerable`1 properties, Boolean bypassValidation)<br />&nbsp;&nbsp; at Microsoft.Exchange.Management.Tasks.InitializeExchangeUniversalGroups.CreateWKGuid(ADContainer container, ADObjectId dn, Guid wkGuid)<br />&nbsp;&nbsp; at Microsoft.Exchange.Management.Tasks.InitializeExchangeUniversalGroups.CreateGroup(ADOrganizationalUnit usgContainer, String groupName, Int32 groupId, Guid wkGuid, String groupDescription, GroupTypeFlags groupType, Boolean createAsRoleGroup)<br />&nbsp;&nbsp; at Microsoft.Exchange.Management.Tasks.InitializeExchangeUniversalGroups.CreateGroup(ADOrganizationalUnit usgContainer, String groupName, Int32 groupId, Guid wkGuid, String groupDescription)<br />&nbsp;&nbsp; at Microsoft.Exchange.Management.Tasks.InitializeExchangeUniversalGroups.InternalProcessRecord()<br />&nbsp;&nbsp; at Microsoft.Exchange.Configuration.Tasks.Task.&lt;ProcessRecord&gt;b__b()<br />&nbsp;&nbsp; at Microsoft.Exchange.Configuration.Tasks.Task.InvokeRetryableFunc(String funcName, Action func, Boolean terminatePipelineIfFailed)</p>
<p>What does this error mean? If you do some digging, you&#39;ll eventually find out that every attribute in Active Directory needs to fit into a 8KB ESE page. 8KB fits about 1200-1300 values in a&nbsp;nonlinked multivalued attribute.&nbsp;The question then becomes what attribute is causing our problem? We take an LDAP trace&nbsp;with the help of&nbsp;<a href="https://support.microsoft.com/kb/2221529">https://support.microsoft.com/kb/2221529</a> to determine&nbsp;the LDAP query causing the error and we see the following:</p>
<p>[0]11D4.13D0::10/22/2014-12:33:06.489 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; ldap_modify called for connection 0x234e0898: DN is CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=test,DC=lab. Synchronous is 0x0.<br /> &lt;redacted for brevity&gt;<br />[0]11D4.13D0::10/22/2014-12:33:06.489 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; Unencrypted dump of Data sent on connection 0x234e0898<br />[0]11D4.13D0::10/22/2014-12:33:06.489 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; 30 84 00 00 00 fb 02 02 10 3f 66 84 00 00 00 f1&nbsp; 0........?f.....<br />[0]11D4.13D0::10/22/2014-12:33:06.489 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; 04 41 43 4e 3d 4d 69 63 72 6f 73 6f 66 74 20 45&nbsp; .ACN=Microsoft.E<br />[0]11D4.13D0::10/22/2014-12:33:06.489 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; 78 63 68 61 6e 67 65 2c 43 4e 3d 53 65 72 76 69&nbsp; xchange,CN=Servi<br />[0]11D4.13D0::10/22/2014-12:33:06.489 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; 63 65 73 2c 43 4e 3d 43 6f 6e 66 69 67 75 72 61&nbsp; ces,CN=Configura<br />[0]11D4.13D0::10/22/2014-12:33:06.489 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; 74 69 6f 6e 2c 44 43 3d 73 68 31 31 2c 44 43 3d&nbsp; tion,DC=test,DC=<br />[0]11D4.13D0::10/22/2014-12:33:06.489 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; 6c 61 62 30 84 00 00 00 a8 30 84 00 00 00 a2 0a&nbsp; lab0.....0......<br />[0]11D4.13D0::10/22/2014-12:33:06.489 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; 01 00 30 84 00 00 00 99 04 15 6f 74 68 65 72 57&nbsp; ..0.......otherW<br />[0]11D4.13D0::10/22/2014-12:33:06.489 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; 65 6c 6c 4b 6e 6f 77 6e 4f 62 6a 65 63 74 73 31&nbsp; ellKnownObjects1<br />[0]11D4.13D0::10/22/2014-12:33:06.489 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; 84 00 00 00 7c 04 7a 42 3a 33 32 3a 30 32 35 32&nbsp; ....|.zB:32:0252<br />[0]11D4.13D0::10/22/2014-12:33:06.489 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; 32 45 43 46 39 39 38 35 39 38 34 41 39 32 33 32&nbsp; 2ECF9985984A9232<br />[0]11D4.13D0::10/22/2014-12:33:06.489 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; 30 35 36 46 43 37 30 34 43 43 38 42 3a 43 4e 3d&nbsp; 056FC704CC8B:CN=<br />[0]11D4.13D0::10/22/2014-12:33:06.489 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; 4d 61 6e 61 67 65 64 20 41 76 61 69 6c 61 62 69&nbsp; Managed.Availabi<br />[0]11D4.13D0::10/22/2014-12:33:06.489 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; 6c 69 74 79 20 53 65 72 76 65 72 73 2c 4f 55 3d&nbsp; lity.Servers,OU=<br />[0]11D4.13D0::10/22/2014-12:33:06.489 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; 4d 69 63 72 6f 73 6f 66 74 20 45 78 63 68 61 6e&nbsp; Microsoft.Exchan<br />[0]11D4.13D0::10/22/2014-12:33:06.489 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; 67 65 20 53 65 63 75 72 69 74 79 20 47 72 6f 75&nbsp; ge.Security.Grou<br />[0]11D4.13D0::10/22/2014-12:33:06.489 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; 70 73 2c 44 43 3d 73 68 31 31 2c 44 43 3d 6c 61&nbsp; ps,DC=test,DC=la<br />[0]11D4.13D0::10/22/2014-12:33:06.489 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; 62&nbsp; b<br />[0]11D4.13D0::10/22/2014-12:33:06.489 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; End of Unencrypted dump of send buffer.<br />&lt;redacted for brevity&gt;<br />[0]11D4.13D0::10/22/2014-12:33:06.490 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; Unencrypted dump of Data received on connection 0x234e0898<br />[0]11D4.13D0::10/22/2014-12:33:06.490 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; 30 84 00 00 00 63 02 02 10 3f 67 84 00 00 00 59&nbsp; 0....c...?g....Y<br />[0]11D4.13D0::10/22/2014-12:33:06.490 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; 0a 01 0b 04 00 04 52 30 30 30 30 32 30 32 34 3a&nbsp; ......R00002024:<br />[0]11D4.13D0::10/22/2014-12:33:06.490 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; 20 53 76 63 45 72 72 3a 20 44 53 49 44 2d 30 32&nbsp; .SvcErr:.DSID-02<br />[0]11D4.13D0::10/22/2014-12:33:06.490 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; 30 35 30 35 35 45 2c 20 70 72 6f 62 6c 65 6d 20&nbsp; 05055E,.problem.<br />[0]11D4.13D0::10/22/2014-12:33:06.490 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; 35 30 30 38 20 28 41 44 4d 49 4e 5f 4c 49 4d 49&nbsp; 5008.(ADMIN_LIMI<br />[0]11D4.13D0::10/22/2014-12:33:06.490 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; 54 5f 45 58 43 45 45 44 45 44 29 2c 20 64 61 74&nbsp; T_EXCEEDED),.dat<br />[0]11D4.13D0::10/22/2014-12:33:06.490 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; 61 20 2d 31 30 32 36 0a 00&nbsp; a.-1026..<br />[0]11D4.13D0::10/22/2014-12:33:06.490 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; End of Unencrypted dump of receive buffer.<br />[0]11D4.13D0::10/22/2014-12:33:06.490 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; CheckForWaiter setting MsgNo 0x103f, wait 0x234192a8<br />[0]11D4.13D0::10/22/2014-12:33:06.490 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; LdapGetResponseFromServer : searching for messages for msgid 0x103f<br />[0]11D4.13D0::10/22/2014-12:33:06.490 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; LdapGetResponseFromServer Message 0x103f marked received for connection 0x234e0bc8<br />[0]11D4.13D0::10/22/2014-12:33:06.490 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; ldap_result found results at 0x233f41b8 for request 0x233eaca8 msgid 0x103f<br />[0]11D4.13D0::10/22/2014-12:33:06.490 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; HrPeekTag ran out of data, length 0x69, offset 0x69.<br />[0]11D4.13D0::10/22/2014-12:33:06.490 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; ldap_result returned 0x67 for connection 0x234e0898.<br />[0]11D4.13D0::10/22/2014-12:33:06.490 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; HrPeekTag ran out of data, length 0x69, offset 0x69.<br />[0]11D4.13D0::10/22/2014-12:33:06.490 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; HrPeekTag ran out of data, length 0x69, offset 0x69.<br />[2]11D4.13D0::10/22/2014-12:33:06.499 [Microsoft-Windows-LDAP-Client/Debug]&nbsp; ldap_delete called for connection 0x233ddb58: DN is CN=Managed Availability Servers,OU=Microsoft Exchange Security Groups,DC=test,DC=lab. Synchronous is 0x0.</p>
<p>Basically,&nbsp;setup was trying to modify <strong>otherWellKnownObjects</strong> on <strong>CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=test,DC=lab</strong> and got <strong>DSID-0205055E, problem 5008 (ADMIN_LIMIT_EXCEEDED)</strong> as a response. We consult an AD engineer and he tells us that when an attribute is &quot;full,&quot; you won&#39;t be able to modify the object at all. We immediately check otherWellKnownObjects and see it only has 17 values; that can&#39;t be our issue. We leverage the script from <a href="https://www.open-a-socket.com/index.php/2014/09/19/multivalued-attribute-limits-in-active-directory/">https://www.open-a-socket.com/index.php/2014/09/19/multivalued-attribute-limits-in-active-directory/</a> and realize that several attributes, including globalAddressList and globalAddressList2 have over 1200 values.</p>
<p>Now for a brief history lesson. Exchange hosters create a lot of Global Address Lists - usually 1 for each tenant it hosts. globalAddressList is a nonlinked multivalued attribute that enumerates all the GALs in an Exchange organization. Exchange 2007 hit this 8KB limit and thus a tool named <a title="makeGalLinked.exe" href="https://technet.microsoft.com/en-us/library/cc526566.aspx">makeGalLinked.exe</a> was made that converted the attribute from nonlinked to linked. <em>For an explanation as to why linked attributes aren&#39;t subject to the 8KB limit, look under the <strong>Replication of Linked and Nonlinked Attributes</strong> in this TechNet article </em><a title="How the Active Directory Replication Model Works" href="https://technet.microsoft.com/en-us/library/cc772726(v=WS.10).aspx"><em>How the Active Directory Replication Model Works</em></a><em>.</em> Starting with Exchange 2010, our schema created a new value named globalAddressList2 which is a linked multivalued attribute and thus is not subject to the 8KB limit.&nbsp;In Exchange 2010 onwards, any new GAL will be stored into both attributes for legacy interop but once the limit is exceeded, a warning will appear informing administrators that any user who isn&#39;t on Exchange 2010 might have issues accessing their GAL (because the pointer to the GAL might not exist).</p>
<p>With that history in mind, think about why Exchange 2013 is failing. globalAddressList is hitting the limit because it is a full nonlinked attribute and thus causes AD to throw the error ADMIN_LIMIT_EXCEEDED. <strong>The resolution in both support cases was to remove some values from the globalAddressList and try /prepareAD again.</strong> There should be no data loss because globalAddressList2 is a superset of globalAddressList (it contains all the data plus more). All Exchange 2010 and future code should use globalAddressList2 and thus globalAddressList is a legacy attribute that eventually will be deprecated if it hasn&#39;t already been.</p>
<p>Cheers,</p>
<p>Matt</p>]]></content:encoded>
    </item>
    <item>
      <title>ROP Breakdown by User</title>
      <link>https://docs.microsoft.com/archive/blogs/mahuynh/rop-breakdown-by-user</link>
      <pubDate>Thu, 25 Sep 2014 11:09:00 GMT</pubDate>
      <dc:creator><![CDATA[Matthew Huynh [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mahuynh/2014/09/25/rop-breakdown-by-user/</guid>
      <description><![CDATA[Hey all,
I&#39;m back with some more info to empower your Exchange administration! Once you&#39;ve...]]></description>
      <content:encoded><![CDATA[<p>Hey all,</p>
<p>I&#39;m back with some more info to empower your Exchange administration! Once you&#39;ve <a title="enabled ROP logging on your servers" href="/b/mahuynh/archive/2014/09/22/enable-rop-logging-in-exchange-2010-and-2013.aspx">enabled ROP logging on your servers</a>, there&#39;s a lot of things you can do with the data because the operation-specific field is now populated. Let&#39;s say a particular user is pushing a lot of requests against the server and you want to know what s/he is doing. One way to determine their intent is by analyzing what ROPs they are sending against the server. For example, if someone is sending a lot of FastTransferSourceGetBuffer ROPs, they are attempting to pull data (download) from the server. If they are constantly sending a lot of FastTransferSourcePutBuffer, they are attempting to push data (upload) to the server. You can read more about Fast Transfer in the <a title="official specifications documentation" href="https://msdn.microsoft.com/en-us/library/cc463916(v=exchg.80).aspx">official specifications documentation</a> or watch <a title="Joe Warren's presentation" href="https://channel9.msdn.com/posts/Exchange-Fast-Transfer">Joe Warren&#39;s presentation</a> on it.</p>
<p>Since multiple ROPs can be packaged into a single request, we need to extract the ROPs out so we can do analysis on them. I&#39;ve written a PowerShell script which I&#39;ll attach to this blog post that takes a directory path and parses every .log file inside it, producing a corresponding &quot;expanded&quot; .csv file that has 2 columns: client-name and ROP.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/96/directory.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-96/directory.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/96/directory.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-96/directory.PNG" border="0" /></a></p>
<p>Running the script is easy. You invoke it&nbsp;in an administrative PowerShell window with a command like: .\RopBreakdownByUser.ps1 &quot;d:\myRcaLogs&quot;</p>
<p>Once the CSV files are produced, you can use <a title="Log Parser Studio" href="/b/karywa/archive/2013/04/21/getting-started-with-log-parser-studio.aspx">Log Parser Studio</a> or Excel to analyze the data. Let&#39;s say I choose to use LPS to get the top ROPs by user. I launch LPS, set my log directory to be the csv files the PS script produced earlier, set my Log Type to CSVLOG, input my query, and execute. Here&#39;s what I end up with:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/96/lps.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-96/lps.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/96/lps.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-96/lps.PNG" border="0" /></a></p>
<p>Now again, ROPs are usually the building blocks to bigger operations and it is not immediately obvious what this user is doing. Experience and knowledge is the only way around this ambiguity. Here, we can at least infer the top user is doing a lot of downloading against the server. Perhaps his/her Outlook is simply doing an initial sync of their profile and thus this high activity is normal. Sometimes when a user is truly an outlier (ROP count is at least 3x the next user), their Outlook is probably misbehaving and trying to sync a corrupted item. Hands-on investigation is required and a trip to the user&#39;s desktop will usually reveal the issue&nbsp;like an item stuck in Outbox constantly attempting to sync or&nbsp;a single recurring meeting with hundreds of exceptions, etc.</p>
<p>Hope this helps,</p>
<p>Matt</p>
<p></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/telligent.evolution.components.attachments/01/9496/00/00/03/63/82/79/RopBreakdownByUser.ps1" original-url="https://blogs.technet.com/cfs-filesystemfile.ashx/__key/telligent-evolution-components-attachments/01-9496-00-00-03-63-82-79/RopBreakdownByUser.ps1">RopBreakdownByUser.ps1</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Enable ROP logging in Exchange 2010 and 2013</title>
      <link>https://docs.microsoft.com/archive/blogs/mahuynh/enable-rop-logging-in-exchange-2010-and-2013</link>
      <pubDate>Mon, 22 Sep 2014 08:31:00 GMT</pubDate>
      <dc:creator><![CDATA[Matthew Huynh [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mahuynh/2014/09/22/enable-rop-logging-in-exchange-2010-and-2013/</guid>
      <description><![CDATA[This is just a short post because it seems like there&#39;s not yet one on how to do it....]]></description>
      <content:encoded><![CDATA[<p>This is just a short post because it seems like there&#39;s not yet one on how to do it. <a href="https://www.expta.com/2012/07/how-to-enable-logging-for-rpc-client.html">https://www.expta.com/2012/07/how-to-enable-logging-for-rpc-client.html</a> shows us how to enable throttling logging - and enabling ROP logging follows the same procedure.&nbsp;It is an additional logging tag that must be enabled inside the <strong>Microsoft.Exchange.RpcClientAccess.Service.exe.config</strong> file. Usually when I enable ROP logging, I enable throttling logging as well thus my config file would have this <strong>LoggingTag</strong> key:</p>
<p><span style="font-family:courier new,courier;">&lt;add key=&quot;LoggingTag&quot; value=&quot;ConnectDisconnect, Logon, Failures, ApplicationData, Warnings, Throttling, Rops&quot; /&gt;</span></p>
<p>Now when I open a log file, I&#39;d see lines like this [I split this request using a comma delimiter so it&#39;s more legible]:</p>
<p><span style="font-family:courier new,courier;">date-time,session-id,seq-number,client-name,organization-info,client-software,client-software-version,client-mode,client-ip,client-connection-info,server-ip,protocol,application-id,request-ids,session-cookie,operation,rpc-status,processing-time,operation-specific,failures,performance-data,activity-context-data,user-email</span></p>
<p><span style="font-family:courier new,courier;">2014-09-18T15:32:28.583Z<br />83723<br />690<br />/o=Pulsarwinds/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=MAHUYNH<br /><strong>OUTLOOK.EXE</strong><br /><strong>14.0.7108.5000</strong><br /><strong>Cached</strong><br /><strong>ncacn_http</strong><br />Client=MSExchangeRPC<br />0<br />00:00:00.0150000<br />&quot;<strong>&gt;SetProperties; &gt;SetProperties; &gt;SaveChangesMessage; &gt;GetPropertiesSpecific;</strong> &lt;SetProperties; &lt;SetProperties; &lt;SaveChangesMessage; &lt;GetPropertiesSpecific; BS=Owner:Sid~Pulsarwinds\MAHUYNH~Rca~false<br /><strong>Conn:7</strong><br /><strong>MaxConn:40</strong><br />MaxBurst:150000<br /><strong>Balance:149980.5</strong><br /><strong>Cutoff:Unlimited</strong><br />RechargeRate:900000<br />Policy:GlobalThrottlingPolicy_09d51525-29c1-44b3-babc-4daaa4add881<br />IsServiceAccount:False<br />LiveTime:04:44:32.0860602&quot;<br />mahuynh@pulsarwinds.com</span></p>
<p>Remote operation (ROP) logging allows you to see the ROPs that are sent from clients to the server and back. When you see a ROP that is prepended with &#39;&gt;&#39;, then it is being sent from the client. When you see a ROP that is prepended with &#39;&lt;&#39;, then it is being sent from the server. We can see that&nbsp;4 ROPs were packed into this single request here.</p>
<p>RCA logs have a wealth of information. The client is connecting via Outlook 2010 cached mode&nbsp;using&nbsp;RPC over HTTP (Outlook Anywhere).&nbsp;We can also tell that he has&nbsp;7 connections out of a maximum 40 used. His budget/balance is 149980.5ms so he&#39;s used up 19.5ms of server time globally across his connections. If the balance goes negative, the user will start encountering microdelays. Since there&#39;s no cutoff (it&#39;s unlimited), the user will never be denied/rejected outright via the RPC protocol.</p>
<p>Using the operation-specific field, you can extract the ROPs out and identify what a&nbsp;user&#39;s top ROPs are. My next blog post will have a script that does that and some info on how to generate basic stats on the extracted data.</p>
<p>Edit: Here&#39;s the promised script: <a title="https://blogs.technet.com/b/mahuynh/archive/2014/09/25/rop-breakdown-by-user.aspx" href="/b/mahuynh/archive/2014/09/25/rop-breakdown-by-user.aspx">https://blogs.technet.com/b/mahuynh/archive/2014/09/25/rop-breakdown-by-user.aspx</a></p>]]></content:encoded>
    </item>
  </channel>
</rss>