1. 程式人生 > >Window Server 2016 Server Core

Window Server 2016 Server Core

server core;windows server 2016

Installing Server Core

當你安裝 Windows Server 2016 時,在 Windows 安裝向導的“Select The Operating System You Want To Install”頁面,其他和 Desktop Experience 安裝一樣。

技術分享

註意:在 Windows Server 2016 中,你不能在安裝操作系統後添加或刪除 GUI 元素,此外,也沒有最小服務器界面選項


運行服務器使用 Server Core 選項的優勢:

  • 節省硬件資源

  • 減少硬盤空間

  • 較少的更新

  • 減少攻擊面


Configuring Server Core

Network configuring

CMD 窗口輸入 Powershell調用 Powershell 會話

技術分享

通過使用 Get-NetAdapter 命令查看接口索引( interface index,簡稱 ifIndex

技術分享

使用 New-NetIPAddress 配置 IP 地址:

技術分享

InterfaceIndex:確認這個計算機要配置的網絡適配器,使用 Get-NetAdapter 命令顯示的索引號

ipaddress:指定要分配給這個網絡適配器的 IP 地址

prefixlength:指定這個網絡適配器的子網掩碼值。這個數指定了網絡中的 IP 地址的數量,例如prefixlength 值是 24,表示子網掩碼值是 255.255.255.0

defaultgateway:指定這個 IP 地址用於計算機訪問其他網絡的本地路由地址


使用 Set-DnsClientServerAddress 配置 DNS 地址

技術分享

ServerAddress指定要分配給這個網絡適配器的 DNS Server 地址。如果有兩個,使用“,”隔開。


Add and Remote Computer for the domain

使用 Add-Computer 對計算機重命名,並加入域

在彈出的窗口,輸入有相關權限的用戶名密碼;

技術分享

domainname:指定你想要將計算機加入域的域名

newname ( Options):指定一個新的計算機名

credential:指定加擁有加入域權限的用戶賬戶


加入域後,你可以使用 shutdown 命令重啟計算機

shutdown /r

使用 Remote-Computer 命令退域:

在彈出的窗口,輸入有相關權限的用戶名密碼,然後選擇 OK;

在 Do you wish to continue ,輸入 Y,並回車;

技術分享

技術分享

Rename Computer

使用 HostName.exe 命令,查看計算機名

然後使用 HostName.exe 命令重命名計算機,並在 Do you want to proceed 輸入 Y,然後回車;

技術分享

Using remote PowerShell

Windows Server 2016Windows遠程管理(WinRM)服務默認是開啟的,所以你可以使用 New-PsSession 命令創建一個遠程 Powershell 會話。

技術分享

一旦你創建好會話,你能使用 Enter-PsSession 命令進行連接,指定剛才你創建的會話 ID

技術分享


結束遠程會話並回到本地 Powershell,運行Exit-PsSession 命令或輸入 exit。(這個會話依然有效,只需要使用 Enter-PsSession 命令重新建立會話就可以了。

終止這個會話,運行 Disconnect-PsSession 命令


一些常規配置,你還可以使用 sconfig 打開 Server Configuration 窗口進行配置

技術分享


本文出自 “雪蘭” 博客,請務必保留此出處http://yupeizhi.blog.51cto.com/3157367/1955871

Window Server 2016 Server Core