存档旧的电子邮件,使用 PowerShell 脚本

使用这个脚本,我存档旧邮件邮箱超过90天时间最古老的邮件文件PST文件名。

[DateTime] $Today = Get-Date

$Today = $Today.adddays(-30)

$Path = “PSTfileNAME” + $Today.tostring(“yyyy-MM-dd”) + “.pst”

Write-Host $Today.tostring(“yyyy-MM-dd” + ” 23:59:59″) -ForeGroundColor Yellow

Export-Mailbox -Identity targetmailbox -PSTFolderPath C:\PSTBAYI\$Path -EndDate $Today.tostring(“yyyy-MM-dd” + ” 23:59:59″) -Confirm:$false -deletecontent

Exchange中文站
Latest posts by Exchange中文站 (see all)
发布于: 浏览:2631 次

还没有评论

This site uses Akismet to reduce spam. Learn how your comment data is processed.