Basic configuration of Windows Server 2008 core via CLI commands

To set the server with a static IP address

1. At a command prompt, type the following:

netsh interface ipv4 show interfaces

2. Look at the number shown in the Idx column of the output for your network adapter. If your computer has more than one network adapter, make a note of the number corresponding to the network adapter for which you wish to set a static IP address.

3. Type the following

netsh interface ipv4 set address name="<ID>" source=static address=<StaticIP> mask=<SubnetMask> gateway=<DefaultGateway>

netsh interface ipv4 add dnsserver name="<ID>" address=<DNSIP> index=1

To set the administrative password in Windows Server 2008

1. Type the following at the command prompt:

net user administrator *

2. When prompted to enter the password, type the new password for the administrator user account and press ENTER

3. When prompted, retype the password and press ENTER.

To change the name of the server

1. Determine the current name of the server with the hostname or ipconfig /all commands.

2. Type the following at the command prompt:

netdom renamecomputer <ComputerName> /NewName:<NewComputerName>

3. Restart the computer by typing the following at a command prompt: shutdown /r /t 0

Add or Remove a user to the local Administrators group

net localgroup Administrators /add [domain]\[username]

net localgroup Administrators /delete [domain]\[username]

To manage a server running a Server Core installation by using the Windows Remote Shell

1. To enable Windows Remote Shell on a server running a Server Core installation, type the following command at a command prompt:

WinRM quickconfig

2. Click Y to accept the default settings. Note: The WinRM quickconfig setting enables a server running a Server Core installation to accept Windows Remote Shell connections.

3. On the remote computer, at a command prompt, use WinRS.exe to run commands on a server running a Server Core installation. For example, to perform a directory listing of the Windows folder, type:

winrs -r:<ServerName> cmd

To activate the server, at a command prompt, type:

slmgr.vbs –ato

If activation is successful, no message will return in the command prompt. To activate the server remotely type the following at the command prompt:

cscript slmgr.vbs -ato <servername> <username> <password>

Retrieve the GUID of the computer by typing:

cscript slmgr.vbs -did

Verify that License status is set to Licensed (activated).

cscript slmgr.vbs -dli <GUID>

To join or remove a Windows 2008 server to a domain, at a command prompt, type:

netdom join <ComputerName> /domain:<DomainName> /userd:<UserName> /passwordd:*

netdom remove <ComputerName> /Domain:<DomainName>

Restart the server to complete the operation

Enable ICMP Replies (via local Command Prompt)

1. On your Server Core machine, at a command prompt, type the following

netsh firewall set icmpsetting 8

2. You can always run the following command in order to disable this option:

netsh firewall set icmpsetting 8 disable

Enable ICMP Replies (via Windows Firewall Management Snap-in from a remote computer)

1. You will first have to enable the Server Core server to allow remote Windows firewall Management connections. To do so, please follow the steps outlined below.

2. After performing the below steps, you will be able to enable or disable any Firewall rule from the remote snap-in.

3. In order to enable ICMP Echo Replies from the Server Core server, allowing the administrators to test for connectivity issues with the server, go to Inbound Rules.

4. In the results pane scroll down till you find File and Printer Sharing (Echo Request – ICMPv4-In), right-click it and choose Enable.

Enable ICMP Replies (via the Windows Remote Shell)

1. To enable Windows Remote Shell on a server running a Server Core installation, type the following command at a command prompt:

WinRM quickconfig

2. Click Y to accept the default settings.

3. On the remote computer, at a command prompt, use WinRS.exe to run commands on a server running a Server Core installation. For example, to perform a directory listing of the Windows folder, type:

winrs -r:<ServerName> cmd

4. You can now type the command :

netsh firewall set icmpsetting 8

Enable remote management through the firewall

1. On your Server Core machine, at a command prompt, type the following:

netsh advfirewall set currentprofile settings remotemanagement enable

2. You can always run the following command in order to disable this option:

netsh advfirewall set currentprofile settings remotemanagement disable

3. Open the Windows Firewall snap-in on a remote computer running Windows Server 2008 or Windows Vista, click Start > Run, then type MMC and press ENTER.

4. Click File > Add/Remove Snap-in. In the Add or remove snap-ins, scroll down till you find the Windows Firewall with advanced security snap-in.

5. Click Add, then in Another Computer, type the name or IP Address of the Server Core server you want to manage.

6. After a short loading, if all is ok, you will be presented with the management GUI of the remote server. You can now create new Firewall rules, enable or disable existing rules, export your settings or disable the Firewall altogether.

7. For example, to enable the rule allowing Remote Desktop connections to the Server Core, go to Inbound Rules. In the results pane scroll down till you find Remote Desktop (Tcp-in), right-click it and choose Enable.

————– End of Document —————–

Tags: Windows Server 2008

Published Date: 20080404

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: