1.修改计算机名:
netdom renamecomputer  %computername%   /newname:DC1 /force /reboot:5  (数值5表示五秒后,强制重开机)
 
2.设定IP地址
netsh interface ipv4 show interfaces 
netsh interface ipv4 set address name=2 source =static address=192.168.1.152 mask=255.255.255.0 gateway=192.168.1.1
 
3.设定DNS
netsh interface ipv4 add dnsserver name=2 address=192.168.1.151 index=1
 
4.设定时间及时区
control timedate.cpl
 
5.加入域操作
netdom join DC02 /domain:abc.com /userD:administrator  /passwordD:*
shutdown -r -t 0 -f  (加域后重开机)
 
6.查看servercore已安装的组件及添加安装组件命令
oclist
start /w ocsetup WindowServerBackup  (注意组件分大小写)
 
7.开启自动更新
cscript %windir%\system32\scregedit.wsf /au 4
 
8.开启远端桌面及开启防火墙端口设定
cscript %windir%\system32\scregedit.wsf /ar 0
netsh firewall add portopening TCP 3389 "RDP"
 
9.输入安装序列号:
slmgr.vbs /?
slmgr.vbs -ipk  xxxxx-xxxx-xxxxx-xxxxx  (安装产品密钥)
slmgr.vbs -ato  (激活windows)