Tag Archives: Server Core

Useful Hyper-V utilities (for the Core guys)

When setting up demos, labs or just showing customers how to do various stuff in Hyper-V / Server Core / Windows sometimes things get screwed up. Or you need to disable/enable something that’s been turned on/off. In Core this can of course be a challenge, and I’ve lately run across a few different utilities and built in commands that might help you get through your 8 hours with slightly less hassle.

netcfg.exe
Netcfg can be used to enumerate and show adapters, networking services and protocols. Installation and removal of the same components can also be done with netcfg.

When run in a command prompt just running netcfg won’t show you anything, but to get the syntax you’ll need the netcfg /?.

netcfg [-v] [-e] [-winpe] [-l ] -c -i
-winpe installs TCP/IP, NetBIOS and Microsoft Client for Windows preinstallation envrionment
-l provides the location of INF
-c provides the class of the component to be installed (p == Protocol, s == Service, c == Client)
-i provides the component ID

The arguments must be passed in the order shown.

Examples:
netcfg -l c:oemdirfoo.inf -c p -i foo
…installs protocol ‘foo’ using c:oemdirfoo.inf

netcfg -c s -i MS_Server
…installs service ‘MS_Server’

OR

netcfg [-v] -winpe
Examples:
netcfg -v -winpe
…Installs TCP/IP, NetBIOS and Microsoft Client for Windows preinstallation environment

OR

netcfg [-v] -q
Example:
netcfg -q MS_IPX
…displays if component ‘MS_IPX’ is installed

OR

netcfg [-v] [-e] -u
Example:
netcfg -u MS_IPX
…uninstalls component ‘MS_IPX’

OR

netcfg [-v] -s
where,
-stprovides the type of components to show
ta == adapters, n == net components
Examples:
netcfg -s n
…shows all installed net components

OR

netcfg [-v] -b
Examples:
netcfg -b ms_tcpip
…shows binding paths containing ‘MS_TCPIP’

General Notes:n”
-v Run in verbose (detailed) mode
-e Use servicing environment variables during install and uninstall
-? Displays this help information

See the pictures for listing adapters and protocols.

hvremote.wsf
Hvremote lets you configure remote administration of Hyper-V hosts either it be the server or the client that’s not in a domain and so on. On the download page for hvremote they have an excellent 10-second guide so I’m not gonna give you the syntax, I’ll just send you straight over there: http://archive.msdn.microsoft.com/HVRemote.

nvspbind
Nvpsbind lets you enable or disable network protocol bindings on adapters by using the command line. In Server Core or Hyper-V Server this isn’t possible otherwise since the control panel applet isn’t available (that’ll be the ncpl.cpl). Check this out for more information!

nvspcrub.js
And if you use the above utility a little too much, or just happen to remove the Hyper-V role from a Core-box you might need this script to rescue you. It’ll reset the network configuration and remove the Hyper-V networking components. Read more and download!

NIC Teaming in Server Core or Hyper-V Server

Update
Teaming with Intel ProsetCL
Teaming with Broadcom BACScli

If you’re running Server Core or Hyper-V Server 2008 R2 you’ve probably come across the problem of teaming nics. No matter which hardware vendor you choose, they all have they’re special way of doing things. Helping an old colleague out the other day it made me realize that it’s not as straightforward as it is in the full version, so I’ve tried it out with both Intel and Broadcom nics. Which you of course know covers the servers from both HP and Dell (where I work, shameless plug).

Installing the Broadcom software to support network teaming in Server Core / Hyper-V Server

Before you start you must install the prereq’s for the drivers, that comes down to .Net 2.0, .Net 2.0 WOW64 and SNMP.
The easiest way is to use OcSetup to install them:

Start /w ocsetup NetFx2-ServerCore
Start /w ocsetup NetFx2-ServerCore-WOW64
Start /w ocsetup SNMP-SC

The “/w” will let you wait during installation so you know when it’s finished, please note that roles/features are case sensitive for ocsetup so type it as it looks…

When that’s done you’ll need to download the 14.1.x-version of the BACS from Dell’s site and extract them to somewhere on your drive, default is c:broadcom. Navigate to the c:broadcomdriver_management_apps_installer and run setup.exe.

The wizard kicks in and when you’re done you can team your nics (and change other things too) through the c:/program files/broadcom/bacs.exe utility.

Installing the Intel software to support network teaming in Server Core / Hyper-V Server

Turns out that Intel has their own great post on the subject of command line installations which you can find at http://www.intel.com/support/network/sb/cs-016040.htm.

A short rundown otherwise is that you’ll need the setup.exe program for your nic, then you have multiple choices on how to install them. The base driver can be installed through the included pnputil.exe for Server Core or you could use the Intel setup.exe instead.

