Required Help - To Install new features in IIS through Octopus

Hi,

I am having a requirement of doing the below manual process through octopus. Can you please share the required documents or steps if you have any?

Requirement:
Server–>IIS Manager–>Add roles and features–>Go on until you reach the Server Roles tab–>Expand Web Server (IIS)–>Select the below mentioned service roles–>Click Add Features–>Click next–>Click Install

  • IIS 6 Metabase Compatibility
  • IIS 6 Scripting Tools
  • IIS 6 WMI Compatibility

Hi,
Thanks for getting in touch! One option which comes to mind here could be to define a script step type in Octopus and run it against your IIS Server target to install the desired features.

The steps included to perform this process are:
Step 1. Login to your Octopus Server and create a new Project called Configure IIS Server
Step 2. Under Process, create a new Step with the type Run a script, then give it a name like Install Windows Features. Here you can select the role of one of your IIS Servers under Execution plan.
Step 3. Under Script Content, define a PowerShell script which will call the desired commands to install the features that you require, an example script could look something like:

#Example Script, Install Windows Features
Install-WindowsFeature -Name Web-Mgmt-Tools, Web-Metabase

In this case the script above is just an example and you could experiment to see which features are required for your exact scenario. In general you should be able to make use of the Windows PowerShell cmdlet Install-WindowsFeature (or Add-WindowsFeature if you’re on Server 2008R2) to take care of the actual work.

For example, you could manually login to your IIS Server, open PowerShell and then use the Get-WindowsFeature -Name "Web-*" to see which features are available, then simply call the Install-WindowsFeature cmdlet from your script above for the specific feature.


Example of getting available Windows Feature

image
Example of Installing Available Windows Features (In your script you would not use the -whatIf switch unless you were just testing to see what would happen if you ran that cmdlet)

I hope this has been helpful and I would love to hear how you go here.

Kind regards,
Lawrence.