Tabrez Ajaz avatar

Create a SharePoint Web application through PowerShell

tabrez-ajaz

Published: 20 Jun 2018 › Updated: 20 Jun 2018Create a SharePoint Web application through PowerShell

Create a SharePoint Web application through PowerShell

Hello friends, in this article I'll tell you how to create a web application in SharePoint 2013 through PowerShell script.

Demo: Now I am going to create a web application with port 5566:

Steps:

First please open "SharePoint 2013 Management Shell

  • use help command followed by command name for more information --> "help New-SPWebApplication"

  • create an authentication provider for use further in creation of web application -->
    $ap = New-SPAuthenticationProvider -UseWindowsIntegratedAuthentication -DisableKerberos

  • use follwoing script for create a web application
    PS C:\Users\myUsername> New-SPWebApplication -Name "Fresher site - 5566" -Port 5566 -URL "http://dsknomoe12:5566/" -ApplicationPool "SharePoint - 80" -ApplicationPoolAccount (Get-SPManagedAccount "myPC\myUsername") -AuthenticationProvider $ap


Another way:

PS C:\Users\myUsername> New-SPWebApplication -Name "Fresher site" -Port 5566 -URL "http://dsknomoe12" -ApplicationPoolAccount (Get-SPManagedAccount "myPC\myUsername") -AuthenticationProvider $ap

cmdlet New-SPWebApplication at command pipeline position 1

Supply values for the following parameters:

ApplicationPool: FresherAppPool
image.png

WOW, WebApplication created successfully….

Leave Create a SharePoint Web application through PowerShell to:

Written by

https://www.linkedin.com/in/tabrezajaz/

Read more #sharepoint posts


Best Posts From Tabrez Ajaz

We have not curated any of tabrez-ajaz's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From Tabrez Ajaz