How to Install IIS 7.0 on Server 2008 from command line / Script

by Nideesh C on February 9, 2011 · 1 comment

in Server2008




You can install IIS from command line on Server 2008 using pkgmgr.exe.

Start /w pkgmgr.exe /iu:IIS-WebServerRole;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI

IIS 7.0 Configuration Files Explained

IIS 7.0 use configuration files instead of the IIS metabase. IIS 7.0 configuration consist of four files.

1. Machine.config – These settings apply globally.
2. ApplicationHost.config – These settings are specific to IIS. Found in %systemroot%\system32\inetsrv
3. Web.config, root-level – These settings are shared by .NET applications. Found in %systemroot%\ Microsoft.NET\Framework\versionNumber\CONFIG.
4. Web.config, application-level – These settings apply to a specific .NET application.

Managing IIS 7.0 from command line on Server 2008

You can use %WINDIR%\system32\inetsrv\APPCMD.EXE to manage IIS 7.0 from command line in Server 2008.

Examples:
List all sites and its details
Appcmd.exe list SITE

List Default Web Site
APPCMD.EXE list SITE “Default Web Site”

List started sites
APPCMD.EXE list SITE /state:started

List all start / stopped application pools

APPCMD.EXE list apppools /state:started
APPCMD.EXE list apppools /state:stopped

Add a site called MySite on Port 80 in c:\inetpub\MySite
APPCMD.EXE add site /name:”MySite” /id:123 /bindings:”http:/*:80:”
/physicalPath:”C:\inetpub\MySite”

List real time HTTP requestes
APPCMD.EXE list requests

List IIS configuration
APPCMD.EXE list config

Backup IIS configuration
APPCMD.EXE add backup IISBACKUP

Restore IIS configuration
APPCMD.EXE restore backup IISBACKUP

Not Satisfied ? Just search & get the result

Related Posts Plugin for WordPress, Blogger...
Be Sociable, Share!

Related posts:

  1. How to disable Dynamic DNS Registration from command line on Server 2008 host
  2. Compare different version of Windows Server 2008
  3. How to Install “Internet Information Service” in Windows XP
  4. How to Manage Windows Server 2008 Core Server Roles
  5. How to Manage Windows Server 2008 Core Local Settings

{ 1 comment… read it below or add one }

1 bjdnxy March 7, 2011 at 4:08 am

How to Install IIS 7.0 on Server 2008 from command line / Script

Reply

Leave a Comment

Previous post:

Next post: