首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >是否可以在Exchange Server2010 SP3上将邮箱导出排队到PST?

是否可以在Exchange Server2010 SP3上将邮箱导出排队到PST?
EN

Stack Overflow用户
提问于 2017-10-11 20:20:16
回答 1查看 357关注 0票数 0

我的情况是,当我想要将几个邮箱排入队列以导出(我不希望它们同时被处理)到PST文件。我知道如何使用get-mailboxexportrequest命令导出它们,但当我这样做时,它们几乎立即就开始了。我可以以某种方式排队另一个邮箱,以便它将自动启动,当前一个邮箱完成时?

EN

回答 1

Stack Overflow用户

发布于 2017-10-13 16:08:30

我会做以下事情:

  • 构建powershell脚本,用于检查是否存在正在运行的导出(通过Get-MailboxExportRequest)如果不是这样,请开始导出您在CSV文件中指定的x个邮件文件
  • 使用Exchange Server上的Windows任务管理器触发该脚本,并在此处定义脚本运行的时间段powershell脚本运行后,它应从CSV文件中删除导出的邮件文件,然后退出
  • 下一次通过任务管理器从powershell脚本运行时,将检查当前作业是否仍在运行,如果仍在运行,它应该会停止,直到它从你的列表中拿起下一个条目

更新:

作为一个起点,像下面这样的东西应该很好(未经测试,但应该给你一个起点):

代码语言:javascript
复制
# Get current Export Requests
$ExportStats = Get-MailboxExportRequest

#Check if there are completed questes
If ($ExportStats.Status -eq "Completed")
{
  Write-Host "Export done"
  Get-MailboxExportRequest -Status Completed -Name "$ObjectName-Export" | Remove-MailboxExportRequest -Confirm:$false
  #Disable-Mailbox -identity "AD\$ObjectName"

  # Create a new CSV file, which isn´t including the current export name we just marked as finish via above's section.      
  # CODE MISSING HERE!      

  # Now import our CSV list and proceed it
  Import-CSV <Filepath of CSV file(\\server\folder\file.csv)> | ForEach-Object {
  # Perform the export
  New-MailboxExportRequest -Mailbox $_.MailboxAlias -FilePath $_.PSTpath
  New-MailboxExportRequest -Mailbox $_.MailboxAlias -FilePath $_.ArchivePath
  # Once done exit here, this will ensure we proceed only the first entry
  Exit
  } 

}
elseif ($ExportStats.Status -eq "InProgress")
{
    Write-Host "Export still ongoing"    
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46688071

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档