Saturday, 14 December 2019

Creating a new Web Application Pool For hosting SharePoint Web application

Today I am providing the Power Shell Script that will create a new application pool that can be used with a SharePoint Web application as per user input and requirement.

Username - User name as Domain\username that will be used as application pool identity.
Password - Password of application pool identity
Application Pool name - Name of the application pool that you want to create.

Script will Create a new application pool on the Server where the script is executed. You have to run this script in all wfe servers where ever you web application will be executed with same application pool name and user name.

To show result in power shell screen

Dependencies –
This script should be executed from a WFE Machine
Make sure SharePoint Management Shell, Powershell or Powershell ISE what ever you are using to run this script must be started as administrator.
For executing this script User must be a Local Machine Administrator.
How to execute -
Copy this script and paste in Note pad.
Save this file as .ps1.
Run this script in SharePoint Online Management Shell/Power shell/ Power shell ISE.
Follow on screen instructions.

Get the script from following link -