If you wanted to pull out of user account who has specific email address in the mailboxes in the Orginisation then below script will help you to get the list
Get-Mailbox -ResultSize Unlimited | select DisplayName, Alias |export-csv C:\stats.csv
$csv = Import-csv -path “C:\stats.csv”
foreach($line in $csv)
{
$result = $Line.Alias
$Emailadd = Get-Mailbox $Line.Alias |select emailaddresses
$K = $Emailadd.EmailAddresses
foreach ($S in $K)
{
If (($S.smtpaddress -like “*domain001.com”) -or ($S.smtpaddress -like “*domain002.com”))
{
$result = $result + “,” + $S.smtpaddress
}
}
$result | Out-File C:\Result_output.csv -Append
}
You can download a copy from the below mentioned link
http://powershell.com/cs/members/smtpport25.wordpress/files/SpecificEmailaddressPullout.ps1.aspx