Tag: Windows Server 2008 Core

How to add a Windows Server 2008 R2 Core as Secondary Domain Controller (replica)

This is a small How to which shows you how you can add a Windows Server 2008 R2 Core as a Secondary Domain Controller or Replica.

  1. sconfig Windows Server 2008 R2First configure the Core Server, Name, Domain, IP Adresse and more. You can use the command sconfig to run the Server Configuration Utility.
  2. Now you can go back to the Command Promt.
  3. Now you have to possibilities to install a Domain Controller. First you run dcpromo with a unattend file you have created and copied on the server, or you run dcpromo with some parameters. I decided to run dcpromo with the necessary parameters because I just need a simple replica.
  4. Now you can run the command on the Command Promt
    Dcpromo Windows Server 2008 R2 Core Dcpromo /unattend /replicaOrnewDomain:replica /replicaDomainDNSName:corp.pepsi.local /ConfirmGC:yes /username:corp’administrator /Password:* /safeModeAdminPassword:PepsiPassword
  5. After that the Server will run the installer and reboot.
    Windows Server 2008 R2 Core DCPROMO
  6. A replication connection was created
    Windows Server 2008 R2 AD Replication

If you need more Information about Active Directory Creation on a Windows Server 2008 Core Server you can checkout the Microsoft KB947034.



HowTo: Install Roles and Features Windows Server 2008 R2 Core (Shell)

This Guide should help you to install Roles and Features on Windows Server 2008 R2 per shell or on a Windows Server 2008 R2 Core Server.

Under Windows Server 2008 you could install Roles and Features with the command OCSETUP. Since we use Windows Server 2008 R2 Microsoft used the tool called DISM (Deployment Image Servicing and Management tool).

For checking availible Server roles type:

Dism /online /get-features /format:table

To enable a Feature or a Role, in this case the DNS Server Role, you just type:

Dism /online /enable-feature /featurename:DNS-Server-Core-Role



Cheatsheet: Using Diskpart on a Server Core installation #4

Using Diskpart on a Server Core installation. Disk Administration or Partition a disk.

Create a new partition and format a partition

SELECT DISK 0
CREATE PARTITION PRIMARY
ASSIGN LETTER=E
SELECT PARTITION 1
FORMAT FS=NTFS LABEL="New Volume" QUICK
EXIT

Commands you may then issue at the DISKPART prompt:

LIST Disk
LIST Partition
LIST Volume

SELECT Disk n
SELECT Volume n
SELECT Partition n

DETAIL Disk
DETAIL Partition
DETAIL volume

HELP
REM (remark/comment)
EXIT

Commands to Manage Basic Disks:

(set the current in-focus partition to be the system partition)

ASSIGN (allocate the next free drive letter)
ASSIGN LETTER=l (Choose a free letter)

CREATE PARTITION Primary Size=50000 (50 GB)
CREATE PARTITION Extended Size=25000
CREATE PARTITION logical Size=25000

DELETE Partition

EXTEND Size=10000

REMOVE letter=l (Remove drive letter l from the in-focus partition)
REMOVE /ALL (Remove ALL current drive letters and mount points)

Commands to Manage Dynamic Disks:

(set the current in-focus partition to be the system partition)

ASSIGN (allocate the next free drive letter)
ASSIGN LETTER=l (Choose a free letter)

ADD disk=n (Add a mirror to the in-focus SIMPLE volume on the specified disk.)

BREAK disk=n (Break the current in-focus mirror)

CREATE VOLUME Simple Size=n Disk=n
CREATE VOLUME Stripe Size=n Disk=n,n,...
CREATE VOLUME Raid Size=n Disk=n,n,...

DELETE DISK
DELETE PARTITION
DELETE VOLUME

EXTEND disk=n [Size=n]
IMPORT
ONLINE

REMOVE letter=l (Remove drive letter l from the in-focus volume)
REMOVE /ALL (Remove ALL current drive letters and mount points)
RETAIN

Commands to Convert Disks:

CONVERT mbr
CONVERT gpt
CONVERT dynamic
CONVERT basic

CLEAN ALL (remove all partition and volume info from the hard drive)
RESCAN



Cheatsheet: How to install HP Support Pack on a Server Core installation #3

This is a HowTo step-by-step guide to install the HP Support Pack on a Windows Server 2008 R2 Core installation or Hyper-v Core installation.

  1. Download the latest HP ProLiant Support Pack for Windows Server 2008 R2
  2. Eable SNMP on Windows Server 2008 R2 Core by typing start /w ocsetup SNMP-SC
  3. Extract the HP ProLiant Support Pack on a Management Machine to C:\Supportpack
    Extract HP ProLiant Support Pack
  4. Connect to the Remote Windows Server Core for example \\hyperv01\c$
    Connect to Core Server
  5. Create the folder C:\hp on the Remote Core Server
  6. Copy the files from C:\supportpack to \\hyperv01\c$\hp
    Copy HP ProLiant Support Pack
  7. On the Core Server execute C:\hp\hpsum.exe
    execute hpsum.exe
  8. Install the HP Supportpack as usual
    HP Smart Update ManagerHP Smart Update ManagerHP Smart Update ManagerHP Smart Update Manager
  9. Reboot the Server


