24 Ağustos 2012 Cuma

Exporting and Importing Mailboxes with Exchange Server 2010

Exporting and Importing Mailboxes with Exchange Server 2010


Exporting PST

New-MailboxExportRequest -Mailbox UserName -FilePath "\\Server\Share\UserName.pst"

State Control

Get-MailboxExportRequest | Get-MailboxExportRequestStatistics


Importing PST

New-MailboxImportRequest -Mailbox UserName -FilePath "\\Server\Share\UserName.pst"

State Control

Get-MailboxImportRequest | Get-MailboxImportRequestStatistics | ft TargetAlias,Percent*,BytesTransferred*


Removing Mailbox Export and Import Requests

Import

Get-MailboxImportRequest -Status Completed | Remove-MailboxImportRequest

Get-MailboxImportRequest -Status Failed | Remove-MailboxImportRequest

Export

Get-MailboxExportRequest -Status Completed | Remove-MailboxExportRequest

Get-MailboxExportRequest -Status Failed | Remove-MailboxExportRequest


Convert a Shared Mailbox to a User Mailbox Exchange 2010


Convert a Shared Mailbox to a User Mailbox Exchange 2010

Set-Mailbox -Identity UserName -Type Regular


Convert a All Shared Mailbox to a User Mailbox Exchange 2010

Get-Mailbox -RecipientTypeDetails sharedmailbox | Set-Mailbox -Type regular

22 Ağustos 2012 Çarşamba

Get-Mailbox Search-Mailbox -SearchQuery

Searching and deleting email containing attachment spam.csv in all the mailbox in the organization
get-mailbox -resultsize unlimited | Search-Mailbox -SearchQuery attachment:"spam.csv" -DeleteContent
Searching and deleting emails containing attachment spam.csv and subject is hi against all the mailbox in the organization
get-mailbox -resultsize unlimited | Search-Mailbox -SearchQuery 'attachment:"spam.csv" and subject:Hi' -DeleteContent
If you wanted to display the details of the search result on the shell then you need to use the option Estimateresultonly
get-mailbox -server | Search-Mailbox -SearchQuery 'attachment:"spam.csv" and subject:Hi' -Estimateresultonly
Delete all the email from all the mailbox of a before the specific date. In the below example I am deleting all the email before the date 18th Sep 2011(“dd/mm/yyy’)
get-mailbox -database -resultsize unlimited | Search-Mailbox -SearchQuery Received:<$("09/18/201") -deletecontent
Delete all the email from all the mailbox of a database between the specific dates. In the below example I am deleting all the email before the date 18th Sep 2011(“dd/mm/yyy’) – 1st Jan 2012
get-mailbox -database -resultsize unlimited | Search-Mailbox -SearchQuery Received:<$("09/18/2011") –deletecontent
Delete all the email from the mailbox between the specific date
Search-Mailbox -Identity -SearchQuery 'Received:>$("09/18/2011") and Received:<$("01/27/2012")` -deletecontent
Delete all the email from yesterday against the member of the distribution group.
get-DistributiongroupMember Orgvip | Search-Mailbox -SearchQuery Received:today -deletecontent -confirm:false  
Delete all the email on a specific date from a specific mailbox.
Search-Mailbox -SearchQuery Received:01/27/2012 -deletecontent