Exchange Online-Powershell cmdlet“ New-MailboxImportRequest”不接受“ FilePath”参数

时间:2019-12-02 03:51:41

标签: powershell office365

当我使用cmdlet New-MailboxImportRequest时,它不接受-FilePath参数。当我删除参数时,它抱怨它是必需的!我敢肯定对此有一个快速的解释。有什么想法吗?

一些细节:

  • PowerShell版本6.2.1(在PowerShell 5.1中也尝试过)
  • 使用URI https://outlook.office365.com/powershell-liveid/连接到O365
  • 我已授予我运行此cmdlet所需的“邮箱导入导出”角色。
  • 我能够正常运行Get-MailboxImportRequest

使用FilePath会抱怨:

PS C:\> New-MailboxImportRequest -Mailbox "Archive Mailbox" -FilePath "D:\testuser.pst" -TargetRootFolder "RecoveredFiles" -IncludeFolders "#Inbox#"
A parameter cannot be found that matches parameter name 'FilePath'.
+ CategoryInfo          : InvalidArgument: (:) [New-MailboxImportRequest], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,New-MailboxImportRequest
+ PSComputerName        : outlook.office365.com

没有FilePath会抱怨:

PS C:\> New-MailboxImportRequest -Mailbox "Archive Mailbox" -TargetRootFolder "RecoveredFiles" -IncludeFolders "#Inbox#"
Cannot process command because of one or more missing mandatory parameters: FilePath.
At C:\Users\<redacted>\AppData\Local\Temp\tmp_n11tq1ct.qbd\tmp_n11tq1ct.qbd.psm1:44229 char:9
+         $steppablePipeline.End()
+         ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidArgument: (:) [New-MailboxImportRequest], ParameterBindingException
+ FullyQualifiedErrorId : MissingMandatoryParameter,Microsoft.Exchange.Management.Migration.MailboxReplication.MailboxImportRequest.NewMailboxImportRequest

编辑:我重新阅读了Microsoft文档,并注意到对于“ FilePath”,它指出“此参数仅在本地Exchange中可用”。这使这更加令人困惑。如果仅在本地部署中可用,为什么它是Exchange Online的必需参数?如果它不是Exchange Online的有效参数,为什么还要在EXO中使用此PowerShell命令? https://docs.microsoft.com/en-us/powershell/module/exchange/mailboxes/new-mailboximportrequest?view=exchange-ps

0 个答案:

没有答案