Jerry Seinfield
asked on
Script to recall message from all mailboxes in Exchange 2007-2010
Hello Experts,
Can anyone help me to build an script to do
Given a DL, or distribution group in AD that contains multiple sub-DLs and users.
Given an Exchange server, or multiple Exchange/Databases
Delete a message for all users in that DL and /or exchange/database server with subject is Virus, and export deleted messages into another mailbox?
I have this pw shell command for a single user and works fine
Get-Mailbox xxxx | Export-Mailbox -SenderKeywords "xxxx@xxxxxx.com" -SubjectKeywords "Virus" -StartDate "12/07/2010 7:09:00" -EndDate "12/07/2010 7:11:00" -TargetMailbox xxxxxxxx -TargetFolder ConfidentalData -Deletecontent -confirm:$false
Please be aware I am not a programmer, please indicate as many details as you can
Thank you in advance
Can anyone help me to build an script to do
Given a DL, or distribution group in AD that contains multiple sub-DLs and users.
Given an Exchange server, or multiple Exchange/Databases
Delete a message for all users in that DL and /or exchange/database server with subject is Virus, and export deleted messages into another mailbox?
I have this pw shell command for a single user and works fine
Get-Mailbox xxxx | Export-Mailbox -SenderKeywords "xxxx@xxxxxx.com" -SubjectKeywords "Virus" -StartDate "12/07/2010 7:09:00" -EndDate "12/07/2010 7:11:00" -TargetMailbox xxxxxxxx -TargetFolder ConfidentalData -Deletecontent -confirm:$false
Please be aware I am not a programmer, please indicate as many details as you can
Thank you in advance
ASKER
Thanks Tony,
What if I have 20 CCR cluster and each cluster has 5 databases?
Can you please buld the ps script for this?
What if I have 20 CCR cluster and each cluster has 5 databases?
Can you please buld the ps script for this?
That would be a complex script to build - not 5 mins work I think.
You can do it against OU as you originally asked with the following:
Get-Mailbox -OrganizationalUnit Marketing
I don't know if that might be any easier?
You can do it against OU as you originally asked with the following:
Get-Mailbox -OrganizationalUnit Marketing
I don't know if that might be any easier?
You can also run against each exchange server, just replace servrname with the Server name
Get-Mailbox -server servername | Export-Mailbox -SenderKeywords "xxxx@xxxxxx.com" -SubjectKeywords "Virus" -StartDate "12/07/2010 7:09:00" -EndDate "12/07/2010 7:11:00" -TargetMailbox xxxxxxxx -TargetFolder ConfidentalData -Deletecontent -confirm:$false
Get-Mailbox -server servername | Export-Mailbox -SenderKeywords "xxxx@xxxxxx.com" -SubjectKeywords "Virus" -StartDate "12/07/2010 7:09:00" -EndDate "12/07/2010 7:11:00" -TargetMailbox xxxxxxxx -TargetFolder ConfidentalData -Deletecontent -confirm:$false
ASKER
Hi Tony,
Thanks for the information.
Basically, I need to script recall messages from a DL that contains multiple sub-DLs and users.
Can you please build an script for me based on that information and powershell command I attached above?
Thanks for the information.
Basically, I need to script recall messages from a DL that contains multiple sub-DLs and users.
Can you please build an script for me based on that information and powershell command I attached above?
ASKER
Any updates Experts?
Can anyone provide me with the script to recall messages from a DL that contains multiple sub-DLs?
Can anyone provide me with the script to recall messages from a DL that contains multiple sub-DLs?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I was expecting another answer for the DL request
Get-Mailbox -Database "SERVER\First Storage Group\Mailbox Database" | Export-Mailbox -SenderKeywords "xxxx@xxxxxx.com" -SubjectKeywords "Virus" -StartDate "12/07/2010 7:09:00" -EndDate "12/07/2010 7:11:00" -TargetMailbox xxxxxxxx -TargetFolder ConfidentalData -Deletecontent -confirm:$false