Share via


scwcmd register

適用於:Windows Server 2022、Windows Server 2019、Windows Server 2012 R2 和 Windows Server 2012。

註冊包含角色、工作、服務或連接埠定義的安全性設定資料庫檔案,以擴充或自訂安全性設定精靈 (SCW) 安全性設定資料庫。

語法

scwcmd register /kbname:<MyApp> [/kbfile:<kb.xml>] [/kb:<path>] [/d]

參數

參數 描述
/kbname:<MyApp> 指定要註冊安全性設定資料庫延伸模組的名稱。 必須指定此參數。
/kbfile:<kb.xml> 指定用來擴充或自訂基底安全性設定資料庫之安全性設定資料庫檔案的路徑和檔名。 若要驗證安全性設定資料庫檔案是否符合 SCW 結構描述,請使用 %windir%\security\KBRegistrationInfo.xsd 結構描述定義檔。 除非指定 /d 參數,否則必須提供此選項。
/kb:<path> 指定包含要更新之 SCW 安全性設定資料庫檔案的目錄路徑。 如果未指定這個選項,則會使用 %windir%\security\msscw\kbs
/d 從安全性設定資料庫取消註冊安全性設定資料庫延伸模組。 取消註冊的延伸模組是由 /kbname 參數所指定。 (不應該指定 /kbfile 參數。) 要取消註冊延伸模組的安全性設定資料庫是由 /kb 參數所指定。
/? 在命令提示字元顯示說明。

範例

若要註冊在位置 \\kbserver\kb 中名稱 MyApp 底下名為 SCWKBForMyApp.xml 的安全性設定資料庫檔案,請輸入:

scwcmd register /kbfile:d:\SCWKBForMyApp.xml /kbname:MyApp /kb:\\kbserver\kb

若要取消註冊位於 \\kbserver\kb 的安全性設定資料庫 MyApp,請輸入:

scwcmd register /d /kbname:MyApp /kb:\\kbserver\kb