3

I cant find a definitive way to install and configure IIS on server 2019

Add-WindowsFeature
Enable-WindowsOptionalFeature
Install-WindowsFeature
is dism still a thing?

I need to install IIS with the following modules:

  • asp-net-45
  • dynamic compression
  • all management tools
  • need to enable remote management so I can deploy to it with webdeploy

I see examples with all the above tools but seems some are wrong/outdated

Starting fresh with 2019 what is the correct command/tools to install and configure IIS via a script?

red888
  • 4,183
  • 18
  • 64
  • 111

1 Answers1

5

Install-WindowsFeature and is what you need. However it does the same thing as Add-WindowsFeature. Install-WindowsFeature is the modern equivalent for installing a feature onto a running operating system.

Enable-WindowsOptionalFeature is equivalent to the older dism commands. It can also be applied to offline Windows images (such as a WIM)

Mark Henderson
  • 68,823
  • 31
  • 180
  • 259
  • finally a definitive answer lol. so I can install IIS and all those modules (on server 2019) with just the Install-WindowsFeature command? – red888 Feb 14 '20 at 15:03
  • You can do everything except the remote management part with `Install-WindowsFeature`. The remote management part of IIS sucks, and AFAIK it is still done by manipulating IIS directly by installing the remote management modules. – Mark Henderson Feb 16 '20 at 09:56