Who last modified a mailbox Exchange 2010 (PowerShell)
<p>I'm looking to retrieve a list of ALL user mailboxes and show who last modified the mailbox in question - at the moment I've got my basic components in the form of:</p>

<pre><code>$mailbox | % {Search-AdminAuditLog | Where-Object {ObjectModified -eq $_.identity} | Select-Object -First 1 -Property CmdLetName,Caller,RunDate | Out-file "C:\tmp\$_.mailbox"}
</code></pre>

<p>where $mailbox contains a list of mailboxes I want to process:</p>

<pre><code>$mailbox = GET-MAILBOXSERVER | Get-Mailbox -ResultSize Unlimited
</code></pre>

<p>If I run (separately):</p>

<pre><code>$mailbox  | select Identity
</code></pre>

<p>I get the expected identities, e.g.</p>

<blockquote>
  <p>testdomain.local/Users/Administrator</p>
</blockquote>

<p>in the format I'd expect to be able to pass to my search:</p>

<pre><code>Search-AdminAuditLog | Where-Object {$_.ObjectModified -eq "testdomain.local/Users/Administrator"} | Select-Object -First 1 -Property CmdLetName,Caller,RunDate
</code></pre>

<p>(which, stand alone, runs just fine). So I'm unclear why, when I pipe my input from $mailbox I don't get any results at all?</p>