使用 Sconfig.cmd 在 Windows Server 的 Server Core 安裝中設定Configure a Server Core installation of Windows Server 2016 or Windows Server, version 1709, with Sconfig.cmd

適用於:Windows Server (半年度管道) 和 Windows Server 2016Applies To: Windows Server (Semi-Annual Channel) and Windows Server 2016

在 Windows Server 2016 和 Windows Server 版本 1709 中,您可以使用伺服器設定工具 (Sconfig.cmd) 來設定和管理 Server Core 安裝的數個常用部分。In Windows Server 2016 and Windows Server, version 1709, you can use the Server Configuration tool (Sconfig.cmd) to configure and manage several common aspects of Server Core installations. 您必須是 Administrators 群組的成員才能使用此工具。You must be a member of the Administrators group to use the tool.

您可以在 Server Core 安裝以及含有桌面體驗的伺服器安裝 (僅限 Windows Server 2016) 中使用 Sconfig.cmd。You can use Sconfig.cmd in Server Core and Server with Desktop Experience (Windows Server 2016 only) installations.

啟動伺服器設定工具Start the Server Configuration Tool

  1. 變更到系統磁碟機。Change to the system drive.

  2. 輸入 Sconfig.cmd,然後按下 ENTER。Type Sconfig.cmd, and then press ENTER. 伺服器設定工具介面便會開啟:The Server Configuration tool interface opens:

    Screenshot of Sconfig.cmd user interface
    Sconfig.cmd 使用者介面的螢幕擷取畫面Screenshot of Sconfig.cmd user interface

網域/工作群組設定 Domain/Workgroup settings

目前的 [網域/工作群組] 設定會顯示在預設的伺服器設定工具畫面。The current Domain/Workgroup settings are displayed in the default Server Configuration tool screen. 若要加入網域或工作群組,您可以從主功能表存取 [網域/工作群組] 設定頁面,然後遵循下列頁面上的指示提供所有必要資訊。You can join a domain or a workgroup by accessing the Domain/Workgroup settings page from the main menu and following the instructions on the following pages, supplying any required information.

如果尚未將網域使用者新增到本機 Administrators 群組,您將無法使用網域使用者進行系統變更 (例如變更電腦名稱)。If a domain user has not been added to the local administrators group, you will not be able to make system changes, such as changing the computer name, by using the domain user. 若要將網域使用者新增到本機 Administrators 群組,請允許電腦重新啟動。To add a domain user to the local administrators group, allow the computer to restart. 接著,以本機系統管理員的身分登入電腦,然後依照本文件稍後本機系統管理員設定一節中的步驟進行。Next, log on to the computer as the local administrator and follow the steps in the Local administrator settings section later in this document.

注意

您需要重新啟動伺服器,才能將所有變更套用到網域或工作群組成員資格。You are required to restart the server to apply any changes to domain or workgroup membership. 不過,您可以在所有變更之後進行額外的變更,然後再重新啟動伺服器,避免需要重新啟動伺服器數次。However, you can make additional changes and restart the server after all of the changes to avoid the need to restart the server multiple times. 根據預設,重新啟動 Hyper-V 伺服器之前,會自動儲存執行中的虛擬機器。By default, running virtual machines are automatically saved prior to restarting the Hyper-V Server.

電腦名稱設定Computer name settings

目前的電腦名稱會顯示在預設的伺服器設定工具畫面。The current computer name is displayed in the default Server Configuration Tool screen. 您可以從主功能表存取 [電腦名稱] 設定頁面並遵循指示進行,以變更電腦名稱。You can change the computer name by accessing the “Computer Name” settings page from the main menu and following the instructions.

注意

您需要重新啟動伺服器,才能將所有變更套用到網域或工作群組成員資格。You are required to restart the server to apply any changes to domain or workgroup membership. 不過,您可以在所有變更之後進行額外的變更,然後再重新啟動伺服器,避免需要重新啟動伺服器數次。However, you can make additional changes and restart the server after all of the changes to avoid the need to restart the server multiple times. 根據預設,重新啟動 Hyper-V 伺服器之前,會自動儲存執行中的虛擬機器。By default, running virtual machines are automatically saved prior to restarting the Hyper-V Server.

本機系統管理員設定 Local administrator settings

若要將其他使用者新增到本機 Administrators 群組,請使用主功能表上的 [新增本機系統管理員] 選項。To add additional users to the local administrators group, use the Add Local Administrator option on the main menu. 在加入網域的電腦上,以下列格式輸入使用者:網域\使用者名稱。On a domain joined machine, enter the user in the following format: domain\username. 在未加入網域的電腦 (工作群組機器) 上,僅輸入使用者名稱。On a non-domain joined machine (workgroup machine), enter only the user name. 這些變更會立即生效。The changes take effect immediately.

網路設定Network settings

您可以設定由 DHCP 伺服器自動指派 IP 位址,或者您可以手動指派靜態 IP 位址。You can configure the IP address to be assigned automatically by a DHCP Server or you can assign a static IP address manually. 這個選項也可讓您設定伺服器的 DNS 伺服器設定。This option allows you to configure DNS Server settings for the server as well.

注意

這些選項及其他更多選項現在可以使用網路 Windows PowerShell Cmdlet 取得。These options and many more are now available using the Networking Windows PowerShell cmdlets. 如需詳細資訊,請參閱 WindowsServer 文件庫中的網路介面卡 CmdletFor more information, see Network Adapter Cmdlets in the Windows Server Library.

Windows Update 設定Windows Update settings

目前的 Windows Update 設定會顯示在預設的伺服器設定工具畫面。The current Windows Update settings are displayed in the default Server Configuration Tool screen. 您可以在主功能表的 [Windows Update 設定] 設定選項上,將伺服器設定為使用 [自動] 或 [手動] 更新。You can configure the server to use Automatic or Manual updates on the Windows Update Settings configuration option on the main menu.

選取 [自動更新] 時,系統會在每天凌晨三點檢查並安裝更新。When Automatic Updates are selected, the system will check for and install updates every day at 3:00 AM. 這些設定會立即生效。The settings take effect immediately. 選取 [手動] 更新時,系統將不會自動檢查更新。When Manual updates are selected, the system will not check for updates automatically.

您可以從主功能表的 [下載並安裝更新] 選項,隨時下載和安裝適用的更新。At any time, you can download and install applicable updates from the Download and Install Updates option on the main menu.

[僅下載] 選項將會掃描並下載任何可用的更新,然後在準備好開始安裝時,透過控制中心通知您。The Download Only option will scan for updates, download any that are available, and then notify you in the Action Center that they are ready for installation. 此為預設選項。This is default option.

遠端桌面設定Remote Desktop settings

目前的遠端桌面設定狀態會顯示在預設的伺服器設定工具畫面。The current status of remote desktop settings is displayed in the default Server Configuration Tool screen. 若要設定下列遠端桌面設定,您可以存取 [遠端桌面] 主功能表選項,並依照畫面上的指示進行。You can configure the following Remote Desktop settings by accessing the Remote Desktop main menu option and following the instructions on screen.

  • 使用網路層級驗證,針對執行遠端桌面的用戶端啟用遠端桌面Enable Remote Desktop for Clients running Remote Desktop with Network Level Authentication

  • 針對執行任何版本遠端桌面的用戶端啟用遠端桌面Enable Remote Desktop for clients running any version of Remote Desktop

  • 停用遠端Disable Remote

日期和時間設定Date and time settings

您可以存取 [日期和時間] 主功能表選項,以存取及變更日期和時間設定You can access and change date and time settings by accessing the Date and Time main menu option

遙測設定Telemetry settings

此選項可讓您設定要傳送哪些資料給 Microsoft。This option lets you configure what data is sent to Microsoft.

Windows 啟用設定Windows Activation settings

此選項可讓您設定 Windows 啟用。This option lets you configure Windows Activation.

若要啟用遠端管理To enable remote management

您可以從 [設定遠端管理] 主功能表選項,啟用各種遠端管理狀況:You can enable various remote management scenarios from the Configure Remote Management main menu option:

  • Microsoft Management Console 遠端管理Microsoft Management Console remote management
  • Windows PowerShellWindows PowerShell
  • 伺服器管理員Server Manager

登出、重新啟動或關閉伺服器To log off, restart, or shut down the server

若要登出、重新啟動或關閉伺服器,請從主功能表存取對應的功能表項目。To log off, restart, or shut down the server, access the corresponding menu item from the main menu. 這些選項也可從 [Windows 安全性] 功能表取得,隨時按下 CTRL+ALT+DEL,就可以從任何應用程式存取該功能表。These options are also available from the Windows Security menu which can be accessed from any application at any time by pressing CTRL+ALT+DEL.

結束並返回命令列To exit to the command line

選取 [結束並返回命令列] 選項,然後按 ENTER 以結束並返回命令列。Select the Exit to the Command Line option and press ENTER to exit to the command line. 若要返回伺服器設定工具,請輸入 Sconfig.cmd,然後按 ENTERTo return to the Server Configuration Tool, type Sconfig.cmd, and then press ENTER