If you use a named instance for SQL as well as a custom port (i.e., MYSERVER\SP,14331) the generated script block AutoSPInstaller-ScriptBlock.ps1 contains an invalid command to create a new Profile Service Application.
To fix, modify the following line to include quotes around the DBServer parameters:
AutoSpInstallerFunctions.ps1, Line 3444:
```
Write-Output "`$newProfileServiceApp = New-SPProfileServiceApplication -Name `"$userProfileServiceName`" -ApplicationPool `"$($applicationPool.Name)`" -ProfileDBServer `"$($profileDBServer)`" -ProfileDBName $profileDB -ProfileSyncDBServer `"$($syncDBServer)`" -ProfileSyncDBName $syncDB -SocialDBServer `"$($socialDBServer)`" -SocialDBName $socialDB -MySiteHostLocation $mySiteHostLocation $mySiteManagedPathSwitch" | Out-File $scriptFile -Width 400 -Append
```
To fix, modify the following line to include quotes around the DBServer parameters:
AutoSpInstallerFunctions.ps1, Line 3444:
```
Write-Output "`$newProfileServiceApp = New-SPProfileServiceApplication -Name `"$userProfileServiceName`" -ApplicationPool `"$($applicationPool.Name)`" -ProfileDBServer `"$($profileDBServer)`" -ProfileDBName $profileDB -ProfileSyncDBServer `"$($syncDBServer)`" -ProfileSyncDBName $syncDB -SocialDBServer `"$($socialDBServer)`" -SocialDBName $socialDB -MySiteHostLocation $mySiteHostLocation $mySiteManagedPathSwitch" | Out-File $scriptFile -Width 400 -Append
```