This is from Intel’s site and shows you what switches does what:

Setup.exe support the following command line parameters:

Parameter Definition
ANS Advanced Network Services
“0”, do not install ANS. If ANS is already installed, it will be uninstalled.

“1”, install ANS (default).

NOTE: If the ANS parameter is set to ANS=1, both Intel PROSet and ANS will be installed.

DMIX PROSet for Windows Device Manager
“0”, do not install Intel PROSet feature. If the Intel PROSet feature is already installed, it will be uninstalled.

“1”, install Intel PROSet feature (default).

NOTE: If DMIX=0, ANS will not be installed. If DMIX=0 and Intel PROSet and ANS are already installed, Intel PROSet and ANS will be uninstalled.

SNMP Intel SNMP Agent
“0”, do not install SNMP. If SNMP is already installed, it will be uninstalled.

“1”, install SNMP (default).

NOTE: Although the default value for the SNMP parameter is 1 (install), the SNMP agent will only be installed if:
The Intel SNMP Agent is already installed. In this case, the SNMP agent will be updated.
The Windows SNMP service is installed. In this case, the SNMP window will pop up and you may cancel the installation if you do not want it installed.

BD Base Driver and IOATDMA Driver
“0”, do not install the base driver.

“1”, install the base driver (default).

LOG [log file name]
LOG allows you to enter a file name for the installer log file. The default name is C:UmbInst.log.

-a Extract the components required for installing the base driver and I/OAT driver to C:Program FilesIntelDrivers. The directory where these files will be extracted to can be modified unless silent mode (/qn) is specified. If this parameter is specified, the installer will exit after the base driver and I/OAT driver are extracted. Any other parameters will be ignored.
-f Force a downgrade of the components being installed. NOTE: If the installed version is newer than the current version, this parameter needs to be set.

How to install the base driver on Windows Server 2008 and Windows Server 2003:

:Setup DMIX=0 ANS=0 SNMP=0

How to install the base driver on Windows Server 2008 and Windows Server 2003 using the LOG option:

:Setup LOG=C:installBD.log DMIX=0 ANS=0 SNMP=0

How to install Intel PROSet and ANS silently on Windows Server 2008 and Windows Server 2003 (32-bit version):

:Setup DMIX=1 ANS=1 /qn

How to install Intel PROSet without ANS silently on Windows Server 2008 and Windows Server 2003 x64 Edition:

:Setup DMIX=1 ANS=0 /qn

How to install components but deselect ANS for Windows Server 2008 and Windows Server 2003:

:Setup DMIX=1 ANS=0 /qn /liew C:install.log

The /liew log option provides a log file for the DMIX installation.

To install teaming and VLAN support on a system that has adapter base drivers and Intel PROSet for Windows Device Manager installed, type the command line :Setup ANS=1.

Exch2k7 complete install on Windows Server 2008 R2 Core

This how-to will let you install Exchange 2007 SP1 on a Core-installation of Windows Server 2008 R2. I have reproduced this installation following these steps 4 times now, and it works every time. No support given, no responsibility taken. And calling Microsoft is out of the question since they don’t support this at all. You’ve been warned!

Jump straight to the 36 minute video!

How did I do this?

Well, I spent a few hours running Process Monitor to see what happends behind the scenes. That gave me some clues. Using Dependency Walker I then ran profiling on cdoex.dll to see what it was missing, this gave me the whole list of DLL-files. Once that was done (it took a good 4.5 hours to read the logs and find all the right files, have that in mind when you read this) I just had to figure out the last “Access denied” message for the mailbox-role. That’s the registry key-change and why you can’t run the whole setup in a big bang on Core. I also spent some time trying to get compatibility mode to run on Core since installing in compat mode for Vista SP 1 according to the internet would do the trick. AppCompat doesn’t run on core (no, I won’t fix that).

So, let the fun begin!

What you need:
One DC
One Core-installation of Windows Server 2008 R2 that’s joined to the domain.
You could use CCCR2 for this, you find it under /downloads.
One ISO/DVD of Exchange 2007 SP1

How to do it:

1) Add all the pre-requisites to your Core-box with the help of dism.exe
dism /online /enable-feature /featurename:NetFx2-ServerCore /featurename:NetFx3-ServerCore /featurename:MicrosoftWindowsPowerShell /featurename:IIS-WebServerRole /featurename:IIS-WebServer /featurename:IIS-ASPNET /featurename:IIS-WebServerManagementTools /featurename:IIS-ManagementScriptingTools /featurename:IIS-ManagementService /featurename:IIS-IIS6ManagementCompatibility /featurename:IIS-Metabase /featurename:IIS-WMICompatibility /featurename:IIS-LegacyScripts /featurename:Microsoft-Windows-Web-Services-for-Management-IIS-Extension /featurename:IIS-ISAPIFilter /featurename:IIS-ISAPIExtensions /featurename:IIS-NetFxExtensibility /featurename:IIS-ASPNET /featurename:IIS-HttpTracing /featurename:Microsoft-Windows-Web-Services-for-Management-IIS-Extension

