Chapter 27. Provisioning IIS web servers and sites with PowerShell

 

Jason Helmick

The following scenario is common if you’re an administrative web master, and here’s how it was delivered to me: “Deploy a highly available web farm (four servers) with a couple of websites, including certificates, for a new secure shopping site. Make sure to enable graphical remote management for IIS Manager so that other admins and developers can make changes; and, by the way, did we mention we’re moving to Windows Server 2012 Core?” (See figure 1.)

Figure 1. The deployment goal of a web farm with multiple websites

This isn’t a complicated project, thanks to the support of PowerShell and the Internet Information Services (IIS) cmdlets, but you may encounter tricky spots and gotchas along the way.

Initially I solved this problem by using PowerShell interactively to complete the required tasks. As a smart and lazy admin, I saved the commands to a script so that in the future I could automate similar deployments without all the typing. I even turned some of the tasks into advanced functions so that other admins could accomplish some of the trickier stuff.

In this chapter you’ll see how I interactively solved this deployment scenario, and I’ll also show you how to automate it. The entire process from beginning to end involves these tasks:

Rapid IIS deployment

Transferring website files and certificates

Enabling remote management for IIS Manager

Creating a load-balanced web farm

Creating an SSL website

Automating the process

Summary

About the author

sitemap