PowerShell Script – Create New Web Application with Claims-Based Authentication

PowerShell Script – Create New Web Application with Claims-Based Authentication
14 votes, 4.29 avg. rating (86% score)

Introduction

The following script will create a new web application and use claims-based authentication. It’s really good and fast

Create claims based web application



NOTE: We are assuming application pool already exists

$ap = New-SPAuthenticationProvider -UseWindowsIntegratedAuthentication -DisableKerberos 
 
New-SPWebApplication -Name "Contoso Portal" 
	-ApplicationPool "Default SharePoint Web Apps" 
	-HostHeader portal.contoso.com -Port 80 -Url http://portal.contoso.com 
	-AuthenticationMethod NTLM -AuthenticationProvider $ap 
	-DatabaseName "WSS_Content_Portal"

Conclusion

Hope this simple and powerful script will help. It can be used in SharePoint 2010 and SharePoint 2013

May 14, 2014 В· Adi В· No Comments
Tags:  В· Posted in: Powershell, Sharepoint 2010, SharePoint 2013

Leave a Reply

What is 3 + 10 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)