Quantcast
Channel: SharePoint 2013 - Setup, Upgrade, Administration and Operations forum
Viewing all articles
Browse latest Browse all 21070

PowerShell Script: Create web application & site collection

$
0
0

Good morning, I'm a little new to PowerShell, so please correct me if I'm wrong, or using the wrong teminology. I'm trying to create a host header web application and a site collection, but when I try to make the site collection, it says the URL is already in use!

$webAppName = "Test Web Application"

$hostHeaderURL = http://something.something.local

$ap = New-SPAuthenticationProvider

New-SPWebApplication -Name $webAppName -Port <####> -URL $hostHeaderURL -HostHeader $hostHeaderURL -ApplicationPool "TEST AppPool" -ApplicationPoolAccount "<DOMAIN\ADMINISTRATOR>" -DatabaseName "<DatabaseName> -AuthenticationProvider $ap

New-SPSite -URL $hostHeaderURL -OwnerAlias "<DOMAIN\ADMINISTRATOR>"


Viewing all articles
Browse latest Browse all 21070

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>