Windows Server 2008 core configuration – Basic 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.      At the command prompt, type

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

4.      At the command prompt, type

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

To set the administrative password in Windows Server 2008

1.      At the command prompt, type:    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.      At a command prompt, type

 

   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 At a command prompt, type:

 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.    

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

How to disable IPv6 stack on Windows Server 2008 core

Unlike Windows XP and Windows Server 2003, IPv6 in Windows Vista and Windows Server 2008 cannot be uninstalled. However, you can disable IPv6 in Windows Vista and Windows Server 2008 by doing one of the following:

Windows Server Core:

1. Export the registry key

reg export hklm\system\currentcontrolset\services\tcpip6\parameters c:\regipv6.txt

2. Add the following key under parameters using the command mentioned below

reg add hklm\system\currentcontrolset\services\tcpip6\parameters /v DisabledComponents /t REG_DWORD /d 255

Windows Server Full installation:

1. In the Network Connections folder, obtain properties on all of your connections and adapters and clear the check box next to the Internet Protocol version 6 (TCP/IPv6) component in the list under “This connection uses the following items”.

This method disables IPv6 on your LAN interfaces and connections, but does not disable IPv6 on tunnel interfaces or the IPv6 loopback interface.

2. Add the following registry value (DWORD type) set to 0xFF:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters\DisabledComponents

This method disables IPv6 on all your LAN interfaces, connections, and tunnel interfaces but does not disable the IPv6 loopback interface. You must restart the computer for this registry value to take effect.

If you disable IPv6, you will not be able to use Windows Meeting Space or any application that relies on the Windows Peer-to-Peer Networking platform or the Teredo transition technology.

Please do have a look at the article http://www.microsoft.com/technet/network/ipv6/ipv6faq.mspx before making any changes to the system to know about the effects on the system.

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

Tags: Windows Server 2008

Published Date: 20080403

Hello world!

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!

Managing Telnet Server service in Windows Server 2008 using CLI

To install Telnet client or server use one of the following commands

Full Installation:

Servermanagercmd –install telnet-server

Servermanagercmd –install telnet-client

Core Installation:

Ocsetup TelnetServer (case sensitive)

Ocsetup TelnetClient (case sensitive)

Note: After installation the Telnet Server service is disabled and in stopped mode. You need to manaually enable it and start the service. No confirmation message is displayed before or after completion of installation

To uninstall Telnet client or server use one of the following commands

Full Installation:

Servermanagercmd –remove telnet-server

Servermanagercmd –remove telnet-client

Core Installation:

ocsetup TelnetServer /uninstall (case sensitive)

ocsetup TelnetClient /uninstall (case sensitive)

To verify if the Telnet Client and/or server is installed on the server:

Full Installation:

Servermanagercmd –q

Core Installation:

oclist

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

Tags: Windows Server 2008

Published Date: 20080401