伺服器組建 DVD Exchange 2007 工具安裝命令檔範例
適用版本: Exchange Server 2007 SP3, Exchange Server 2007 SP2, Exchange Server 2007 SP1
上次修改主題的時間: 2008-07-24
本主題提供的範例命令檔,可作為建立 Microsoft Windows Server 工具命令檔的起點,製作組建 DVD 以改善伺服器組建處理程序需要該命令檔。您可以修改下列程序,為組織建立必要的命令檔。
下列範例指令碼必須如指令碼備註所述進行修改,才能在您的特定環境中運作。此指令碼可協助您自動化許多在環境中部署 Exchange 伺服器所需的步驟。
範例命令檔
重要事項: |
---|
這些指令碼是用來說明如何實作自動化步驟的範例。您必須加以修改,以讓指令碼適合您的環境。您必須在實驗室環境中進行各項測試,之後才能嘗試在生產環境中加以運用。 |
開始之前
若要執行下列程序,您使用的帳戶必須是本機 Administrators 群組的成員。
如需管理 Exchange 2007 所需之權限、委派角色及權利的相關資訊,請參閱權限考量。
W2k3toolsinstall.cmd
附註: |
---|
下列程序只適用於 Windows Server 2003 伺服器上的部署。 |
程序
使用記事本建立命令檔,自動化 Exchange 環境中的 Windows Server 2003 支援工具安裝
開啟記事本或其他文字編輯器。
將下列程式碼複製到檔案中,並將此檔案以描述性名稱與 .bat 副檔名加以儲存。建議您將檔案命名為 W2k3toolsinstall.cmd。
#"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" #"!!!!!!! THIS IS NOT A MICROSOFT SUPPORTED SCRIPT. !!!!!!!!" #"!!!!!!! TEST IN A LAB FOR DESIRED OUTCOME !!!!!!!!" #"!!!!!!! !!!!!!!!!!" #"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" #" " @echo off if "%1"=="" goto syntax if "%1"=="%1\" goto syntax set CDROMPATH=%1 goto tools_directory :tools_directory echo. Deleting Previous Versions of Support Tools (if installed)... if exist c:\tools (call rd c:\tools /q /s) if not exist c:\tools (call md c:\tools) if not exist c:\tools\Debugging (call md c:\tools\Debugging) goto debug_tools :debug_tools echo. Installing Windows Debugging Tools... xcopy %cdrompath%\support\DebuggingTools C:\Tools\Debugging /i /e cscript.exe debuginstall.vbs regedit /s debug.reg goto end :syntax @echo SYNTAX: toolsinstall.cmd [CD-ROM Drive Letter] @echo CD EXAMPLE: w2k3toolsinstall.cmd R: @echo SHARE EXAMPLE: w2k3toolsinstall.cmd F:\E2K7ConfigCD :end @echo Finished installing Support Tools! pause
W2k8toolsinstall.cmd
附註: |
---|
下列程序只適用於 Windows Server 2008 伺服器上的部署。 |
程序
使用記事本建立命令檔,自動化 Exchange 環境中的 Windows Server 2008 支援工具安裝
開啟記事本或其他文字編輯器。
將下列程式碼複製到檔案中,並將此檔案以描述性名稱與 .bat 副檔名加以儲存。建議您將檔案命名為 W2k8toolsinstall.cmd。
#"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" #"!!!!!!! THIS IS NOT A MICROSOFT SUPPORTED SCRIPT. !!!!!!!!" #"!!!!!!! TEST IN A LAB FOR DESIRED OUTCOME !!!!!!!!" #"!!!!!!! !!!!!!!!!!" #"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" #" " @echo off if "%1"=="" goto syntax if "%1"=="%1\" goto syntax set CDROMPATH=%1 goto tools_directory :tools_directory echo. Deleting Previous Versions of Support Tools (if installed)... if exist c:\tools (call rd c:\tools /q /s) if not exist c:\tools (call md c:\tools) if not exist c:\tools\Debugging (call md c:\tools\Debugging) goto debug_tools :debug_tools echo. Installing Windows Debugging Tools... xcopy %cdrompath%\support\DebuggingTools C:\Tools\Debugging /i /e cscript.exe debuginstall.vbs goto end :syntax @echo SYNTAX: toolsinstall.cmd [CD-ROM Drive Letter] @echo CD EXAMPLE: w2k8toolsinstall.cmd R: @echo SHARE EXAMPLE: w2k8toolsinstall.cmd F:\E2K7ConfigCD :end @echo Finished installing Support Tools! pause
相關資訊
如需建立組態 DVD 或伺服器安裝自動化檔案的相關資訊,請參閱如何建立組態 DVD 和自動化檔案。