Solved

Coping All Emails from Specific domain address to Specific folder

Posted on 2013-10-30
5
200 Views
Last Modified: 2014-02-19
Hello,

I need to copy emails from a specific email domain to a specific mailbox and folder that I have created,

the cmdlets that I've just used is:

Get-mailbox -resultsize unlimited| Export-Mailbox -SenderKeywords "stacatruc.co.uk" -TargetMailbox adurrant -TargetFolder 'StacATruc'

all this did was a create a number of folders in my mailbox, so I had to cancel the command!

like above, it's really important that the emails get copied and not moved.

It's on Exchange 2007 and multiple databases.

Thanks in advance
0
Comment
Question by:ProjNet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 12

Expert Comment

by:Chris
ID: 39611377
Your syntax looks good. It's been quite a while since I last did this (Especially since in 2010 you can perform the same through Discovery Mailboxes). I cant remember the format for the SenderKeywords field and whether or not a wildcard is required. I also can't find a definitive conclusion online. You could try "*stacatrue.co.uk" and "@stacatrue.co.uk" and see what happens.
0
 

Author Comment

by:ProjNet
ID: 39611396
Yup this is what I tried:

Get-mailbox -resultsize unlimited| Export-Mailbox -SenderKeywords "stacatruc.co.uk" -TargetMailbox adurrant -TargetFolder 'StacATruc'

Am getting this though, which is quite a lot:

 1
You sure it’s coping and not moving?

I’ve cancelled it, looked in my outlook:

 2
Can’t see any emails in the folders though :/

WEIRD
0
 
LVL 12

Expert Comment

by:Chris
ID: 39611538
It will only move the mail if you've used the -DeleteContent switch:

The DeleteContent parameter specifies the option to delete the content from the source mailbox after it has been exported to a folder. The source folder will not be deleted.

http://technet.microsoft.com/en-us/library/aa998579(v=exchg.80).aspx

The command you've used should only copy.

One thing to note with the export-mailbox commandlet (if I recall correctly) is that if you search by keywords, the entire mailbox first gets copied to the destination, then the search is performed in the destination mailbox.

This will obviously mean you get thousands of messages copied across until it's been back through and thinned them out.
0
 

Accepted Solution

by:
ProjNet earned 0 total points
ID: 39623932
Hello,

Thanks for your comments, this is within a 1000+ mailbox organisation so I'm not sure if this is feasible, I'm not quite sure why it starting coping loads of subfolders (see above), is there a better way to search all mailbox in all databases for emails from a specific domain name and copy them to my mailbox?

Thanks again
0
 

Author Closing Comment

by:ProjNet
ID: 39869807
No answers really worked for me.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question