Friday, 2 October 2009

Setup PowerShell/.NET on Server Core

I had a bit of a whinge when Windows 2008 Server Core was released due to its lack of .NET support. Which also meant a server core couldn’t support ASP.NET or even PowerShell. Espically when you could run TOMCAT on server core.

Fast forward to 2008 (R2) :) and .NET is now supported.

After doing a basic install of Windows Server Core 2008 R2, you are presented with a command prompt, to install ASP.NET you can install using the following

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

To install PowerShell and .NET you need to run the following commands (they are case sensitive)

dism /online /enable-feature:NetFx2-ServerCore
dism /online /enable-feature:MicrosoftWindowsPowerShell

If you need 32bit support (because 2008 R2 is 64bit only) you need to add the following features

dism /online /enable-feature:NetFx2-ServerCore-WOW64
dism /online /enable-feature:MicrosoftWindowsPowerShell-WOW64

Don’t forget to install all the wonderful .NET features, such as LINQ and WCF

dism /online /enable-feature:NetFx3-ServerCore

I’ll do another post shortly on how to do remote access to your Server Core shortly, because you don’t really need a monitor connected to a command prompt anymore.

0 comments: