Share via


bootcfg delete

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

刪除 Boot.ini 檔案 [operating system] 區段中的作業系統項目。

語法

bootcfg /delete [/s <computer> [/u <domain>\<user> /p <password>]] [/id <osentrylinenum>]

參數

參數 描述
/s <computer> 指定遠端電腦的名稱或 IP 位址 (請勿使用反斜線)。 預設是本機電腦。
/u <domain>\<user> 使用 <user>or<domain>\<user> 指定的使用者的帳戶權限執行行該命令。 預設值為發出命令之電腦上的目前已登入使用者權限。
/p <password> 指定 /u 參數中指定的使用者帳戶密碼。
/id <osentrylinenum> 指定 Boot.ini 檔案的 [operating systems] 區段中新增作業系統載入選項的作業系統項目行號。 [operating system] 區段標頭後面的第一行是 1。
/? 在命令提示字元顯示說明。

範例

若要使用 bootcfg /delete 命令:

bootcfg /delete /id 1
bootcfg /delete /s srvmain /u maindom\hiropln /p p@ssW23 /id 3