Quantcast
Channel: AutoSPInstaller
Viewing all articles
Browse latest Browse all 2279

Commented Issue: Corner case bug in MatchComputerName function [21419]

$
0
0
On line 6894 of AutoSPInstallerFunctions.ps1 is the following line of code:

```
If ($computersList -like "*$computerName*") { Return $true; }
```

While this is a nice one-liner, it will not work correctly if one computer name is subset of another. For example, assume that there is an app server named Box1 and a WFE named Box11. In this case Box1 will match both of these and the app server will get the WFE bits installed (assuming server names are used).

Interestingly, the fix is to just delete this line. The following lines, 6895 - 6904, achieve the same goal without this potential bug.
Comments: ** Comment from web user: CCCPSpy **

I just discovered this issue after I was creating a test lab with a SharePoint server named "SPRTM" and a SQL Server named "SPRTM-SQL."


Viewing all articles
Browse latest Browse all 2279

Trending Articles