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

[玩转系统] 使用 PowerShell 获取 Exchange 邮箱数据库安装状态

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

使用 PowerShell 获取 Exchange 邮箱数据库安装状态


使用 PowerShell 获取 Exchange 邮箱数据库安装状态。有时您需要了解数据库安装状态。有什么比使用 PowerShell 更好的方法?在本文中,您将学习如何使用 PowerShell 检查数据库安装状态。

获取 Exchange 邮箱数据库安装状态

以管理员身份运行 Exchange 命令行管理程序。我们将根据数据库名称进行排序。

[PS] C:\>Get-MailboxDatabase -Status | Sort Name | Format-Table Name, Server, Mounted

Name Server Mounted
---- ------ -------
DB01 EX01      True
DB02 EX01      True
DB03 EX02      True
DB04 EX02      True
DB05 EX01      True
DB06 EX02      True

所有数据库均安装在 Exchange Server EX01 和 EX02 上。

获取邮箱数据库安装状态,包括旧版 Exchange

如果您的邮箱数据库位于以前的 Exchange 版本中怎么办?使用-IncludePreExchange 开关。我们可以看到,我们有两个邮箱数据库在 Exchange Server 2010 中运行。很高兴知道这一点,因为 Exchange Server 2010 已达到生命周期支持结束。

[PS] C:\>Get-MailboxDatabase -IncludePreExchange -Status | Sort Name | Format-Table Name, Server, Mounted

Name     Server Mounted
----     ------ -------
DB01      EX01      True
DB01-2010 EX01-2010 True
DB02      EX01      True
DB02-2010 EX01-2010 True
DB03      EX02      True
DB04      EX02      True
DB05      EX01      True
DB06      EX02      True

如果您想按服务器名称排序,请运行以下命令。

[PS] C:\>Get-MailboxDatabase -IncludePreExchange -Status | Sort Server | Format-Table Name, Server, Mounted

Name      Server Mounted
----      ------ -------
DB01      EX01      True
DB02      EX01      True
DB05      EX01      True
DB01-2010 EX01-2010 True
DB02-2010 EX01-2010 True
DB04      EX02      True
DB03      EX02      True
DB06      EX02      True

我希望这篇文章能为您提供有用的信息。

了解更多:使用 PowerShell 卸载数据库 Exchange »

结论

在本文中,您了解了如何使用 PowerShell 获取 Exchange 邮箱数据库安装状态。您只需使用 Get-Mailboxdatabase cmdlet 即可获取已安装状态的输出。

您喜欢这篇文章吗?您可能喜欢使用 PowerShell 装载数据库 Exchange。不要忘记关注我们并分享这篇文章。

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

取消回复欢迎 发表评论:

关灯