AutoSPInstaller
AutoSPInstaller copied to clipboard
AutoSPInstallerModule.psm1 Fails to make SQL alias correctly if WFE name is similar to SQL host name.
Unusual environment has discovered an edge case!
The WFE host is "NMS-SPUAT" the SQL Host is "NMS-SPUATSQL".
in AutoSPInstallerModule.psm1 Function Add-SQLAlias () line 7256:
If ((MatchComputerName $SQLInstance $env:COMPUTERNAME) -or ($SQLInstance.StartsWith($env:ComputerName +"\"))) {
$protocol = "dbmslpcn" # Shared Memory
}
else {
$protocol = "DBMSSOCN" # TCP/IP
}
Match computer name is returning a false positive as this is supposed to be checking if the SQL host is the same machine as the sharepoint host and using named pipes instead of TCP/IP.
The cliconfig entry also gets really odd...

Changing it to:
If (($SQLInstance -eq $env:COMPUTERNAME) -or ($SQLInstance.StartsWith($env:ComputerName +""))) {
May fix it, I'll leave it to your team to fix it the best way possible