如何解决从 Office 365 导出 pst 的 New-MailboxExportRequest 错误
我还是 PowerShell 的新手。 我在从 Office 365 导出所有 pst 文件时遇到问题,
显示的错误: New-MailboxExportRequest :术语“New-MailboxExportRequest”未被识别为 cmdlet、函数、脚本的名称 文件或可运行的程序。检查名称的拼写,或者如果包含路径,请验证路径是否正确并且 再试一次。
这里是我的 PowerShell 脚本
$credential = Get-Credential
Install-Module MSOnline
Connect-MsolService -Credential $credential
Get-MsolUser
$ServerPath="\\KK\Users\"
Get-MsolUser -All |Export-Csv $ServerPath"user.csv"
$Users = Import-Csv $ServerPath"user.csv"
foreach ($User in $Users)
{
Write-Host $User.DisplayName-ForegroundColor Cyan
$filename = $User.DislayName
New-MailboxExportRequest -Mailbox $User.DisplayName -FilePath $ServerPath+"$filename.pst"
# Get-MailboxExportRequestStatistics -Identity $User.DisplayName | Format-List
}
我使用的是 Windows Powershell ISE 并以管理员身份运行。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。