The user profile service application provision does not work when a host named site collection is used for the mysite host.
First, the code for Create MySites Web Application and Create MySites Site Collection must be commented out in the function CreateUserProfileServiceApplication as this code will only create a path based site collection. Alternatively the MySite Host can be created during the web application provisioning if its included in the site collections list.
The second issue is the site URL is not detected properly as the script uses the following logic to determine the mysite URL:
$mySiteWebApp = $xmlinput.Configuration.WebApplications.WebApplication | Where {$_.type -eq "MySiteHost"}
$mySiteURL = $mySiteWebApp.url
$mySitePort = $mySiteWebApp.port
This URL is the host name site collection URL not the MySite URL.
Comments: ** Comment from web user: bobchauvin **
First, the code for Create MySites Web Application and Create MySites Site Collection must be commented out in the function CreateUserProfileServiceApplication as this code will only create a path based site collection. Alternatively the MySite Host can be created during the web application provisioning if its included in the site collections list.
The second issue is the site URL is not detected properly as the script uses the following logic to determine the mysite URL:
$mySiteWebApp = $xmlinput.Configuration.WebApplications.WebApplication | Where {$_.type -eq "MySiteHost"}
$mySiteURL = $mySiteWebApp.url
$mySitePort = $mySiteWebApp.port
This URL is the host name site collection URL not the MySite URL.
Comments: ** Comment from web user: bobchauvin **
There don't appear to be any comments in the answer files, per the note above. Any more details would be appreciated.