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.
- Open Powershell ISE
- Import the ‘WebAdministration’ module
- Use the New-WebAppPool Cmdlet to create an Application Pool
- Use the New-Website Cmdlet to create a website