Tuesday, April 7, 2015

How to create SPWeb Application in a SharePoint Farm through PowerShell?


$ap = New-SPAuthenticationProvider
New-SPWebApplication -Name "MySite" -Port 443 -HostHeader mysites.portal.com -URL "https://mysites.portal.com" -ApplicationPool "MySiteAppPool" -ApplicationPoolAccount "hydtc001" -DatabaseName "WSS_Content_MySite" -AuthenticationProvider $ap –SecureSocketsLayer