在 Exchange 2007 SP1 中使用 Exchange 指令行管理程式導出郵箱資料的步驟
<a></a>
若要将郵箱的特殊檔案夾和空檔案夾導出到目标郵箱的某個檔案夾中,請運作以下指令:
Export-Mailbox -Identity <MailboxIdParameter> -TargetMailbox <MailboxIdParameter> -TargetFolder <Folder_Name>
若要将資料導出到 .pst 檔案,請運作以下指令:
Export-Mailbox -Identity <MailboxIdParameter> -PSTFolderPath <Path_Of_PST_Folder>\<File_Name>.pst
要導出一組郵箱(例如使用者職務以“VP”開頭的所有郵箱)中的資料,請運作以下指令:
Get-User | where { $_.Title -ilike "VP*" } | Export-Mailbox -TargetFolder <Folder_Name> -TargetMailbox <MailboxIdParameter>
若要将特定日期範圍内收到的資料導出到 .pst 檔案,請運作以下指令:
Export-Mailbox -Identity <MailboxIdParameter> -StartDate "<Month/Day/Year>" -EndDate "<Month/Day/Year>" -PSTFolderPath <Path_Of_PST_Folder>\<File_Name>.pst
要隻導出“已發送郵件”檔案夾中的資料,請運作以下指令:
Export-Mailbox -Identity <MailboxIdParameter> -IncludeFolders '\Sent Items' -TargetFolder <Target_Folder_Name> -TargetMailbox <MailboxIdParameter>
要在導出時排除某些檔案夾(如排除“垃圾郵件”和“聯系人”檔案夾中的項目),請運作以下指令:
Export-Mailbox -TargetMailbox <MailboxIdParameter> -TargetFolder <Target_Folder_Name> -ExcludeFolders "\Junk E-Mail","\Contacts"
要使用篩選器指定在導出時要包含源郵箱中的哪些項,請運作以下指令:
Export-Mailbox -Identity <MailboxIdParameter> -TargetMailbox <MailboxIdParameter> -TargetFolder <Target_Folder_Name> -ContentKeywords "<String[]>" -AttachmentFilenames "<String[]>" -StartDate "<Month/Day/Year> <Time>" -RecipientKeywords <String[]>
要查找并删除一組郵箱(例如,某個資料庫上的所有郵箱)中的項目,請運作以下指令:
Get-Mailbox -Database DB1 | Export-Mailbox -TargetMailbox ExportMailbox -TargetFolder VirusData -SubjectKeywords "Virus message" -DeleteContent
此示例将首先擷取資料庫 DB1 中的所有郵箱,然後搜尋主題行中包含字元串“Virus message”的郵件。它會将這些郵件導出到 ExportMailbox 郵箱中,并從源郵箱中删除這些郵件。
要查找并删除一組郵箱(例如,某個資料庫上的所有郵箱)中的郵件,并且不将這些郵件導出到其他郵箱,請運作以下指令:
Get-Mailbox -Database DB1 | Export-Mailbox -SubjectKeywords "Virus message" -DeleteContent
此示例将首先擷取資料庫 DB1 中的所有郵箱,然後從主題中搜尋包含字元串“Virus message”的郵件,并删除這些郵件。
要從 Marketing 組織機關中使用者的所有郵箱導出資料,請運作以下指令:
Get-Mailbox -OrganizationalUnit Marketing | Export-Mailbox -PSTFolderPath C:\PSTFiles
此示例将每個郵箱中的資料導出到 C:\PSTFiles 目錄下的一個單獨 .pst 檔案。每個 .pst 檔案的名稱都将是 <别名> .pst。