Open SPDEVGUY opened 4 years ago
This also affects lines 2917 and 2924: $wa = Get-SPWebApplication -Identity $fullUrl
should be $wa = Get-SPWebApplication -Identity $webAppName
Line 2994: New-SPContentDatabase -Name $siteDatabase -WebApplication (Get-SPWebApplication -Identity $fullUrl
should be: New-SPContentDatabase -Name $siteDatabase -WebApplication (Get-SPWebApplication -Identity $webAppName
Specified in my installer config is:
<WebApplication Name="Portal">
<Type>Portal</Type>
<ApplicationPool>SharePoint2019.serverfarm.CA</ApplicationPool>
<Url>http://localhost</Url>
The localhost is being translated in the script to be the server running it. Perhaps this is not the best practice?
It's not best practice to use the server name or http://localhost as a SharePoint URL. Use a real DNS name instead, different from the server name.
What is your scenario? I build multi server environment over the weekend but have not seen this issue. Any thing different may be ?
Get Outlook for Androidhttps://aka.ms/ghei36
From: Brian Lalancette notifications@github.com Sent: Tuesday, March 31, 2020 12:09:03 PM To: brianlala/AutoSPInstaller AutoSPInstaller@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [brianlala/AutoSPInstaller] AutoSPInstallerModule.psm1 - Line 2882 - Fails to get existing web app for HNSC on multiple servers (#59)
It's not best practice to use the server name or http://localhost as a SharePoint URL. Use a real DNS name instead, different from the server name.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/brianlala/AutoSPInstaller/issues/59#issuecomment-606724105, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHLKYY2DTY4GOXQQ4GFXB4TRKIIR7ANCNFSM4LWEUVAQ.
Line 2882 - AutoSPInstallerModule.psm1: $getSPWebApplication = Get-SPWebApplication -Identity $fullUrl -ErrorAction SilentlyContinue
Should be: $getSPWebApplication = Get-SPWebApplication -Identity $webAppName -ErrorAction SilentlyContinue
This way it will pick up the web application using the name instead of url, which for host named site collections is created using the machine name.