我正在尝试使用 New-MailBoxExportRequest 将邮箱导出到 .pst
如果我使用这个命令,一切都会正常!
New-MailboxExportRequest -Mailbox <user> -ContentFilter {Received -lt '05/27/2015 18:00'}-FilePath \\Server\name.pst -ExcludeFolders “#Calendar#” -ExcludeDumpster
但是如果我为不同的参数添加多个属性,命令就会出错!语法无效
New-MailboxExportRequest -Mailbox <user> -ContentFilter {Received -lt '05/27/2015 18:00'}{Sent -lt '05/27/2015 18:00'}-FilePath \\Server\name.pst -ExcludeFolders “#Calendar#,#Contacts#” -ExcludeDumpster
有什么帮助吗?
答案1
您需要在链式过滤器之间使用一个运算符,如下所示:
New-MailboxExportRequest -Mailbox <user> -ContentFilter {(Received -lt '05/27/2015 18:00') -or (Sent -lt '05/27/2015 18:00')} -FilePath \\Server\name.pst -ExcludeFolders “#Calendar#,#Contacts#” -ExcludeDumpster