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

[玩转系统] 在 Exchange Server 中重新创建虚拟目录

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

在 Exchange Server 中重新创建虚拟目录


今天的文章将展示如何在 Exchange Server 中重新创建虚拟目录。安装 Exchange Server 并查看 IIS 管理器后,我们可以看到配置了两个站点。这是默认网站Exchange 后端。如果出现问题并且您想重置 Exchange Server 中的虚拟目录,那么您来对地方了。阅读有关如何在 Exchange Server 中重新创建虚拟目录的更多信息。

查找和管理 Exchange Server 中的虚拟目录

要查找和管理虚拟目录,您可以使用:

  • IIS管理器

  • 交换管理外壳 (EMS)

  • Exchange 管理中心 (EAC)

为什么要重新创建 Exchange 虚拟目录

有时你必须从头开始,这可以解决大多数问题。例如:

  • 权限问题

  • 黑屏

  • 丢失文件

  • 连接问题

  • 页面错误

重新创建 Exchange 虚拟目录默认网站

启动Internet 信息服务(IIS) 6.0 管理器。 Exchange Server 安装会创建两个网站:

  • 默认网站

  • 交换后端

[玩转系统] 在 Exchange Server 中重新创建虚拟目录

要在 IIS 中重新创建虚拟目录,我们将使用 PowerShell。我们将:

  1. 获取虚拟目录

  2. 删除虚拟目录

  3. 创建虚拟目录

虚拟目录按字母顺序列出:

ActiveSyncVirtualDirectory

微软服务器ActiveSync

AutodiscoverVirtualDirectory

自动发现

EcpVirtualDirectory

ECP

MapiVirtualDirectory

马皮

OABVirtualDirectory

OAB

OwaVirtualDirectory

奥瓦

PowerShellVirtualDirectory

电源外壳

WebServicesVirtualDirectory

环境预警系统

在我们的示例中,我们将重置 Exchange Server EX01-2016 上的虚拟目录。内部和外部 URL 为 https://mail.exoip.com。我们建议将内部和外部 URL 配置为通用命名空间。

了解更多:Exchange 命名空间设计和规划 »

重新创建 ActiveSyncVirtualDirectory

以管理员身份运行 Exchange 命令行管理程序。重新创建 Microsoft-Server-ActiveSync 虚拟目录。

[PS] C:\>Get-ActiveSyncVirtualDirectory -Server "EX01-2016" | Format-List Server, Name, Identity, InternalUrl, ExternalUrl


Server      : EX01-2016
Name        : Microsoft-Server-ActiveSync (Default Web Site)
Identity    : EX01-2016\Microsoft-Server-ActiveSync (Default Web Site)
InternalUrl : https://mail.exoip.com/Microsoft-Server-ActiveSync
ExternalUrl : https://mail.exoip.com/Microsoft-Server-ActiveSync


[PS] C:\>Remove-ActiveSyncVirtualDirectory -Identity "EX01-2016\Microsoft-Server-ActiveSync (Default Web Site)" -Confirm:$false


[PS] C:\>New-ActiveSyncVirtualDirectory -Server "EX01-2016" -InternalUrl "https://mail.exoip.com/Microsoft-Server-ActiveSync" -ExternalUrl "https://mail.exoip.com/Microsoft-Server-ActiveSync"

Name                                           Server    InternalUrl
----                                           ------    -----------
Microsoft-Server-ActiveSync (Default Web Site) EX01-2016 https://mail.exoip.com/Microsoft-Server-ActiveSync

注意:创建 Exchange 虚拟目录时是否遇到错误?阅读文章创建 IIS 虚拟目录时出错。

重新创建自动发现虚拟目录

重新创建自动发现虚拟目录。

[PS] C:\>Get-AutodiscoverVirtualDirectory -Server "EX01-2016" | Format-List Server, Name, Identity


Server   : EX01-2016
Name     : Autodiscover (Default Web Site)
Identity : EX01-2016\Autodiscover (Default Web Site)


[PS] C:\>Remove-AutodiscoverVirtualDirectory -Identity "EX01-2016\Autodiscover (Default Web Site)" -Confirm:$false