Cheatsheet: Add roles and features to a Server Core installation #2

This are some commands to add roles and features to a Windows Server 2008 R2 Core installation.

You also can enable Remote MMC and Remote Server Manager to simply connect from a management server to the core server and add roles with GUI. This may only work within a domain environment. You can enable remote management pretty easy with the sconfig.cmd. Find out more about configuring Windows Server 2008 R2 Core installations here.

List available server roles and features:

oclist

Install, uninstall and configure Active Directory Domain Service role:

dcpromo

Help for dcpromo:

PS C:\> dcpromo /?

Command line parameters include:

/unattend[:filename] Used to specify the unattend operation mode or supply an unattended install script file.

/adv
Enables advanced user options.

/uninstallBinaries
Used to uninstall Active Directory Domain Services binaries.

/?[:{Promotion | CreateDcAccount | UseExistingAccount | Demotion}]

/?:Promotion, /?:CreateDCAccount, /?:UseExistingAccount, and /?:Demotion
will display unattend parameters applicable to the specified task. /CreateDCAccount and /UseExistingAccount:Attach are mutually exclusive.

/CreateDCAccount
Creates an RODC account.

/UseExistingAccount:Attach
Attaches the server to an RODC account.

/forceRemoval
Forcefully uninstalls Active Directory Domain Services on this domain controller. The account for the domain controller will not be deleted in the directory, and changes that have occurred on this domain controller since it last replicated with a partner will be lost.

/?
Will display this help.

Unattend parameters can also be specified on the command-line. For example:

dcpromo.exe /ReplicaOrNewDomain:Replica

Press any key to quit ...

Install a role or feature its basically always the same:

start /w ocsetup <roleorfeature>

start /w ocsetup DNS-Server-Core-Role

Uninstall a role or feature:

start /w ocsetup <roleorfeature> /uninstall

start /w ocsetup DNS-Server-Core-Role /uninstall

Install SNMP feature:

start /w ocsetup SNMP-SC

Install Microsoft Hyper-v role:

start /w ocsetup Microsoft-Hyper-V



Cheatsheet: Configuring a Server Core installation #1

After setting up my new hardware for my LAB, I thought about installing my Hyper-V Servers as Server Core installations. After reading two minutes in some blogs and the Microsoft TechNet I decided to use the Core Editions.

Basically the setup is the same as the none Core Edition or GUI Edition. But after the installation you have to configure the server without a GUI, your only way to do the basic configuration is the command promt. Btw if you close the command prompt, you can easily recover the prompt by pressing CTRL-ALT-DELETE, click Start Task Manager, click New Task and type cmd.exe.

Windows Server 2008 R2 Core

To do the basic configuration of your Windows Server 2008 (R2) Core, you need the following commands:

Checkout the existing Hostname / Computername:

hostame or ipconfig

Change the Computername / Hostname:

netdom renamecomputer <ComputerName> /NewName:<NewComputerName>

Change the Computername / Hostname without writing the old name:

netdom renamecomputer %computername%   /NewName:<NewComputerName>

Show network interfaces:

netsh interface ipv4 show interfaces

Set Static IP Address, Subnet Mask, and Default Gateway (ID is the shown number in the Idx column when you show your network interfaces):

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

Set DNS Server (index= is the priority of the DNS Server):

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

Join a Domain:

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

Add a Domain User to the local administrator group:

net localgroup administrators /add <DomainName>\<UserName>

Change or set the product key of your server:

slmgr.vbs –ipk<productkey>

Active the server licence:

slmgr.vbs -ato

If activation is successful, no message will return in the command prompt

Configure the firewall:

netsh advfirewall

netsh advfirewall firewall set rule group="Remote Administration" new enable=yes

Enable Remote Desktop:

cscript c:\windows\system32\scregedit.wsf /ar 0

Restart the Computer:

shutdown /r /t 0

Open Task Manager with the command prompt:

taskmgr

List event logs:

wevtutil el

Find something in the event log:

wevtutil qe /f:<text>

List running services:

sc query

or

net start

List running tasks:

tasklist

to active Powershell type:

powershell

For the most of this simple tasks there is also a configuration tool, which makes it very easy to do your first configuration with Windows Server 2008 Core Edition. The Tool is called sconfig, and its very simple, just start the program with the following command:

sconfig.cmd

Now this will open the following configuration utility:

Windows Server Core Sconfig.cmd