Administering IIS7 on Server Core Installations of Windows Server 2008

Posted: Jun 26, 2007  50 comments  

Average Rating

Tags
IIS News Item

 

As you may have seen from TechEd 2007 announcements and recent Bill Staples’ (IIS Product Unit Manager) blog, IIS7 is now supported on Server Core installation option of Windows Server 2008. We are hoping to address customer requests by offering low footprint server solution in web space which comes with certain advantages (i.e. lower disk space requirement and memory utilization, reduced attack surface and less servicing needs). We, IIS product team, are very excited to take this forward step and offering our customers next generation web server product in Server Core.

Server Core installations on Windows Server 2008 comes with certain differences than regular Windows Server 2008 OS installations. In a nutshell, .Net framework is not available (hence no ASP.Net) and there is no windows shell so GUI administration tools are not available. As a note, availability and support of .Net framework on Server Core installation option is being discussed so there is no final answer on that as of this date yet.

The purpose of this blog is to help out for those who need to administer IIS7 on Server Core installations using command-line utilities/options. Without further delay, let’s start our Server Core How-to Q&A. First section will include IIS7 deployment and configuration on server core installations. Second section will contain general tips for Windows OS administration tasks.

Part1: IIS Deployment and Configuration Tips

Q1. How to install IIS7 on Server Core?

A. You can use pkgmgr.exe command line tool option to install IIS7 on your Server core box.

For default IIS install option, you can type following on the command-window:

                start /w pkgmgr /iu:IIS-WebServerRole;WAS-WindowsActivationService;WAS-ProcessModel 

 

For Full IIS install option, you can type following in command-line:

start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HttpRedirect;IIS-ApplicationDevelopment;IIS-ASP;IIS-CGI;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-ServerSideIncludes;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-ODBCLogging;IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;IIS-ClientCertificateMappingAuthentication;IIS-IISCertificateMappingAuthentication;IIS-URLAuthorization;IIS-RequestFiltering;IIS-IPSecurity;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;IIS-WebServerManagementTools;IIS-ManagementScriptingTools;IIS-IIS6ManagementCompatibility;IIS-Metabase;IIS-WMICompatibility;IIS-LegacyScripts;IIS-FTPPublishingService;IIS-FTPServer;WAS-WindowsActivationService;WAS-ProcessModel

Notes:

1.       To uninstall IIS, you can pass “/uu:” instead of “/iu:” for the commands mentioned above (Ex. Start /w pkgmgr /uu:IIS-WebServerRole….).

2.       For more information on pkgmgr.exe, please click on the link.

 

Q2. Which features of IIS7 are not available on Server Core installation option of Windows Server 2008?

A. Following features are not available as installation options on Server Core:

·         IIS-ASPNET

·         IIS-NetFxExtensibility

·         IIS-ManagementConsole

·         IIS-ManagementService

·         IIS-LegacySnapIn

·         IIS-FTPManagement

·         WAS-NetFxEnvironment

·         WAS-ConfigurationAPI

 

Q3. How to install Classic ASP on Server Core?

A. Type following pkgmgr.exe command to install Classic ASP along with features for Static Content Web Server on Server Core machine.

Start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-ApplicationDevelopment;IIS-ASP;IIS-ISAPIExtensions;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-Security;IIS-RequestFiltering;IIS-HttpCompressionStatic;IIS-WebServerManagementTools;WAS-WindowsActivationService;WAS-ProcessModel 
Q4. How to install PHP on Server Core?

A. Steps to install and configure PHP on Server Core is as follows:

1.                         Unzip the content of PHP download from http://www.php.net/downloads.php#v5 to a file share. As a note, since Server Core does not have browser support, it is recommended to download the PHP content on a file share where browser access is available.

2.                         Create a %SystemDrive%\PHP directory on Server Core machine and xcopy the content of the folder from the file share above onto %SystemDrive%\PHP folder on local machine.

3.                         Copy the %SystemDrive%\PHP\PHP.INI-Recommended file as %SystemDrive%\PHP\PHP.INI.

 

Q5. How to install and configure Fast-CGI support on the IIS Server?