2) Gather the following files from a full installation and copy to the System32-folder on your Core-server:

Exe-files:
ldifde.exe
mmc.exe

DLL-files:
devmgr.dll
eappcfg.dll
efsadu.dll
hlink.dll
ieframe.dll
IEShims.dll
ieui.dll
imgutil.dll
inetcomm.dll
inetres.dll
mapi32.dll
mmcbase.dll
mmci.dll
mmcico.dll
mmcndmgr.dll
mmcshext.dll
mmcss.dll
msfeeds.dll
mshtml.dll
msoert2.dll
msrating.dll
msvcr80.dll
netplwiz.dll
occache.dll
oledlg.dll
printui.dll
puiapi.dll
rasapi32.dll
rasdlg.dll
rasman.dll
shdocvw.dll
tapi32.dll

3) Register the DLL-files

Register ALL of these DLL’s with regsvr32 /s dllname.dll (the /s is Silent). Some of these will fail (almost all of them actually, but they’re needed so Exchange can register cdoex.dll who’s dependent of all these.

4) Install Hub Transport and Client Access

Mount the ISO / insert the DVD and run setup.com /roles:HT,CA /organisationname:"YourOrganisation"
Wait for it to finish and then reboot.

5) Edit the rights in the registry
Fire up regedit.exe and go to HKEY_CLASSES_ROOTInterface{FD8256D0-FD15-11CE-ABC4-02608C9E7553}
Change owner to BuiltinAdministrators and then edit the ACL so that TrustedInstaller, System and Administrators have Full Control.

6) Install the Mailbox-role
Run the command setup.com /roles:MB and wait for it to finish. Reboot.

7) Enable remote management of IIS
Back to regedit, find the HKLMSoftwareMicrosoftWebManagementServer key and edit EnableRemoteManagement from 0 to 1 (to enable it). To make things easier (and this guide shorter) disable the firewall on your core-box too, cause now we’re going remote. You could either do this with CCCR2 which makes it really easy or type in Netsh firewall set opmode disable which will turn off the firewall.

8) Start the remote web management service
On your FULL installation, click Start – Run – Services.msc. Connect to your core-box and select the service Web Management Service and start it.

9) Exchange Management
Insert the ISO/DVD into your full installation of Windows and install the Exchange Management Tools. This will now give you the ability to actually manage your box. At the moment I’ve just created a new mailbox as you can see in the video, so I have still to try and see what’s working and not.


Good luck!

What do you think about Server Core? Missing support for any applications? Post a comment!

Exchange 2007 mailbox role on Core 2008 R2!

Update: How-to with video – http://www.nullsession.com/2009/12/07/exch2k7-complete-install-on-windows-server-2008-r2-core/

For those of you who are regular visitors (or google a lot) you might remember the attempt to get Exchange 2007 running on Server Core 2008 R2. Everything except the mailbox role went fine.

Well, after A LOT of trouble I’ve finally installed the Exchange 2007 mailbox role on Server Core 2008 R2. You read that right: Exchange 2007 running on Windows Server 2008 R2 Core. And YES, I do know that this is completely unsupported at the moment. Now you’ve been informed too! (As in: do not put this in production!)

Here’s a screenshot, and a longer article / video will show up as soon as I’ve reproduced the whole shebang.


Core Configuration Console R2

The latest release of CCC is for R2-versions of 2008 ONLY. This is because the syntax of certain commands have changed, so we decided to not autodetect and fork in this case since the if/else-handling in batch-files leaves a lot to wish for.

If you still want CCC for the old Core-version it’s still available under downloads also.

Features in the latest version have expanded a little and now the list looks like this:

Computer Settings
Network And Disk Configuration
Network Configuration
Manual Configuration
DHCP Configuration
IPv6
Disable Network Connection
Enable Network Connection
NetBios
WINS
Speed – Duplex (not working)
Disk Configuration
Create Partition
Format Volume
Change Drive Letter
List Volumes
List Disks
List PageFile
Config Pagefile
More Options
Turn On Automatic Pagefile
iSCSI Start Graphical Client [ NEW IN R2 ]
iSCSI Start Service
iSCSI Add Targetportal
iSCSI List Targets
iSCSI Logon Target
iSCSI Add Persistent Target
More Options
iSCSI Remove Target Portal
iSCSI Remove Target
iSCSI List Persistent Target
Task Manager
Screen Resolution
Server Information
Change Current Local User Password
Change Server Name
License Options
Windows Update
Domain Settings
Join Domain
Disjoin Domain
Change Workgroup
Control Panel
Regional and Language Settings
Time And Date Settings
List Installed Applications
iSCSI Control Panel
Multipath IO Control Panel [ NEW IN R2 ]
Firewall / Remote Settings
RDS Admin Enable/Disable
Remote Event Viewer Enable/Disable
Remote Service Mgmt Enable / Disable
Remote Shared Folder Enable / Disable
Remote Scheduled Tasks Enable / Disable
Remote Reliability and Performance Enable / Disable
Remote Volume Mgmt Enable / Disable
More Choices
Remote windows Firewall Mgmt Enable / Disable
WinRM Enable / Disable
Firewall Enable / Disable
Firewall Status
Roles And Features
List Installed Roles/Features
List Installed Roles/Features without IIS
List Not Installed Roles/Features
List Not Installed Roles/Features without IIS
Search For Roles/Features
Search And Add Roles/Features [ NEW IN R2 ]
Search And Remove Roles/Features [ NEW IN R2 ]
Help on installing Roles/Features
Quick Config
Will run quick configuration guide (ip, rename computer, reboot, join domain)
CCC Settings
Install CCCR2 in Windows-folder
Register in Path
Enable Autostart
Disable Autostart
About CCCR2
Shutdown / Reboot / Logoff
Reboot
Shutdown
Logoff

Download CCC and CCCR2 here!

Server Core – Why you should care about it

Why you should care about it? Well, I think that in the future most of your server workloads will be on one of these babies. No GUI since you won’t need it. All your management will be remote anyway, either through MMC, WinRS or even better automated through System Center Operations Manager.

But now you’ve installed Server Core? Finding it hard to manage? Some admins do NOT get along with that command prompt. And some admins are so young they don’t even remember that it actually was the only thing you had back in the days…

If you’ve read this far and still wonder what Server Core is you better hop on over to Andrew Mason’s blog. He’s Mr Server Core over at Microsoft and the guy who got it all started.

How do you actually manage it then? Well, there are actually at least 7 ways of taking care of that:

1) Local command prompt.
2) Remote Desktop Connection
3) Remote MMC
4) WinRS
5) Powershell / WMI
7) SSH

The local command prompt requires you to know which command does what. It’s not that hard to actually type the commands, the hard part is usually figuring out which command to use. You can find the Server Core reference sheet over at Microsoft.com, which will get you started.

http://technet.microsoft.com/en-us/library/cc753802(WS.10).aspx
http://technet.microsoft.com/en-us/library/cc778084(WS.10).aspx
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=8dd99ac0-4a59-41e9-8037-f33760d560f0

There are also a bunch of software available that will help you with the configuration. CCC, Core Configuration Console, is one of them. It’s written by me and Robin Granberg and is available for Windows Server 2008 Core. There’s not an R2 version available yet, but there might be in the future. CoreConfigurator by SmartX is another one and finally there’s Server Core Configurator over at Codeplex. In R2 Microsoft has added their own little utility called sconfig which will help you get the ball in motion.

In the next post we’ll take a look at the local command prompt and Remote Desktop. The last option needs some configuration before it works, but I’ll get to that!

Server Core – What's in it for me?

Server Core, it’s sweet isn’t it? Well, it seems there’s a few of us who actually believe it is. There seems to be a huge misunderstanding that it’s hard to configure, hard to use and that it has to defend itself every time someone even thinks about selecting it from the install menu.

In a few videos I’ve shown how to install it, initial configuration and lastly how to install and configure a failover-cluster with iscsi on Server Core.

If you need more help and maybe some stuff to print out you can find it here:

Microsoft Server Core Step-by-Step-guide: http://technet2.microsoft.com/windowsserver2008/en/library/47a23a74-e13c-46de-8d30-ad0afb1eaffc1033.mspx?mfr=true

Petro.co.il has a guide too: http://www.petri.co.il/managing-windows-2008-server-core-locally.htm

Jorge de Almeida Pinto has a guide also: http://blogs.dirteam.com/blogs/jorge/archive/2008/03/26/a-new-gang-in-town-server-core-w2k8.aspx

Sander Berkouwer has one too: http://blogs.dirteam.com/blogs/sanderberkouwer/archive/2008/03/24/sc-enario-the-kitchen-cupboard-server.aspx

Andrew Masons blog: http://blogs.technet.com/server_core

Microsoft Technet Forums: http://forums.microsoft.com/TechNet/ShowForum.aspx?ForumID=582&SiteID=17

As you might have guessed by now, there’s a bunch of guides. There’s a bunch of users. CMD will get you eventually and rule the world probably.