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: IvanJosipovic **
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: IvanJosipovic **
The setup is supported. However, the default mysite provisioning process will create Path Based Sites!
My Sites
When you use both types of site collections with My Sites, consider implementing your own provisioning process to create My Sites as host-named sites instead of path based sites.
http://technet.microsoft.com/en-us/library/cc424952.aspx