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.

Inputs
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.

Outputs
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.

Example-
To show result in power shell screen
.\scriptname.ps1

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 -
https://drive.google.com/file/d/1bKMsUnOQ8LCG45vGtpi7KJiL5dy2BEvz/view?usp=sharing