Exchange 导出pst的命令是 Get-MailboxExportRequest
Exchange 导入pst的命令是 Get-MailboxImportRequest
-
准备的 2018.1.22mailpst.txt 文件,文件名包含要导出的邮箱地址
1
2
3
4
5
|
MailboxAlias
test001
@pwrd
.com
test002
@pwrd
.com
test003
@pwrd
.com
....
|
-
Powershell脚本
1
2
3
4
5
6
7
|
$mail
=
Import-Csv
-Path
"F:\scripts\2018.1.22mailpst.txt"
#从CSV文件中循环导出pst
Foreach
(
$user
in
$mail
)
{
$Alias
=
$user
.MailboxAlias
New-MailboxExportRequest
-Mailbox
$Alias
-ContentFilter {Received
-gt
"1/20/2018"
} -IncludeFolders
"已发送邮件"
-FilePath \\10.12.0.102\pst\pst2018.3.5\$(
$user
.MailboxAlias).pst
}
|
导入pst则换成 Get-MailboxImportRequest
本文转自cix123 51CTO博客,原文链接:http://blog.51cto.com/zhaodongwei/1948483,如需转载请自行联系原作者