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>"