Archive

Posts Tagged ‘Windows Server 2008 Server Core’

How to move DHCP db from Windows Server 2003 to Windows Server 2008

September 1, 2009 Leave a comment

On your Windows 2003 Server go Start-> run and type cmd.

Here’s the command to export your db:

netsh dhcp server export C:\dhcpdb.txt all

and press ENTER

On your Windows 2008 server go Start and type cmd right click on it and select Run as Administrator.

Here’s the command to import your db:

netsh dhcp server import C:\dhcpdb.txt all

and press ENTER

Bare in mind that C:\dhcpdb.txt is full path and file name of the database file that you copied to the server.

More information could be find out from this blog.

 

-Eric

Prompting Server name on Server Core Command Prompt

April 28, 2009 2 comments

Lets say you got or you plan to deploy several Windows Server 2008 Server Core installations and you are connecting to them by using the Terminal Services Remote Programs. So you get a default simple prompt. Using the following tip you can change the default prompt and add a servername. Open the registry and navigate to the following key:

HKLM\System\CurrentControlSet\Control\Session Manager\Environment

Look for a key called Prompt, if it’s not there then use the following settings to create one:

Value Name: Prompt
Data Type: REG_EXPAND_SZ
Value Data: $_Server:[%servername%]$_Username:[%username%]$_$T$_$p$g

Here are some special codes you can also use:

* $A – & (Ampersand)
* $B – | (pipe)
* $C – ( (Left parenthesis)
* $D – Current date
* $E – Escape code (ASCII code 27)
* $F – ) (Right parenthesis)
* $G – > (greater-than sign)
* $L – < (less-than sign)
* $N – Current drive
* $P – Current drive and path
* $Q – = (equal sign)
* $S – (space)
* $T – Current time
* $_ – Carriage return and linefeed
* $$ – $ (dollar sign)

-Eric

Enabling Firewall rules on Windows Server 2008 Server Core for remote management

April 28, 2009 Leave a comment

Here are some common rules you might want to enable on your Core Server for remote management.

To enable all the rules for remote administration use this command:
Netsh advfirewall firewall set rule group=“remote administration” new enable=yes

To enable specific commands follow this format:
Netsh advfirewall firewall set rule group=“” new enable=yes

For example:
MMC Snap-in – Event Viewer
Windows Firewall Rule Group – Remote Event Log Management
Netsh advfirewall firewall set rule group=“Remote Event Log Management” new enable=yes

MMC Snap-in – Disk Management
Windows Firewall Rule Group – Remote Volume Management
Netsh advfirewall firewall set rule group=“Remote Volume Management” new enable=yes

MMC Snap-in – Windows Firewall with Advanced Security
Windows Firewall Rule Group – Windows Firewall Remote Management
Netsh advfirewall firewall set rule group=“Windows Firewall Remote Management” new enable=yes

I’m not going to rewrite here all the commands. Here’s the link to David Daivs’s article about how to configure Windows Server 2008 Advanced Firewall. Enjoy!

-Eric

Microsoft Windows Server 2008 Server Core and Hyper-V

April 28, 2009 Leave a comment

I would like to share my experiences installing Hyper-V on Windows Server 2008 Server Core. First you need a hardware that will support it. Then you should install the Windows Server 2008 Server Core on that hardware. When you are choosing server settings remember you have to install the OS using default language settings (EN-US). After the OS is installed take these steps:

* Change the computer name (before joining a domain):
netdom renamecomputer %computername% /NewName:newComputerName

* Check the IPv4 interface idx:
netsh interface ipv4 show interfaces

* Change the IPv4 address:
netsh interface ipv4 set address name=”IDx” source=static address=StaticIP mask=SubnetMask gateway=DefaultGateway

* Add the IPv4 DNS server address:
netsh interface ipv4 set dnsserver name=”IDx” source=static address=IPAddress

* Add the IPv4 WINS server address:
netsh interface ipv4 set winsserver name=”IDx” source=static address=IPAddress

* Join a domain:
netdom join %ComputerName% /domain:DomainName /userd:domain\user /passwordd:*

* Add a domain user to the local administrators group (if you need):
Net localgroup administrators /add Domain\UserName

* Enable Remote Desktop:
Cscript %WinDir%\System32\Scregedit.wsf /ar 0
Cscript %WinDir%\System32\Scregedit.wsf /cs 0

* Activate Windows:
Cscript %WinDir%\System32\slmgr.vbs –ato

* Change Windows Key (If activation failed, and then reactivate):
Cscript %WindDir%\System32\slmgr.vbs –ipk NewKey

* Reboot Windows:
Shutdown /r /t 0

When the server comes up you are ready to install the Hyper-V role. Use these commands:

* bcdedit /set hypervisorlaunchtype auto (so you don’t have to do 2 reboots)
* start /w ocsetup Microsoft-Hyper-V (after this is done reboot again)

After the server comes up verify that all hyper-v related services are up and running using net start to list running services. On my next post I’ll write down some general commands how to enable some general firewall rules in Windows Server 2008 Server Core.

Here is the link the the Microsoft Technet Step-by-Step guide about how to install Server Core.

-Eric