bootcfg ems

适用范围:Windows Server 2022、Windows Server 2019、Windows Server 2016、Windows Server 2012 R2、Windows Server 2012

使用户能够添加或更改用于将紧急管理服务控制台重定向到远程计算机的设置。 启用紧急管理服务时,向 Boot.ini 文件的 [boot loader] 部分添加 redirect=Port# 行,并将 /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 参数设置。
  • off。 禁用远程计算机输出。 此外,从指定的 <osentrylinenum> 移除 /redirect 选项,并从 [boot loader] 部分移除 redirect=com<X> 设置。
  • edit。 允许通过更改 [boot loader] 部分中的 redirect=com<X> 设置来更改端口设置。 com<X> 的值由 /port 参数设置。
/s <computer> 指定远程计算机的名称或 IP 地址(请勿使用反斜杠)。 默认为本地计算机。
/u <domain>\<user> 使用由 <user><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 systems] 部分中添加紧急管理服务选项的操作系统入口行号。 [operating systems] 节标题后面的第一行是 1。 当紧急管理服务值设置为 on 或 off 时,此参数是必需的。
/? 在命令提示符下显示帮助。

示例

使用 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