use*_*879 4 powershell export microsoft-office-365 exchange-2013 exchange-hybrid
我们有一个交换混合环境。(有些用户在本地交换中,有些用户在 office 365。)
当我们想从本地导出电子邮件时,我们使用下面的命令来导出邮箱和存档。
New-MailboxExportRequest -Mailbox "user" -FilePath \\mysrv\l$\PST\Mailbox-user.pst; New-MailboxExportRequest -Mailbox "user" -IsArchive -FilePath \\mysrv\l$\PST\Mailbox-user-archive.pst -confirm:$false
Run Code Online (Sandbox Code Playgroud)
New-MailboxExportRequest 适用于本地用户而不适用于 Office 365。有没有办法使用 powershell 将 Office 365 用户邮箱导出到 pst?
到目前为止我尝试过的:
我登录到 Office 365
$UserCredential = Get-Credential
Import-Module MSOnline
Connect-MsolService -Credential $UserCredential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
Run Code Online (Sandbox Code Playgroud)
并尝试 New-MailboxExportRequest
但它会产生错误。显然,Office 365 不知道该命令
PS C:\Users\pp> New-MailboxExportRequest
New-MailboxExportRequest : The term 'New-MailboxExportRequest' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
correct and try again.
At line:1 char:1
+ New-MailboxExportRequest
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (New-MailboxExportRequest:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Run Code Online (Sandbox Code Playgroud)
还有Get-Command *Export*结果如下
尝试谷歌搜索,但找不到可行的选择。有人可以指导我吗?什么是办公环境中的兼容命令来做到这一点?
PS:
我尝试过https://www.codetwo.com/admins-blog/how-to-export-office-365-mailboxes-to-pst-using-ediscovery/使用 E5 许可证,它在 GUI 中完美运行。但我的担忧甚至与电子发现有关,并且是否有可能使用 powershell 进行许可?我的意思是通过 powershell 编写脚本/自动化?
您无法使用内置工具通过 PowerShell 将 Exchange Online 邮箱直接导出到 PST。必需的 New-MailboxExportRequest 不存在在线(或不暴露给我们凡人)。
你可以:
我和你一样沮丧。为离开的用户导出邮箱以进行长期存储是不必要的烦人。如果我们可以像导入一样导出到 Azure Blob,那将是一个好的开始。
| 归档时间: |
|
| 查看次数: |
19832 次 |
| 最近记录: |