设为首页 收藏本站
查看: 3022|回复: 0

[经验分享] Office365与本地Exchange互迁移用户及错误提示解决方案

[复制链接]

尚未签到

发表于 2018-7-8 11:39:13 | 显示全部楼层 |阅读模式
  Office365与本地Exchange互迁移用户及错误提示解决方案
  我们前面的文章有介绍Office365与本地Exchange2013 CU9的混合部署,混合部署后,我们需要测试一下如何将本地的Exchange邮箱用户迁移到Office365 online上,及将Office365 Online上的用户迁移到本地的Exchange上。具体操作我们就开始了。我们在此次的操作中遇到点错误,最终节后后,将解决方案一并分享给有需要的童鞋,具体见下:
  以下连接是微软官网提供的一些解决方案,希望对有需要的童鞋帮助。
  https://technet.microsoft.com/zh-CN/library/jj150487(v=exchg.150).aspx
  https://technet.microsoft.com/en-us/library/jj906432%28v=exchg.150%29.aspx
  我们通过本地服务器登陆EMC后,单击切换到office364后---迁移
DSC0000.jpg

  我们可以看见有两个迁移选项,一个就是将本地Exchange邮箱用户迁移到Office365 Online上,另外一个就是将Office 365邮箱用户迁移到本地的Exchange服务器上。
DSC0001.jpg

  我们测试将本地的Exchange邮箱用户迁移到Office365 Online上;我们单击选择需要迁移的用户
DSC0002.jpg

  我们选择user02
DSC0003.jpg

  输入Exchange服务器的全局管理员(organzition server)组用户,在此我们使用administrator进行验证
DSC0004.jpg

  我们选择远程的MRS代理服务器:
  MRS代理服务器为在外部可以访问Exchange服务器内部服务器的代理服务,该服务我们可以理解为CAS服务器的对方访问地址。通过该服务地址我们可以在外部访问本地的Exchane邮箱用户及收发邮件。
DSC0005.jpg

  然后定义一个迁移名称,在此我们定义为:migration to office365
DSC0006.jpg

  定义迁移后的服务通知报告,在此我们选择gaowenlong、user01邮箱用户。在此可以选择任意用户
DSC0007.jpg

  开始迁移,提示正在同步
DSC0008.jpg

  提示正在同步一个用户
DSC0009.jpg

  迁移数据已同步完成—迁移完成
DSC00010.jpg

  迁移后,我们登录到gaowenlong、user01邮箱下,可以看见系统发送的一封迁移报告
DSC00011.jpg

DSC00012.jpg

  同步完成后,我们需要对同步用户进行批处理迁移配置
DSC00013.jpg

  迁移用户操作已经完成。
DSC00014.jpg

  接下来我们登录office365邮箱管理中心,查看迁移的用户状态,发现刚才迁移的用户没有显示
DSC00015.jpg

DSC00016.jpg

  迁移到office365上的用户,如果需要登录邮箱的话,我们需要对office365上的用户分配许可
DSC00017.png

  选定用户---编辑---分配许可
DSC00018.png

  我们通过本地的Exchange访问服务进行登录刚才迁移的用户,会提示需要访问以下链接才可以登录用户邮箱。
DSC00019.jpg

  我们单击跳转指定链接后,user02可以正常登录user02的邮箱服务
DSC00020.jpg

  我们测试使用本地的user01给office365上的user02发送测试邮件
DSC00021.jpg

  使用office365上的user02用户回复本地的user01用户
DSC00022.jpg

  接下来我们测试将office365上的账户迁移到本地
  我们首先在office365上创建一个邮箱用户
DSC00023.jpg

  创建一个office365用户user03
DSC00024.jpg

  用户创建完成
DSC00025.jpg

  创建后,我们需要使用dirsync同步到office365上
  Start-onlinecoexistencesync
DSC00026.jpg

  执行强制同步后,我们登录office365管理中心,可以看见刚才创建的office365用户user03
DSC00027.jpg

  我们准备将office365上的用户user03迁移到本地
  迁移----从exchange onlie迁移
DSC00028.jpg

  我们选择user03
DSC00029.jpg

  同样选择远程MRS代理服务器
DSC00030.jpg

  我们再次给本地服务器添加了一个数据库;
  在迁移本地之前确认数据库的名称;再次建议大家在做本地迁移的时候,数据库名称不建议有空格,如果有空格那样迁移的话会有问题,提示找不到用户的数据库guid,为了保险起见,建议修改默认数据库名称或者添加新的数据库
DSC00031.jpg

  查看当前服务器的数据库服务
DSC00032.jpg

  接下来定义定义迁移处理名称----migration to local
DSC00033.jpg

  定义迁移属性,在此建议自动启动批处理程序
DSC00034.jpg

  我们发现用户迁移失败
