安装过Exchange 2007的朋友可能都为安装前做的一系列准备工作为烦难,而这一个问题将继续烦恼到Exchange 2010安装的时候。不然大家可以看下面这个资料:
http://technet.microsoft.com/zh-cn/library/bb691354.aspx
难怪我看到有一些朋友对此大加抱怨。但必须说明的是微软的出发点是好的,这样做的好处很多。比如这样可以为不同的Exchange 服务器角色准备不同的运行环境,把该要的装上,不该要的一律不装。是不是会安全些?运行轻松些?
好了,不过并不是没有办法简单点的,国外有一位MVP Anderson Patricio 帮我们写了一个powershell.用来简化大家的工作。今天就来介绍这个脚本:
1.有什么功能?看看这个PS运行的界面你就知道了:
2.怎么实现的?看下面的代码部分:
clear
write-host
write-host Exchange Server 2010 - Pre-requisites script
write-host Please, select which role you are going to install..
write-host
write-host '1) Hub Transport'
write-host '2) Client Access Server'
write-host '3) Mailbox'
write-host '4) Unified Messaging'
write-host '5) Edge'
write-host '6) Typical (CAS/HUB/Mailbox)'
write-host '7) Client Access and Hub Transport'
write-host
write-host '9) Configure NetTCP Port Sharing service'
write-host '10) Install 2007 Office System Converter: Microsoft Filter Pack - Only if you are installing Hub or Mailbox Server role'
write-host
write-host '13) Restart the computer'
write-host
write-host
write-host "Select an option.. [1-13]? "
$opt = read-host
Import-module ServerManager
switch ($opt)
{
1 { Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server }
2 { Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy }
3 { Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server}
4 { Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Desktop-Experience }
5 { Add-WindowsFeature NET-Framework,RSAT-ADDS,ADLDS }
6 { Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy }
7 { Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy }
9 { Set-Service NetTcpPortSharing -StartupType Automatic }
10 { Write-warning 'Download it from here: http://tinyurl.com/36yrlj'}
13 { restart-computer }
default {write-host "You haven't selected any of the available options. "}
}
3.下载这个脚本?
http://www.5dmail.net/down/SoftList-3487.htm
4.再延伸
看到这个脚本,另一个大牛又改了一下,增加了下载安装Microsoft Filter Pack 的功能,代码如下,如果大家要使用这个脚本,COPY,加存为PS文件就可以了。
Function InstallFilterPack() { #set a var for the folder you are looking for $folderPath = 'C:\Temp' #Check if folder exists, if not, create it if (test-path $folderpath) { Write-Host "The folder $folderPath exists." } else { Write-Host "The folder $folderPath does not exist, it will be created." New-Item $folderpath -type directory | Out-Null } #Download Microsoft Filter Pack Write-Host "Downloading Microsoft Filter Pack..." $clnt = new-object System.Net.WebClient $url = "http://download.microsoft.com/download/b/e/6/be61cfa4-b59e-4f26-a641-5dbf906dee24/FilterPackx64.exe" $file = $folderPath+"\FilterPackx64.exe" $clnt.DownloadFile($url,$file) #Install Microsoft Filter Pack Write-Host "Installing Microsoft Filter Pack..." $expression = $folderPath+"\FilterPackx64.exe /quiet /norestart" Invoke-Expression $expression } clear write-host write-host Exchange Server 2010 - Pre-requisites script write-host Please, select which role you are going to install.. write-host write-host '1) Hub Transport' write-host '2) Client Access Server' write-host '3) Mailbox' write-host '4) Unified Messaging' write-host '5) Edge' write-host '6) Typical (CAS/HUB/Mailbox)' write-host '7) Client Access and Hub Transport' write-host write-host '9) Configure NetTCP Port Sharing service - Only if you are installing Client Access role' write-host '10) Install 2007 Office System Converter: Microsoft Filter Pack - Only if you are installing Hub or Mailbox Server role' write-host write-host '13) Restart the computer' write-host write-host write-host "Select an option.. [1-13]? " $opt = read-host Import-module ServerManager switch ($opt) { 1 { Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server } 2 { Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy } 3 { Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server} 4 { Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Desktop-Experience } 5 { Add-WindowsFeature NET-Framework,RSAT-ADDS,ADLDS } 6 { Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy } 7 { Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy } 9 { Set-Service NetTcpPortSharing -StartupType Automatic } 10 { write-host 'Can this server access internet?' write-host 'Please type (Y)es or (N)o...' $filtpack = read-host switch ($filtpack) { Y {InstallFilterPack} N {Write-warning 'Please download and install Microsoft Filter Pack from here: http://tinyurl.com/36yrlj'} } } 13 { restart-computer } default {write-host "You haven't selected any of the available options. "} }
5.参考资料:
http://msmvps.com/blogs/andersonpatricio/archive/2009/11/13/installing-exchange-server-2010-pre-requisites-on-windows-server-2008-r2.aspx
http://www.bhargavs.com/index.php/exchange-server/exchange-2007-exchange-server/2009/06/how-do-i-check-rollup-update-version-on-exchange-2007-server/