Installing a simple Web server on WS 2008 from a script

 

Summary

While there are more advanced Web server configurations, many products require the IIS Web engine as a prerequisite. Here's how to install a simple IIS Web server through a scripted role.

Events

Social Media World Forum
22 - 23 Sep 2010

Suntec, Singapore

Governmentware 2010
28 - 30 Sep 2010

Suntec, Singapore

The 5th Annual CIO Forum Asia
28 Sep 2010

Singapore

IDC's Asia/Pacific Cloud Computing Conference 2010
31 Aug 2010

Marriott Hotel, Singapore

You can usually add features through the Windows Server 2008 Server Manager snap-in via a script. In the case of IIS 7.0, there are many options available for the feature install.

One way to ensure a consistent configuration for applications that require IIS (e.g., SQL Server) is to use a scripted installation. For IIS, the package manager can install the features locally. To install a basic IIS configuration, run the following script:

start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServerManagementTools;
IIS-ManagementService;IIS-Metabase;WAS-WindowsActivationService;
WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI

The command provides little interaction and, by default, does not provide feedback of any type if an incorrect parameter is passed after the /iu parameter. Figure A shows IIS being added via the script.

Figure A
Figure A

Once the scripted task completes after a minute or so, and the Window Server 2008 Server Manager snap-in performs its next refresh, the Web server is listed as a role on the system and is running. Figure B shows an updated Server Manager snap-in with this basic IIS role.

Figure B
Figure B

Using this scripted install of IIS is a good way to ensure consistent server build configurations, and other Windows features can be automated through the package manager (pkgmgr). The package manager can also uninstall packages, which may be helpful for temporarily enabling a feature for a specified amount of time and for removing the feature from a scheduled task to ensure its decommissioning.

For more information on the package manager, read the TechNet article Package Manager Command-Line Options.

Rick Vanover is a systems administrator for Safelite AutoGlass in Columbus, Ohio. He has more than 12 years of IT experience, and he focuses on virtualization, Windows-based server administration, and system hardware.

Talkback

Add your opinion

In order to post a comment, you need to be registered. (Sign In or register below)

Post your comment
HP Data Protector delivers high-performance data protection at up to 70% lower TCO.
Tech Vendor: HP
Did you know?
Did you know?

ZDNet Asia Live

Iwebslog.com-Multi-task tricks of the Table Move handle in Word: Click or double-click the Table Move handle... http://dlvr.it/4xkZW #Excel

15 minutes ago by learnexcel on topsy

Microsoft aiming to hone CRM pitch: As it gears up to start testing a new version of its product, Redmond says it'... http://bit.ly/cCRyE6

10 things you should know about NoSQL databases: The relational database model has prevailed for deca... http://bit.ly/9kJeXc - #Asia #News

Multi-task tricks of the Table Move handle in Word: Click or double-click the Table Move handle to qu... http://bit.ly/b7UBPf - #Asia #News

Microsoft aiming to hone CRM pitch: SAN FRANCISCO--Microsoft is tired of seeing Salesforce.com get all the headlin... http://bit.ly/d6Uf6U

Microsoft aiming to hone CRM pitch: SAN FRANCISCO--Microsoft is tired of seeing Salesforce.com get all the headlin... http://bit.ly/9vsZxf

who would've thunk it?? increasingly important medium.. 'S'pore: Social media trumps paid keyword ads' - ZDNet Asia - http://bit.ly/axe88O

RT @zdnetasia: Oracle's Hurd for Phillips swap: What's the customer relations impact? http://ur1.ca/1jqms

Salesforce chief: Enterprise tech lacks innovation: Consumer tech makers such as Twitter are setting ... http://bit.ly/ca4KYi - #Asia #News

Adobe warns of zero-day hole in Reader, Acrobat: Critical vulnerability could allow an attacker to ta... http://bit.ly/bY9Xe6 - #Asia #News

Microsoft aiming to hone CRM pitch http://bit.ly/aXa9nj | #Droid #Android

Microsoft aiming to hone CRM pitch http://bit.ly/dn8jno

3 hours 13 minutes ago by superstarch on topsy

Mozilla: Now is the time for browser-based games: Firefox and other up-to-date browsers are capable o... http://bit.ly/aP9uiH - #Asia #News

3 hours 35 minutes ago by asiatodaynews on topsy

Study: Two-thirds of Web surfers fall prey to online crime: Survey finds China, Brazil, India, and th... http://bit.ly/bGk6N2 - #Asia #News

Link to the Dual Roles of the CIO: http://www.ciodashboard.com/cio-careers/cio-dual-roles/

12 hours 26 minutes ago by cbcurran on Boeing CIO: IT key to drive business growth

Here's another view of the dual roles of the CIO that I think is consistent. What we've found, however, is that only about 1 in 4 CIOs o...

12 hours 27 minutes ago by cbcurran on Boeing CIO: IT key to drive business growth

I agree with the author's sentiment in that Oracle seems to be set on a course to building an anti-open-source reputation. I don't agree ...

13 hours 31 minutes ago by sisto on Could Oracle fracture open source community?

Hi Rick, I like your point that there is a time and a place for automation, and that it can be quite effective when used properly. One su...

15 hours 51 minutes ago by XebiaLabs on Agile drivers for new project management tools

sorry for the double entry just a mistake

19 hours 2 minutes ago by notek on 5 ways to avoid removable media malware

Amazing and very informative blog one point i'd like to point out is that, for number 2 instead of completely restraining the use of remo...

19 hours 3 minutes ago by notek on 5 ways to avoid removable media malware

S'pore: Social media trumps paid keyword ads http://bit.ly/9Z7dNd

19 hours 20 minutes ago by lenwilton on topsy

Hi. My name is Philippe de Passorio, head of Total Immersion office in Apac. Since we have opened our subsidiary in Hong Kong 1 year ago,...

20 hours 6 minutes ago by philippe on APAC lags in augmented reality adoption

Haha, thought long and hard about how to phrase it... no worries, you owe me lunch then, ;)

23 hours 6 minutes ago by yedwin on Is M'sia's online world ready for free speech?

Nice post man. Looks like I don't have to write one on this now.

23 hours 28 minutes ago by davidlian on Is M'sia's online world ready for free speech?

The only reason Oracle has a leg to stand on here is that Sun didn't open source all of Java. The saw that Java as a desktop application...

1 day 10 minutes ago by txtechdog on Could Oracle fracture open source community?

I recently made some good experiences with CopyRight2 from Sys-Manage. You can download a trial version here: http://www.sys-manage.com/P...

1 day 48 minutes ago by JPatrick on Migrate shares from one Windows NT server to another

I have to disagree with the author's statement "If Oracle destroys OpenOffice and MySQL the Linux operating system would be left with, wh...

1 day 9 minutes ago by schumacr on Could Oracle fracture open source community?

Oracle may well kill OpenOffice and MySQL but the FOSS community has a better DB in PostgreSQL, and OOo will be forked to get out from un...

1 day 37 minutes ago by GreyGeek on Could Oracle fracture open source community?

sir want create my own accounting software but i dont know anythink abount the programing i try to improave my self with learn of some ex...

1 day 10 minutes ago by parveenidhi on Create a shortcut to a custom Word template