Windows Server Core 2012 - Initial configuration
Problem Definition
After deploying a Minimal Installation of Windows Server 2012 or 2012 R2, a lots of users are disappointed because once Windows session is opened the only available User Interface "UI" is the Command Prompt and you have to perform the initial configuration from this UI.
Solution
The present article details the main DOS commands that you need to know to properly configure your server core 2012
Rename computer
-> hostname : to display the current hostname
-> netdom renamecomputer localhost /NewName:New_NIC_Name
--> Example : **netdom renamecomputer localhost /NewName : PRODSRV01
**
Reset Local Administrator password
-> net user administrator *
**NOTE: You have to type new local administrator password and confirm it
**
Changer NIC name
-> **netsh interface ipv4 show interface **: to display the current NIC name. Name column display the name of each available NIC.
-> netsh interface set interface Name=”current NIC name” NewName=”New NIC name"
--> Example : **netsh interface set interface Name=”Ethernet0” NewName=”Private"
**
Add static IP Address
-> netsh interface ipv4 set address name="NIC name to configure" source=static address=x.y.z.a mask=255.255.255.0 gateway=x.y.z.b
--> Example : netsh interface ipv4 set address name="Private" source=static address=10.150.157.100 mask=255.255.255.0 gateway=10.150.157.1
**
**
Add DNS IP Address
-> netsh interface ipv4 add dnsserver name="NIC name to configure" address=x.y.z..a index=1
--> Example : netsh interface ipv4 add dnsserver name="Private" address=10.150.157.200 index=1
IMPORTANT : If you have multiple DNS servers, re type the same command with index=2 for second DNS server, index=3 for the third DNS server ...Etc.
Configure automatic IP (DHCP)
-> netsh interface ipv4 set address name="NIC Name to configure" source=dhcp
-> netsh interface ipv4 delete dnsserver name="NIC Name to configure" all
--> Example : netsh interface ipv4 set address name="Private" source=dhcp
** netsh interface ipv4 delete dnsserver name="Private" all
**
Join server to domain
-> netdom join localhost /Domain: mydomain.local /userd: Domain\Administrator /passwordd:* /reboot: 5
IMPORTANT: passwordd: * is recommended to prevent the administrator typing a clear password | reboot: 5 to restart server after 5 seconds once joined to the domain | to remove Server Core from a domain-> use remove instead of join.
Windows Activation
-> slmgr –ato : to activate server over Internet
-> slmgr –skms MonServeurKMS :1688 && slmgr –ato : to activate server from internal KMS Server.
-> slmgr MyRemoteServer Administrator **** -ato : to activate remote server named « MyRemoteServer» using Administrator account and **** password
To configure Time Zone
-> timedate.cpl OR control timedate.cpl
To configure regional settings
-> intl.cpl
To allow Remote Desktop Access
-> cscript %windir%\system32\scregedit.wsf /ar 0
To allow Windows RemoteShell
-> winrm quickconfig
To allow Firewall remote management
-> netsh advfirewall set currentprofile settings remotemanagement enable
To allow remote management from MMC console
-> netsh advfirewall firewall set rule group="Administration distante" new enable=yes
To enable Automatic Updates
-> cscript %windir%\system32\scregedit.wsf /au 4
**
**
Hicham KADIRI | Just Another IT Guy