bootcfg ems

適用於:Windows Server 2022、Windows Server 2019、Windows Server 2016、Windows Server 2012 R2、Windows Server 2012

可讓使用者新增或變更緊急管理服務控制台重新導向至遠端電腦的設定。 啟用緊急管理服務,將 redirect=Port# 一行新增至 Boot.ini 檔案的 [boot loader] 區段,並新增 /redirect 選項至指定的作業系統項目行。 緊急管理服務功能只會在伺服器上啟用。

語法

bootcfg /ems {on | off | edit}[/s <computer> [/u <domain>\<user> /p <password>]] [/port {COM1 | COM2 | COM3 | COM4 | BIOSSET}] [/baud {9600 | 19200 | 38400 | 57600 | 115200}] [/id <osentrylinenum>]

參數

參數 描述
{on | off | edit} 指定緊急管理服務重新導向的值,包括:
  • 開啟。 啟用指定 <osentrylinenum> 的遠端輸出。 同時將 /redirect 選項新增至指定的 <osentrylinenum>,並將 redirect=com<X> 設定新增至 [boot loader] 區段。 com<X> 的值是由 /port 參數所設定。
  • 關閉朗讀程式。 停用遠端電腦的輸出。 此外,也會從 [boot loader] 區段移除指定的 <osentrylinenum>redirect=com<X> 設定的 /redirect 選項。
  • edit。 允許透過變更 [boot loader] 區段中的 redirect=com<X> 設定,來變更連接埠設定。 com<X> 的值是由 /port 參數所設定。
/s <computer> 指定遠端電腦的名稱或 IP 位址 (請勿使用反斜線)。 預設是本機電腦。
/u <domain>\<user> 使用 <user>or<domain>\<user> 指定的使用者的帳戶權限執行行該命令。 預設值為發出命令之電腦上的目前已登入使用者權限。
/p <password> 指定 /u 參數中指定的使用者帳戶密碼。
/port {COM1 | COM2 | COM3 | COM4 | BIOSSET} 指定要用於重新導向的 COM 連接埠。 BIOSSET 參數會指示緊急管理服務取得 BIOS 設定,以判斷應該用於重新導向的連接埠。 如果遠端管理的輸出已停用,請勿使用此參數。
/baud {9600 | 19200 | 38400 | 57600 | 115200} 指定要用於重新導向的傳輸速率。 如果遠端管理的輸出已停用,請勿使用此參數。
/id <osentrylinenum> 在 Boot.ini 檔案的 [operating system] 區段中指定新增緊急管理服務選項的作業系統項目行號。 [operating system] 區段標頭後面的第一行是 1。 當緊急管理服務值設定為 onoff 時,需要此參數。
/? 在命令提示字元顯示說明。

範例

若要使用 bootcfg /ems 命令:

bootcfg /ems on /port com1 /baud 19200 /id 2
bootcfg /ems on /port biosset /id 3
bootcfg /s srvmain /ems off /id 2
bootcfg /ems edit /port com2 /baud 115200
bootcfg /s srvmain /u maindom\hiropln /p p@ssW23 /ems off /id 2