当前位置:网站首页 > 更多 > 玩电脑 > 正文

[玩转系统] 使用 PowerShell 在 Exchange 中配置自动发现 URL

作者:精品下载站 日期:2024-12-14 18:10:51 浏览:14 分类:玩电脑

使用 PowerShell 在 Exchange 中配置自动发现 URL


因此,您希望使用 PowerShell 在 Exchange Server 中配置自动发现 URL。最佳做法是让它指向 autodiscover.company.com。在之前的一篇文章中,我们讨论了如何使用 PowerShell 在 Exchange 中查找自动发现 URL。如果您想获取当前服务器 URL,请阅读文章使用 PowerShell 查找 Exchange Server URL。

注意: 内部自动发现只能使用 Exchange 命令行管理程序进行设置。 Exchange 管理中心没有配置内部自动发现的选项。

检查第三方证书

在继续下一步之前,请确保您已在 Exchange Server 中安装了第三方证书:

  • 如何在 Exchange Server 中创建证书

  • 在 Exchange Server 中安装免费的 Let’s Encrypt 证书

注意:如果在 Exchange Server 中未配置涵盖自动发现 URL 的第三方证书,并且您更改了自动发现 URL,用户将在 Outlook 中收到证书警告。

获取自动发现 URL

让我们获取要更改的 Exchange 服务器上的自动发现 URL。以管理员身份运行 Exchange 命令行管理程序并运行 Get-ClientAccessServer cmdlet。

[PS] C:\>Get-ClientAccessServer | Select Identity, AutoDiscoverServiceInternalUri, AutoDiscoverSiteScope | Format-List


Identity                       : EX01-2016
AutoDiscoverServiceInternalUri : https://ex01-2016.exoip.local/Autodiscover/Autodiscover.xml
AutoDiscoverSiteScope          : {HeadOffice}

Identity                       : EX02-2016
AutoDiscoverServiceInternalUri : https://ex02-2016.exoip.local/Autodiscover/Autodiscover.xml
AutoDiscoverSiteScope          : {BranchOffice}

现在我们有了输出,我们可以继续下一步。我们希望更改 Exchange Server EX01 和 EX02 上的自动发现 URL。

配置自动发现 URL

使用 Set-ClientAccessServer cmdlet 在两台 Exchange 服务器上配置自动发现。之后,使用命令 iisreset 重新启动 IIS。

[PS] C:\>Set-ClientAccessServer -Identity "EX01-2016" -AutodiscoverServiceInternalUri https://autodiscover.exoip.com/Autodiscover/Autodiscover.xml

[PS] C:\>Set-ClientAccessServer -Identity "EX02-2016" -AutodiscoverServiceInternalUri https://autodiscover.exoip.com/Autodiscover/Autodiscover.xml

[PS] C:\>iisreset

Attempting stop...
Internet services successfully stopped
Attempting start...
Internet services successfully restarted

iisreset 和 issreset /noforce 命令之间的区别

建议使用 /noforce 参数作为防止数据丢失的保护措施,以防 IIS 服务无法在一分钟超时期限内全部停止。如果您确定强制 IIS 重新启动是安全的,则可以省略 /noforce 参数。此外,如果您在本地登录,则不需要computername 参数。如果您正在远程管理 IIS 服务器,则 Computername 参数是您希望重新启动 IIS 的计算机的 NetBIOS 名称。

验证自动发现 URL

验证自动发现更改后的结果,一切看起来都很好。

[PS] C:\>Get-ClientAccessServer | Select Identity, AutoDiscoverServiceInternalUri, AutoDiscoverSiteScope | Format-List


Identity                       : EX01-2016
AutoDiscoverServiceInternalUri : https://autodiscover.exoip.com/Autodiscover/Autodiscover.xml
AutoDiscoverSiteScope          : {HeadOffice}

Identity                       : EX02-2016
AutoDiscoverServiceInternalUri : https:/autodiscover.exoip.com/Autodiscover/Autodiscover.xml
AutoDiscoverSiteScope          : {BranchOffice}

添加CNAME记录

关于如何添加和指向自动发现 CNAME 记录有不同的场景:

  • 循环 DNS: 在 autodiscover.exoip.com 的内部 DNS 服务器中添加两条 CNAME 记录。指向 Exchange 服务器 EX01-2016 和 EX02-2016。假设两台 Exchange 服务器都是客户端访问服务器 (CAS)。

  • 负载均衡器:在负载均衡器上创建 VIP。指向 Exchange 服务器 EX01-2016 和 EX02-2016。假设两台 Exchange 服务器都是客户端访问服务器 (CAS)。在内部 DNS 服务器中为 autodiscover.exoip.com 添加 CNAME 记录。指向负载均衡器。

验证 Outlook 中的自动发现

要验证自动发现服务是否适用于 Outlook,请按照下列步骤操作:

  1. 启动Outlook

  2. 按住 CTRL 键并右键单击系统托盘中的 Outlook 图标

  3. 选择测试电子邮件自动配置

  1. 填写电子邮件地址

  2. 选中使用自动发现复选框

  3. 取消选中使用 Guessmart安全 Guessmart 身份验证复选框

  4. 点击测试

  5. 选择日志选项卡

  6. 验证结果成功(0x00000000)

一切看起来都很棒!

阅读更多内容:在 Exchange 中配置内部和外部 URL »

结论

您学习了如何在 Exchange 中配置自动发现 URL。只能使用 Exchange Management Shell/PowerShell 配置内部自动发现。首先,检查自动发现 URL 在 Exchange Server 上的配置方式。第二步是更改自动发现并在更改后重置 IIS。最后,记得添加CNAME记录。

您喜欢这篇文章吗?您可能还喜欢在 Exchange Server 中配置页面文件。不要忘记关注我们并分享这篇文章。

您需要 登录账户 后才能发表评论

取消回复欢迎 发表评论:

关灯