[PS] C:\>New-AutodiscoverVirtualDirectory -Server "EX01-2016" -BasicAuthentication $true -WindowsAuthentication $true

Name                            Server    InternalUrl
----                            ------    -----------
Autodiscover (Default Web Site) EX01-2016


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

了解有关 Exchange Server 中自动发现的更多信息:

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

  • 使用 PowerShell 在 Exchange 中查找自动发现 URL

重新创建 EcpVirtualDirectory

重新创建ecp虚拟目录。

[PS] C:\>Get-EcpVirtualDirectory -Server "EX01-2016" | Format-List Server, Name, InternalUrl, ExternalUrl, Identity


Server      : EX01-2016
Name        : ecp (Default Web Site)
InternalUrl : https://mail.exoip.com/ecp
ExternalUrl : https://mail.exoip.com/ecp
Identity    : EX01-2016\ecp (Default Web Site)


[PS] C:\>Remove-EcpVirtualDirectory -Identity "EX01-2016\ecp (Default Web Site)" -Confirm:$false


[PS] C:\>New-EcpVirtualDirectory -Server "EX01-2016" -InternalUrl "https://mail.exoip.com/ecp" -ExternalUrl "https://mail.exoip.com/ecp"

Name                   Server
----                   ------
ecp (Default Web Site) EX01-2016

重新创建 MapiVirtualDirectory

重新创建mapi虚拟目录。

[PS] C:\>Get-MapiVirtualDirectory -Server "EX01-2016" | Format-List Server, Name, InternalUrl, ExternalUrl, Identity


Server      : EX01-2016
Name        : mapi (Default Web Site)
InternalUrl : https://mail.exoip.com/mapi
ExternalUrl : https://mail.exoip.com/mapi
Identity    : EX01-2016\mapi (Default Web Site)


[PS] C:\>Remove-MapiVirtualDirectory -Identity "EX01-2016\mapi (Default Web Site)" -Confirm:$false


[PS] C:\>New-MapiVirtualDirectory -Server "EX01-2016" -InternalUrl https://mail.exoip.com/mapi -ExternalUrl https://mail.exoip.com/mapi -IISAuthenticationMethods Ntlm, OAuth, Negotiate

Name                    Server    InternalUrl                 ExternalUrl
----                    ------    -----------                 -----------
mapi (Default Web Site) EX01-2016 https://mail.exoip.com/mapi https://mail.exoip.com/mapi

重新创建 OAB 虚拟目录

重新创建OAB虚拟目录。

[PS] C:\>Get-OabVirtualDirectory -Server "EX01-2016" | Format-List Server, Name, InternalUrl, ExternalUrl, Identity


Server      : EX01-2016
Name        : OAB (Default Web Site)
InternalUrl : https://mail.exoip.com/OAB
ExternalUrl : https://mail.exoip.com/OAB
Identity    : EX01-2016\OAB (Default Web Site)


[PS] C:\>Remove-OabVirtualDirectory -Identity "EX01-2016\OAB (Default Web Site)" -Confirm:$false -Force


[PS] C:\>New-OabVirtualDirectory -Server "EX01-2016" -InternalUrl "https://mail.exoip.com/OAB" -ExternalUrl "https://mail.exoip.com/OAB"
Server    Name                   Internal Url               External Url
------    ----                   ------------               ------------
EX01-2016 OAB (Default Web Site) https://mail.exoip.com/OAB https://mail.exoip.com/OAB

重新创建 OwaVirtualDirectory

重新创建 owa 虚拟目录。

[PS] C:\>Get-OwaVirtualDirectory -Server "EX01-2016" | Format-List Server, Name, InternalUrl, ExternalUrl, Identity


Server      : EX01-2016
Name        : owa (Default Web Site)
InternalUrl : https://mail.exoip.com/owa
ExternalUrl : https://mail.exoip.com/owa
Identity    : EX01-2016\owa (Default Web Site)


[PS] C:\>Remove-OwaVirtualDirectory -Identity "EX01-2016\owa (Default Web Site)" -Confirm:$false


