What is the best way to install IIS URL Rewrite module through Octopus?

As part of setting up IIS in my server deployment process, I need to install the IIS URL Rewrite module and make sure it succeeds before continuing on with later steps. I found a PowerShell script that can install it from a network share, but I was wondering if there is a more elegant solution?

Hi Mark,

Thanks for reaching out. We don’t have a built-in step to install that module, so doing it via Powershell would be the way to go.


Hi Mark,
Can you share your PowerShell script to IIS URL Rewrite module through octopus?
I need to this, thanks.

We decided to use Chocolatey instead of the Powershell script. The Powershell script I found is here if you need it: https://www.reddit.com/r/PowerShell/comments/54xste/install_url_rewrite_module_wpowershell/
It’s the last response, by topherrr.

The direction we went was to run a Chocolatey – Ensure Installed step and then a Chocolatey – Install Package step that installs the “urlrewrite” Chocolatey package. Might be overkill to use Chocolatey for one package, but it seems cleaner to us.