A.  After completing the steps on installing PHP on Q4, please follow the steps below to install Fast-CGI and configure it.

Step 1. Please use following command-line to install IIS features for FastCGI along with features for Static Content Web Server:

Start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-ApplicationDevelopment;IIS-CGI;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-Security;IIS-RequestFiltering;IIS-HttpCompressionStatic;IIS-WebServerManagementTools;WAS-WindowsActivationService;WAS-ProcessModel

Note: Alternatively, you can choose to install Full IIS option indicated in Q1. Default IIS install option does not contain FastCGI installation.

Step 2. Create the PHP/FastCGI handler mapping from command line by typing following two appcmd.exe commands:

> AppCmd set config /section:system.webServer/fastCGI /+[fullPath='d:\php\php-cgi.exe']

> AppCmd set config /section:system.webServer/handlers /+[name='PHP-FastCGI',path='*.php',verb='*',modules='FastCgiModule',scriptProcessor='d:\php\php-cgi.exe',resourceType='Either']

Notes:

1.       AppCmd.exe is a new command-line administration tool that ships with IIS7. AppCmd.exe can be found at %WinDir%\System32\InetSrv directory. For more information on AppCmd command-line tool, please click on the link.

2.       Depends on PHP installation location described in Q3, paths to executables on the hard disk may require updates. All appcmd example commands above assume that PHP installation is in D:\PHP folder. 

 

Q6.  How to detect which IIS7 features are installed on Server Core?

A. Please open registry editor by typing regedit.exe on command window and then navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\InetSTP\Components container. All installed IIS7 features will have an entry with DWORD value of 0x00000001. 

Part 2: Server Core Administration Tips:

This section includes a few command line utilities and commands to perform common tasks/actions on command-line.

Q1. How to start a command window on Server Core installation?

A. Click Ctrl+Alt+Del and then choose “Start Task Manager”. On Task Manager window, click File and choose “New Task (Run…)” option on the menu. Type cmd.exe on Create New Task window and hit ok.

Q2. How to enable Remote Desktop for Server Core installed box?

A. If you plan to access from another Windows Server 2008 or Vista machine, please execute this from command-line:

Cscript %windir%\system32\SCRegEdit.wsf /ar 0

Otherwise if you plan to access from a machine which has earlier version of Windows OS (i.e. Windows XP), please execute following:

Cscript %windir%\system32\SCRegEdit.wsf /ar 0               

Cscript %windir%\system32\SCRegEdit.wsf /cs 0

Q3. How to change administrator password?

A. Type “Net user administrator *” on command-window. When asked, please type new password for administrator user.

Q4. How to add a user to local administrators group?

A. Net localgroup Administrators /add <domain>\<username>

 

Q5. How to change machine name?

A.  If machine is in a workgroup then please type following in command window:

                Netdom renamecomputer <currentcomputername> /NewName:<new computer name>

Otherwise, if machine is a member of a domain then please type following in command window:

                Netdom renamecomputer <currentcomputername> /NewName:<new computer name> /userd:<domain>\<username> /password:*

Q6. How to join a machine to domain?

A. Type following on command-window:

                Netdom join %computername% /domain:<domain> /userd:<domain>\<username> /password:*

Q7. How to remove a machine from domain?

A. Netdom remove

Q8. How to disable firewall?

A. netsh firewall set opmode disable

Q9. How to restart a Server Core Machine?

A. shutdown /r

Q10. How to install updates?

A. wusa <update_package_name>.msu /quiet

Q11. How to access event logs?

A. Enumerate event log names by typing "Wevutil el". In order to see/query events in particular log, please type "Wevtutil qe <event log name>".

 

 

 

Comments

  1. Michael
    June 26, 2007

    Cool stuff - in question 10, could it quite possibly be "quiet" instead?

  2. Mete
    June 27, 2007

    Thanks. Good catch. I corrected the typo.

  3. Sangram
    June 27, 2007

    How to ensure that ASP .NET is installed properly although registy shows ASP under HKEY_LOCAL_MACHINE\Software\Microsoft\InetSTP\Components?

  4. Mete
    June 27, 2007

    Hi Sangram,

    ASP.Net is not supported on ServerCore as of this date. The ASP registry entry is for classic ASP support on Server Core installations. Hope this helps.

  5. Sideline observer
    June 29, 2007

    I cannot believe it, no plans for .NET framework: AWESOME! YES!

    If you guys could only get the footprint down to under 32MB on core install that would be even more cool.

    Please, please, please make this OS the fastest and thinnest by default.

    No WMI either please.

    No junk that isn't required, so we have an answer to Linux.

    No RPC or AD or shell junk that blocks the entire box. Or a CD-ROM or floppy disk hang Windows is famous for. No Name Resolution by default would be GREAT!

    We only need the fastest TCP/IP and HTTP stack on the planet (and lowest latency otherwise what's it the point).

    Cheers.

  6. TrackBack
    June 29, 2007
  7. TrackBack
    June 29, 2007
  8. TrackBack
    June 29, 2007
  9. TrackBack
    June 29, 2007
  10. TrackBack
    June 29, 2007
  11. TrackBack
    June 29, 2007
  12. TrackBack
    June 29, 2007
  13. MKR
    October 23, 2007

    That's great :-/ So ASP.NET (which is primary Microsoft developer platform for web) is not available on Server Core and PHP is...

  14. Dennis
    November 20, 2007

    Wow. Take Windows Server 2008 Server Core + PHP + IIS7 + MySQL + WordPress, mix them together, will they

  15. Server Core + IIS7 + PHP + MySQL (and Wordpress) | MT-Soft Website Development
    November 22, 2007

    Pingback from  Server Core + IIS7 + PHP + MySQL (and Wordpress) | MT-Soft Website Development

  16. links for 2007-12-16 « Netweb
    December 16, 2007

    Pingback from  links for 2007-12-16 &laquo; Netweb

  17. Paul Shearer
    January 13, 2008

    really cool stuff!

  18. Adrian H.
    February 10, 2008

    (又是初体验?) ServerCore的理念挺好的,极度减少预装的特性,减小被攻击外表以提高稳定性和效率,可自定义服务器角色和特性。 我的三年前买的本,从安装到登录用了30分...

  19. Site d'informations sur Windows Vista et Windows Server 2008
    February 15, 2008

    Windows Server 2008 - Server Core dans le détail (Livemeeting en différé) Découvrez dans le détail une

  20. Stanislas Quastana's WebLog
    February 15, 2008

    Windows Server 2008 - Server Core dans le détail (Livemeeting en différé) Découvrez dans le détail une

  21. Stanislas Quastana's WebLog on TechNet
    February 15, 2008

    Windows Server 2008 - Server Core dans le détail (Livemeeting en différé) Découvrez dans le détail une

  22. Site d'informations sur Windows Vista et Windows Server 2008
    February 15, 2008

    Windows Server 2008 - Server Core dans le détail (Livemeeting en différé) Découvrez dans le détail une

  23. Stanislas Quastana's WebLog on TechNet
    February 15, 2008

    Windows Server 2008 - Server Core dans le détail (Livemeeting en différé) Découvrez dans le détail une

  24. historia powszechna
    February 22, 2008

    This info is very good. Thanks for your works :)

  25. Tworznie Stron
    February 26, 2008

    This is not easy. I try few times but it isn't working:((

  26. Karpacz
    February 29, 2008

    Win serv PHP and mysql?:)

  27. cuneytorhun
    March 13, 2008

    Hi.

    I installed exchange 2007 on windows 2008. First time, running OWA on Default Wab Site. However next time stop OWA and Virtual Directory (Owa,Exchage,Exadmin,Exchweb,Public) this virtual directory when click, I see error.

    Errors fallowing;

    "could not find a part of the path '\\.\BackofficeStorage"

    "could not find a part of the path '\\.\BackofficeStorage\domainname\MBX"

    "could not find a part of the path '\\.\BackofficeStorage\domainname\Public"

    I remove IIS and install IIS, but i see same error.

    I remove Exchange 2007 and install Exchange 2007, but i see same error.

    Help me please. Thanks

  28. daty historyczne
    March 16, 2008

    thx great article!!!

  29. Karkonosze
    March 16, 2008

    good work! tahanks for help.

  30. http://blogs.iis.net/metegokt/archive/2007/06/26/administering-iis7-on-server-core-installations-of-windows-server-2008.aspx
    March 22, 2008

    Pingback from  blogs.iis.net/.../administering-iis7-on-server-core-installations-of-windows-server-2008.aspx

  31. The things that are better left unspoken
    March 22, 2008

    Windows Web Server 2008 is the successor to Windows Web Server 2003. It has some interesting tricks up

  32. Laura
    June 1, 2008

    Nice Post! I also wrote an article on IIS 7 a few months back.

    Installing IIS 7.0 on Server 2008 from command line

    blogs.iis.net/.../administering-iis7-on-server-core-installations-of-windows-server-2008.aspx

  33. Anonymous
    June 17, 2008

    I think you meant ""Wevtutil" instead of "Wevutil" on Q11.

  34. Anonymous
    July 27, 2008

    Here is a missing portion from the IIS7+Server Core combo

    How to configure SSL on IIS7 under Windows 2008 Server Core

    www.awesomeideas.net/.../How-to-configure-SSL-on-IIS7-under-Windows-2008-Server-Core.aspx

  35. 闪灵屋 » Blog Archive » Server Core + IIS7 + PHP + MySQL
    September 2, 2008

    Pingback from  闪灵屋  &raquo; Blog Archive   &raquo; Server Core + IIS7 + PHP + MySQL

  36. Windows Server team Blog
    October 13, 2008

    MSDN and TechNet subscribers - get your shorts on and your skateboards out!! Windows Server 2008 Technical

  37. Anonymous
    November 19, 2008

    Hi,

    I have created an MSI package to do Unattended Installation for IIS.

    Nature of my Package :

    It place the XML file in the c drive and call the package manager for installation.

    When you uninstall the MSI package it will call the Package manager for IIS Uninstallation.

    Now my question is that : After I installed My MSI Package, I want to lockdown the option to manually remove the IIS from Windows Server Manager Role, how do I do that...?

    Thanks

    Surendar

  38. Johann
    February 25, 2009

    This is a compilation of useful commands I have been using to administer a windows 2008 core server.

  39. Anonymous
    February 27, 2009

    HINT: user far manager to perform basic file operations. it hepls you A LOT and it's console based.

    www.farmanager.com/download.php

  40. Hiroshi Okunushi's Blog ☆ミ
    March 12, 2009

    時間がある時によく質問のある内容を書きとめておこうと思います。今回はまずはIIS7に触れる上で最も最初にあたる壁、どうやってインストールするかです。コマンドラインなど、やる段階で「ここを参照すれば」とこの投稿を思い出してもらえるとうれしいです。

  41. Anonymous
    March 17, 2009

    Hello,

    I found this information www.iis.net/.../ASP.NETandPHPSupport

    Where ASP.NET is supportable.

    Can you please clarify this information:

    ... IIS7 integrates the ASP.NET runtime within the core Web server, providing a unified request processing pipeline that is exposed to both native and managed modules...

    Thanks.

  42. gr8Ashish
    January 20, 2010

    hi i am installing my web application on windows server 2008

    with iis7

    now i am running it successfully with my windows "administrator" user and with other windows user "sqluser"

    my web.config is installed in "c:\inetpub\wwwroot\mysite\"

    now i have a windows application(myExe) that uses my web.config

    i can read my web.config through my windows application (myExe) with below code -

    -------

    imports system.web.configuration

    ...

    ...

    Dim webStr As Configuration.Configuration=WebConfigurationManager.OpenWebConfiguration("/mysite")

    dim webConnStr as string=webStr.ConnectionStrings.ConnectionStrings("Connstr").connectionString

    --------------------

    this will fetch my connection string from administrator a/c but with other windows a/c, this application is not able to fetch connection string

    while other a/c able to run same web application (mySite)

    can anyone tell me what is the problem and how to rectify it on windows server 2008 or iis manager or something

Submit a Comment