我创建了一个 PowerShell 函数来检索 Exchange 2007、2010 和 2013 的正确版本信息。我的博客文章包括代码和一些使用示例。由于该函数超过 200 行,我将不在这里包含它。以下是该函数的一些示例用法和输出:
获取单个服务器的已安装更新(累积和更新汇总)
[PS] Get-ExchangeServerPlus -cn exch01 | select -ExpandProperty update | ft inst*,upd*,desc* -AutoSize
InstallDate UpdateBuild Description
----------- ----------- -----------
11/11/2012 8.3.279.5 Update Rollup 8-v2 for Exchange Server 2007 Service Pack 3 (KB2756497)
02/18/2013 8.3.298.3 Update Rollup 10 for Exchange Server 2007 Service Pack 3 (KB2788321)
输出所有已安装更新的 Exchange Server 对象属性
Get-ExchangeServerPlus | % {"Name`t: $($_.Name)"; "Version`t: $($_.Version)"; "Edition`t: $($_.Edition)"; "Build`t: $($_.Build)"; "Role`t: $($_.Role)"; "OSVer`t: $($_.OSVer)"; "OSSP`t: $($_.OSSP)"; "OSArch`t: $($_.OSArch)"; if ($_.Update) { $_ | select -ExpandProperty update | ft inst*,upd*,desc* -auto } else { [Environment]::NewLine }}
...
Name : EXCH160-02
Version : 2013
Edition : Enterprise
Build : 15.0.620.29
Role : MB,CAS
OSVer : Microsoft Windows Server 2012 Datacenter
OSSP : 0
OSArch : 64-bit
InstallDate UpdateBuild Description
----------- ----------- -----------
04/21/2013 15.0.620.29 Microsoft Exchange Server 2013 Cumulative Update 1
...