O'Reilly logo

Learn Windows IIS in a Month of Lunches by Jason Helmick

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 23. IIS PowerShell cheat sheet

No one (including your author) knows what your particular PowerShell needs will be when working with IIS. Fortunately PowerShell is designed to be flexible. This chapter is a collection of my favorite PowerShell commands that I keep around. Each of these is explored elsewhere in this book, but here they are together for your reference. The list is always growing and changing, but this is a good start for your own cheat sheet.

Getting a list of IIS components

PS> Import-Module ServerManager #only required for PowerShell v2
PS> Get-WindowsFeature –Name *web*

Installing IIS

PS> Import-Module ServerManager #only required for PowerShell v2
PS> Add-WindowsFeature Web-Server

Testing a default installation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required