[玩转系统] 通过文本文件迁移 Exchange 邮箱
作者:精品下载站 日期:2024-12-14 18:07:15 浏览:15 分类:玩电脑
通过文本文件迁移 Exchange 邮箱
您想要将用户迁移到新的数据库或新的 Exchange Server。您可以使用 Exchange 管理中心 (EAC) 迁移邮箱并一一选择用户或使用 PowerShell。本文将向您展示如何使用 PowerShell 通过文本文件迁移 Exchange 邮箱。这样,您可以创建多个包含用户的文本文件,并将每个批次迁移到 Exchange 邮箱数据库。
配置文本文件
打开记事本并填写您要迁移的电子邮件地址。
将其另存为名为 migrate1.txt 的文本文件,并将其放置在 Exchange Server 上的以下路径 C:\migrate 中。如果您没有名为 migrate 的文件夹,请创建它。
您是否需要数据库或整个组织中所有邮箱的列表?查看文章使用 PowerShell 获取 Exchange 中所有用户的邮箱大小。
读取文本文件
以管理员身份运行 Exchange 命令行管理程序。将目录更改为迁移文件夹路径并读取文本文件。它将显示文本文件的内容。
[PS] C:\>cd "C:\migrate"
[PS] C:\migrate>Get-Content "migrate1.txt"
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
列出包含 count 个邮箱的数据库
在移动邮箱之前,最好验证目标邮箱数据库。运行以下命令列出组织中的数据库。
[PS] C:\migrate>Get-Mailbox -ResultSize Unlimited | Group-Object -Property:Database | Select-Object Name,Count | Sort-Object Name | Format-Table -Auto
Name Count
---- -----
DB01 20
DB02 31
DB03 46
DB05 55
DB06 29
通过文本文件将邮箱迁移到特定数据库
假设您要将邮箱迁移到 DB03 数据库,请运行末尾带有 -WhatIf 参数的命令。 -WhatIf 参数允许您查看运行命令后会发生什么。不会进行任何更改。
[PS] C:\migrate>Get-Content "migrate1.txt" | New-MoveRequest -TargetDatabase "DB03" -WhatIf
What if: Creating move request "a-d.local/AT/Users/Standard/Doe01 John".
What if: Creating move request "a-d.local/AT/Users/Standard/Doe02 John".
What if: Creating move request "a-d.local/AT/Users/Standard/Doe03 John".
What if: Creating move request "a-d.local/AT/Users/Standard/Doe04 John".
What if: Creating move request "a-d.local/AT/Users/Standard/Doe05 John".
What if: Creating move request "a-d.local/AT/Users/Standard/Doe06 John".
What if: Creating move request "a-d.local/AT/Users/Standard/Doe07 John".
What if: Creating move request "a-d.local/AT/Users/Standard/Doe08 John".
What if: Creating move request "a-d.local/AT/Users/Standard/Doe09 John".
What if: Creating move request "a-d.local/AT/Users/Standard/Doe10 John".
运行不带 -WhatIf 参数的命令将邮箱迁移到数据库。
[PS] C:\migrate>Get-Content "migrate1.txt" | New-MoveRequest -TargetDatabase "DB03"
DisplayName StatusDetail TotalMailboxSize TotalArchiveSize PercentComplete
----------- ------------ ---------------- ---------------- ---------------
Doe01 John WaitingForJobPickup 5.063 KB (5,184 bytes) 0
Doe02 John WaitingForJobPickup 2.423 MB (2,540,313 bytes) 0
Doe03 John WaitingForJobPickup 302.3 KB (309,603 bytes) 0
Doe04 John WaitingForJobPickup 4.377 MB (4,589,389 bytes) 0
Doe05 John WaitingForJobPickup 231.6 MB (242,877,775 bytes) 0
Doe06 John WaitingForJobPickup 3.148 GB (3,379,905,224 bytes) 0
Doe07 John WaitingForJobPickup 1.246 GB (1,337,894,754 bytes) 0
Doe08 John WaitingForJobPickup 5.301 GB (5,691,380,553 bytes) 0
Doe09 John WaitingForJobPickup 498.9 MB (523,091,486 bytes) 0
Doe10 John WaitingForJobPickup 5.32 GB (5,711,868,104 bytes) 0
暂停迁移
如果要挂起(暂停)迁移,请使用 Suspend-MoveRequest cmdlet。
[PS] C:\migrate>Get-Content "migrate1.txt" | Suspend-MoveRequest
Confirm
Are you sure you want to perform this action?
Suspending move request "Doe01, John". Suspending this move request will prevent data from being
replicated until it is manually resumed by using the Resume-MoveRequest cmdlet.
[Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is "Y"): A
验证挂起状态
[PS] C:\migrate>Get-Content "migrate1.txt" | Get-MoveRequest | Get-MoveRequestStatistics
DisplayName StatusDetail TotalMailboxSize TotalArchiveSize PercentComplete
----------- ------------ ---------------- ---------------- ---------------
Doe01 John Suspend 5.063 KB (5,184 bytes) 20
Doe02 John Suspend 2.423 MB (2,540,313 bytes) 15
Doe03 John Suspend 302.3 KB (309,603 bytes) 10
Doe04 John Suspend 4.377 MB (4,589,389 bytes) 10
Doe05 John Suspend 231.6 MB (242,877,775 bytes) 10
Doe06 John Suspend 3.148 GB (3,379,905,224 bytes) 10
Doe07 John Suspend 1.246 GB (1,337,894,754 bytes) 10
Doe08 John Suspend 5.301 GB (5,691,380,553 bytes) 10
Doe09 John Suspend 498.9 MB (523,091,486 bytes) 10
Doe10 John Suspend 5.32 GB (5,711,868,104 bytes) 10
恢复迁移
当您想要恢复迁移时,请使用 Resume-MoveRequest cmdlet。
[PS] C:\migrate>Get-content "migrate1.txt" | Resume-MoveRequest
检查迁移状态
运行以下命令来检查迁移的状态。
[PS] C:\migrate>Get-Content "migrate1.txt" | Get-MoveRequest | Get-MoveRequestStatistics
DisplayName StatusDetail TotalMailboxSize TotalArchiveSize PercentComplete
----------- ------------ ---------------- ---------------- ---------------
Doe01 John CopyingMessages 5.063 KB (5,184 bytes) 23
Doe02 John CopyingMessages 2.423 MB (2,540,313 bytes) 22
Doe03 John CopyingMessages 302.3 KB (309,603 bytes) 45
Doe04 John CopyingMessages 4.377 MB (4,589,389 bytes) 31
Doe05 John CopyingMessages 231.6 MB (242,877,775 bytes) 84
Doe06 John CopyingMessages 3.148 GB (3,379,905,224 bytes) 73
Doe07 John Completed 1.246 GB (1,337,894,754 bytes) 100
Doe08 John Completed 5.301 GB (5,691,380,553 bytes) 100
Doe09 John Completed 498.9 MB (523,091,486 bytes) 100
Doe10 John Completed 5.32 GB (5,711,868,104 bytes) 100
您还可以检查文本文件中的电子邮件地址是否已迁移到目标数据库。
[PS] C:\migrate>Get-Content "migrate1.txt" | Get-Mailbox | Format-Table Name, Database
Name Database
---- --------
Doe01 John DB03
Doe02 John DB03
Doe03 John DB03
Doe04 John DB03
Doe05 John DB03
Doe06 John DB03
Doe07 John DB03
Doe08 John DB03
Doe09 John DB03
DOe10 John DB03
邮箱已成功迁移到目标数据库。您是否将包含邮箱的文本批次迁移到 Exchange 中的数据库?
继续阅读:在 Exchange 中将邮箱列表导出为文本 »
结论
您了解了如何通过文本文件迁移 Exchange 邮箱。在 Exchange 中迁移带有文本文件的邮箱非常好。如果您需要迁移大量用户,准确的步骤和正确的方法至关重要。如果您可以在文本文件中批量处理邮箱并为每个批次选择一个目标数据库,则可以快速迁移。您还可以快速验证文本文件中的邮箱是否已迁移到目标数据库,这一点也很好。
您喜欢这篇文章吗?您可能还喜欢 Outlook 在迁移后不连接到 Exchange。不要忘记关注我们并分享这篇文章。
猜你还喜欢
- 03-30 [玩转系统] 如何用批处理实现关机,注销,重启和锁定计算机
- 02-14 [系统故障] Win10下报错:该文件没有与之关联的应用来执行该操作
- 01-07 [系统问题] Win10--解决锁屏后会断网的问题
- 01-02 [系统技巧] Windows系统如何关闭防火墙保姆式教程,超详细
- 12-15 [玩转系统] 如何在 Windows 10 和 11 上允许多个 RDP 会话
- 12-15 [玩转系统] 查找 Exchange/Microsoft 365 中不活动(未使用)的通讯组列表
- 12-15 [玩转系统] 如何在 Windows 上安装远程服务器管理工具 (RSAT)
- 12-15 [玩转系统] 如何在 Windows 上重置组策略设置
- 12-15 [玩转系统] 如何获取计算机上的本地管理员列表?
- 12-15 [玩转系统] 在 Visual Studio Code 中连接到 MS SQL Server 数据库
- 12-15 [玩转系统] 如何降级 Windows Server 版本或许可证
- 12-15 [玩转系统] 如何允许非管理员用户在 Windows 中启动/停止服务
取消回复欢迎 你 发表评论:
- 精品推荐!
-
- 最新文章
- 热门文章
- 热评文章
[影视] 黑道中人 Alto Knights(2025)剧情 犯罪 历史 电影
[古装剧] [七侠五义][全75集][WEB-MP4/76G][国语无字][1080P][焦恩俊经典]
[实用软件] 虚拟手机号 电话 验证码 注册
[电视剧] 安眠书店/你 第五季 You Season 5 (2025) 【全10集】
[电视剧] 棋士(2025) 4K 1080P【全22集】悬疑 犯罪 王宝强 陈明昊
[软件合集] 25年6月5日 精选软件22个
[软件合集] 25年6月4日 精选软件36个
[短剧] 2025年06月04日 精选+付费短剧推荐33部
[短剧] 2025年06月03日 精选+付费短剧推荐25部
[软件合集] 25年6月3日 精选软件44个
[剧集] [央视][笑傲江湖][2001][DVD-RMVB][高清][40集全]李亚鹏、许晴、苗乙乙
[电视剧] 欢乐颂.5部全 (2016-2024)
[电视剧] [突围] [45集全] [WEB-MP4/每集1.5GB] [国语/内嵌中文字幕] [4K-2160P] [无水印]
[影视] 【稀有资源】香港老片 艺坛照妖镜之96应召名册 (1996)
[剧集] 神经风云(2023)(完结).4K
[剧集] [BT] [TVB] [黑夜彩虹(2003)] [全21集] [粤语中字] [TV-RMVB]
[实用软件] 虚拟手机号 电话 验证码 注册
[资源] B站充电视频合集,包含多位重量级up主,全是大佬真金白银买来的~【99GB】
[影视] 内地绝版高清录像带 [mpg]
[书籍] 古今奇书禁书三教九流资料大合集 猎奇必备珍藏资源PDF版 1.14G
[电视剧] [突围] [45集全] [WEB-MP4/每集1.5GB] [国语/内嵌中文字幕] [4K-2160P] [无水印]
[剧集] [央视][笑傲江湖][2001][DVD-RMVB][高清][40集全]李亚鹏、许晴、苗乙乙
[电影] 美国队长4 4K原盘REMUX 杜比视界 内封简繁英双语字幕 49G
[电影] 死神来了(1-6)大合集!
[软件合集] 25年05月13日 精选软件16个
[精品软件] 25年05月15日 精选软件18个
[绝版资源] 南与北 第1-2季 合集 North and South (1985) /美国/豆瓣: 8.8[1080P][中文字幕]
[软件] 25年05月14日 精选软件57个
[短剧] 2025年05月14日 精选+付费短剧推荐39部
[短剧] 2025年05月15日 精选+付费短剧推荐36部
- 最新评论
-
- 热门tag