DSC00035.jpg

  我们根据错误搜索解决方案
  https://support.microsoft.com/en-us/kb/2956029
  CAUSE
  This behavior occurs because the value of the mailbox GUID isn't stamped on the associated mailbox in the on-premises organization.
  Note The mailbox value is stored in the ExchangeGUID property (also known as the msExchMailboxGUID attribute).
  This situation occurs because the value of the property isn't synced to the associated remote mailbox in the on-premises organization when a mailbox is created in Exchange Online.
  To move a mailbox, the value of the ExchangeGUID property must be the same in the Exchange Online mailbox and in the associated on-premises remote mailbox.
  SOULTION
  Set the ExchangeGUID property on the associated on-premises remote mailbox before you move the mailbox to the on-premises organization. To do this, follow these steps:
  1.Open the Exchange Management Shell on the on-premises server, and then run the following command to check whether the ExchangeGUID property of the on-premises remote mailbox is set:   
Get-RemoteMailbox <alias of cloud mailbox to move> | Format-List ExchangeGUID    Note If the ExchangeGUID property returns all zeros, the value isn't stamped on the on-premises remote mailbox.  
get-remotemailbox user03 | format-list exchangeGuid
DSC00036.jpg

  Note If the ExchangeGUID property returns all zeros, the value isn't stamped on the on-premises remote mailbox.
  2.Open Windows PowerShell (don't use the Exchange Management Shell), and then connect to Exchange Online. For more info about how to do this, see Connect to Exchange Online Using Remote PowerShell.
  使用以下链接进行操作
  https://technet.microsoft.com/library/jj984289(v=exchg.160).aspx
  使用windows powershell 链接到exchange online
  开始之前我们需要准备
  您可以使用 Windows 的以下版本:
  Windows 10
  Windows 8 或 Windows 8.1
  Windows Server 2012 或 Windows Server 2012 R2
  Windows 7 Service Pack 1 (SP1)*
  Windows Server 2008 R2 SP1*   
  * 您需要安装 Microsoft.NET Framework 4.5 或更高版本,然后安装 Windows Management Framework 3.0 或 Windows Management Framework 4.0。有关详细信息,请参阅安装 .NET FrameworkWindows Management Framework 3.0Windows Management Framework 4.0
  2.1打开本地的级算计上的windows powershell,运行以下命令
  set-executionpolicy remotesigned 允许签名
DSC00037.jpg

$UserCredential = Get-Credential  在“Windows PowerShell 凭据请求”对话框中,键入您的 Office 365 用户名和密码,然后单击“确定”
DSC00038.jpg

  2.2
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection  
如果您是由世纪互联运营的中国 Office 365 客户,请为 ConnectionUri 参数使用以下值:https://partner.outlook.cn/PowerShell.
  因为我们环境是世纪互联的
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri  
https://partner.outlook.cn/powershell-liveid/
  
-Credential $UserCredential -Authentication Basic -AllowRedirection
DSC00039.jpg

  2.3
Import-PSSession $Session
DSC00040.jpg

DSC00041.jpg

  2.4
  最后操作完成后,我们可以使用以下命令完成断开与远程的powershell 会话链接
Remove-PSSession $Session  2.5
  确认是否链接成功
get-mailbox
DSC00042.jpg

  3.Run the following command to retrieve the value of ExchangeGUID property of the mailbox that you want to move.   
Get-Mailbox <MailboxName> | Format-List ExchangeGUID
DSC00043.jpg

  4.Run the following command to set the value of the ExchangeGUID property on the on-premises remote mailbox to the value that you retrieved in step 3:   
  Set-RemoteMailbox <MailboxName> -ExchangeGUID <GUID>
  get-remotemailbox user03 -exchangeguid 6axxxxxxxx
DSC00044.jpg

  5.Force directory synchronization. For more info about how to do this, see the "Force directory synchronization" section of Synchronize your directories.
DSC00045.jpg

  然后我们尝试再次迁移
  我们把原来的错误的迁移信息删除
DSC00046.jpg

  提示已经同步完成
DSC00047.jpg

  同步完成后,正在处理批处理程序
DSC00048.jpg

  用户迁移成功
DSC00049.jpg

DSC00050.jpg

  office365上的用户列表中已没有user03了
DSC00051.jpg

  我们查看user03已成为本地用户
DSC00052.jpg

  最后我们通过本地的服务器访问地址进行登录user03
DSC00053.jpg

  登录成功
DSC00054.jpg

  我们使用user03给user01发送测试邮件
DSC00055.jpg

  再使用user01的本地邮箱给user03发送测试邮件
DSC00056.jpg

  最后我们总结一下,其实迁移用户后,用户属性会发送变化
  如果从本地迁移到office365 onlie上的话 ,会在用户属性多一个targetaddress配置属性
DSC00057.jpg

  用户关联后,我们一般使用的是从office365到本地的用户之间私用的是proxyaddress
DSC00058.jpg

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-535205-1-1.html 上篇帖子: Office 365管理员指引 5 ——Exchange分配角色和权限 下篇帖子: Exchange Server 2013 SP1 系列之:小企业部署邮件服务器
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表