[PS] C:\>New-OwaVirtualDirectory -Server "EX01-2016" -InternalUrl "https://mail.exoip.com/owa" -ExternalUrl "https://mail.exoip.com/owa"

Name                   Server    OwaVersion
----                   ------    ----------
owa (Default Web Site) EX01-2016 Exchange2013

重新创建 PowerShell 虚拟目录

重新创建 PowerShell 虚拟目录。

您必须打开 PowerShell 或 PowerShell ISE 并运行以下 cmdlet。这是因为如果您处于会话 (Exchange Management Shell) 中,则无法重新创建 PowerShell 虚拟目录。第一个 cmdlet 将加载 Microsoft Exchange Management Powershell 管理单元。

PS C:\> Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn


PS C:\> Get-PowerShellVirtualDirectory -Server "EX01-2016" | Format-List Server, Name, InternalUrl, Externalurl, Identity


Server      : EX01-2016
Name        : Powershell (Default Web Site)
InternalUrl : https://mail.exoip.com/PowerShell
ExternalUrl : https://mail.exoip.com/PowerShell
Identity    : EX01-2016\Powershell (Default Web Site)


PS C:\> Remove-PowerShellVirtualDirectory -Identity "EX01-2016\PowerShell (Default Web Site)" -Confirm:$false


PS C:\> New-PowerShellVirtualDirectory -Server "EX01-2016" -Name Powershell -InternalUrl https://mail.exoip.com/PowerShell -ExternalUrl https://mail.exoip.com/PowerShell -RequireSSL:$false

Name                          Server
----                          ------
Powershell (Default Web Site) EX01-2016

重新创建 WebServicesVirtualDirectory

重新创建 EWS 虚拟目录。

[PS] C:\>Get-WebServicesVirtualDirectory -Server "EX01-2016" | Format-List Server, Name, InternalUrl, ExternalUrl, Identity


Server      : EX01-2016
Name        : EWS (Default Web Site)
InternalUrl : https://mail.exoip.com/EWS/Exchange.asmx
ExternalUrl : https://mail.exoip.com/EWS/Exchange.asmx
Identity    : EX01-2016\EWS (Default Web Site)


[PS] C:\>Remove-WebServicesVirtualDirectory -Identity "EX01-2016\EWS (Default Web Site)" -Confirm:$false -Force
WARNING: Outlook Web App won't function correctly if you remove the Exchange Web Services virtual directory "EX01-2016\EWS (Default Web Site)". To disable Exchange Web Services without blocking access to Outlook Web
App, you can use "Set-CASMailbox -Identity <user> -EwsEnabled:$false" or "Set-OrganizationConfig -Identity <org> -EwsEnabled:$false".


[[PS] C:\>New-WebServicesVirtualDirectory -Server "EX01-2016" -InternalUrl "https://mail.exoip.com/EWS/Exchange.asmx" -ExternalUrl "https://mail.exoip.com/EWS/Exchange.asmx"

Name                   Server    InternalUrl
----                   ------    -----------
EWS (Default Web Site) EX01-2016 https://mail.exoip.com/EWS/Exchange.asmx

重新启动 IIS 或重新启动 Exchange Server。

验证 Exchange 管理中心中的虚拟目录

启动您喜欢的浏览器并登录到 Exchange Server 管理中心 (EAC)。本地主机链接是https://localhost/ecp。接下来,导航到服务器 > 虚拟目录,然后选择您在其上重新创建虚拟目录的服务器

[玩转系统] 在 Exchange Server 中重新创建虚拟目录

Exchange 虚拟目录已重新创建并成功显示。对你有用吗?

继续阅读:在 Exchange Server 中重新创建仲裁邮箱 »

结论

您学习了如何在 Exchange Server 中重新创建虚拟目录。我们确实使用 PowerShell 重置了 Exchange 虚拟目录。这些 cmdlet 会获取虚拟目录、删除虚拟目录,最后创建虚拟目录。最好检查 Exchange 管理中心中的虚拟目录以验证它们是否已创建。

您喜欢这篇文章吗?您可能还喜欢在 Exchange Server 中重新创建审核日志邮箱。不要忘记关注我们并分享这篇文章。

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

取消回复欢迎 发表评论:

关灯