Server 2008 Server Core commands
> How to configure Windows Server 2008 Server Core
> Configure server roles from command line
When you logon to Server Core, you will see a command prompt only.
Change the Administrator Password
Net user Administrator mypassword
Set IP on Network Interface
Use following command to view all network adapters on the server
Netsh interface ipv4 show interfaces
Note the Idx # of the network adapter you want to configure
Use following command to configure IP of 10.0.1.2/24 on Idx 2.
Netsh interface ipv4 set address name=2 source=static address=10.0.1.2 mask=255.255.255.0 gateway=10.0.1.1
Use following commands to configure DNS server
Netsh interface ipv4 add dnsserver name=2 address=10.0.1.110
Activate the Server
Run Slmgr.vbs –ato
Rename the Server using WMI
wmic computersystem where name="%computername%" rename name="Server1"
Join the Server to the Domain
Netdom join %computername% /domain:domainname /userd:domainadmin /password:domainadminpassword
Adding Server Roles
1. Adding and Configuring the DNS Server Role
use following command to install DNS Server role
Start /w ocsetup DNS-Server-Core-Role
Once the DNS Server Role is installed, you can use DNS MMC from different computer or dnscmd.exe from command line to configure DNS.
2. Adding and Configuring the DHCP Server Role
use following command to install DNS Server role
Start /w ocsetup DHCPServerCore
Once the DHCP Server Role is installed, you can use DHCP MMC from different computer or netsh.exe from command line to configure DHCP.
3. Adding and Configuring the File Services
To install Distributed File System, run
start /w ocsetup DFSN-Server
To install File Replication Service
start /w ocsetup FRS-Infrastructure
To install Distributed File System Replication
start /w ocsetup DFSR-Infrastructure-
ServerEdition
To install Network File System
start /w ocsetup ServerForNFS-Base
start /w ocsetup ClientForNFS-Base
3. Adding and Configuring the Active Directory Domain Services Role
Use following command to install Active Directory role
Dcpromo /unattend:c:\unattend.txt
*you must create c:\unattend.txt using notepad(notepad.exe is built-in to Server Core).
Adding and configuring Features
To install WINS (Windows Internet Name Service)
start /w ocsetup WINS-SC
To install Microsoft Failover Clustering
start /w ocsetup FailoverCluster-Core
To install SNMP (Simple Network Management Protocol)
start /w ocsetup SNMP-SC
To install Windows Backup
start /w ocsetup WindowsServerBackup
To install Multipath IO
start /w ocsetup MultipathIo
To install NLB (Network Load Balancing)
start /w ocsetup NetworkLoadBalancing HeadlessServer
To Install Hyper-V
start /w ocsetup Microsoft-Hyper-V
written by: InfoTechGuyz