$urlDomain = $url.TrimStart($splitURL[0] + ".")
```
in Add-LocalIntranetURL is writing an incorrect domain by trimming off the first character. Previous line from 3.93 worked.
More info on the issue with TrimStart: http://social.technet.microsoft.com/Forums/en-US/bc18e3a4-aaad-474f-856e-b8649640d728/stringtrimstart-is-returning-the-incorrect-value
Comments: ** Comment from web user: PatrickHub **
Hi Brain,
Thanks for the script, it has been used a lot to install SharePoint here.
When making a flow diagram, I thought that I had found a bug.
After testing a couple of possibilities, this turned out to be indeed a bug.
```
function testFunction {
param($url)
if($url -like "*.*")
{
$url = $url -replace "http://", "" -replace "https://",""
write-host -f Yellow "The url is $url `n"
$spliturl = $url -split "\."
write-host -f Yellow "The splitted parts are:"
$spliturl
$urldomain = $url.trimstart($spliturl[0]+".")
write-host -f Yellow "`nThe urldomain variable is $urldomain `n"
}
}
write-host -f Green "Testing function http://spdev.domain.int"
testFunction "http://spdev.domain.int"
write-host -f Green "Testing function http://spdev"
testFunction "http://spdev"
write-host -f Green "Testing function http://spdev.country.company.int"
testFunction "http://spdev.country.company.int"
```
This is your function Add-LocalIntranetURL without checking the property of the web application and without adding keys
It just displays the variables in the different steps.
More details:
If you try to add http://spdev.domain.int to the local intranetzone, you will see that this is added as omain.int
If you try this for http://spdev , you will see that the function does nothing
If you try this for http://spdev.country.company.int , you will see that he adds country.company.int
I thought it could fit in this issue, because it is kinda related.
Kind Regards,
Patrick