The query does not return all 4600+ mailboxes, just a couple hunderd which is more that the 40 people that received the email in question. I put the 40 email addresses in a txt file and took that into my script to remove the questionable email.
On Fri, Aug 21, 2015 at 6:05 AM, Gavin Wilby <[email protected]> wrote: > If I ran that query id expect all my mailboxes to return a value. > > > > Needs to be more specific. > > > > *Gavin Wilby* > > *IT Support Engineer* > > > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Todd Lemmiksoo > *Sent:* 20 August 2015 21:29 > *To:* [email protected] > *Subject:* [Exchange] Powershell to remove email from mailboxes > > > > I have to remove a email send to group of people in Exchange 2010. My > powershell is returning too many mailboxes. This is my code > Get-Mailbox -ResultSize unlimited | Search-Mailbox -SearchQuery "I have > been informed" –DeleteContent -WhatIF > > The search should only return about 40 mailboxes, it is returning hunderds. > > Suggestions! > > > -- > > T. Todd Lemmiksoo > > SMP Partners Limited, SMP Trustees Limited and SMP Fund Services Limited > are licensed by the Isle of Man Financial Supervision Commission. SMP > Accounting & Tax Limited is a member of the ICAEW Practice Assurance Scheme. > > SMP Partners Limited registered in the Isle of Man, Company Registration > No: 000908V > Directors: M.W. Denton, M.J. Derbyshire, S.E McGowan, O. Peck, J.J. Scott, > S.J. Turner > > SMP Trustees Limited registered in the Isle of Man, Company Registration > No: 068396C > Directors: A.C. Baggesen, M.W. Denton, O. Peck, J.J. Scott, J. Watterson, > J. Cubbon > > SMP Fund Services Limited registered in the Isle of Man, Company > Registration No: 120288C > Directors: V. Campbell, M.W. Denton, D.A. Manser, S.E McGowan, J.J. > Scott, R.K. Corkill > > SMP Accounting & Tax Limited registered in the Isle of Man, Company > Registration No: 001316V > Directors: I.F. Begley, A.J. Dowling, P. Duchars, J.J. Scott, S.J. Turner > > SMP Capital Markets Limited registered in the Isle of Man, Company > Registration No: 002438V > Directors: M.W. Denton, M.J. Derbyshire, D.F Hudson, S.E McGowan, O. Peck, > J.J. Scott. > > SMP Partners Limited, SMP Trustees Limited, SMP Fund Services Limited, SMP > Accounting & Tax Limited and SMP Capital Markets Limited are members of the > SMP Partners Group of Companies. > > <http://www.smppartners.com/disclaimer.html> > This email is confidential and is subject to disclaimers. Details can be > found at: http://www.smppartners.com/disclaimer.html > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > -- T. Todd Lemmiksoo
