Create Application Pools and Websites via PowerShell

In my daily job I need to regularly create Application Pools in IIS Manager for our innovative products (portal software which integrates with our Dynamics Add-on for example). If you just need to create one that’s an easy and quick job. However sometimes I need to create at least 8 application pools! Ofcourse this is possible by using PowerShell :) and once again I love it. It makes my work more efficient, repeatable and the quality is more in control and consistent. I not going to paste a lot of code here but will explain only the concept so you can easily build something useful for yourself.

Global steps:

  1. Open Powershell ISE
  2. Import the ‘WebAdministration’ module
  3. Use the New-WebAppPool Cmdlet to create an Application Pool
  4. Use the New-Website Cmdlet to create a website




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s