Wednesday, July 8, 2015

Sorry, we're having trouble reaching the server

I recently set up a SharePoint Server and every time I attempted to use the People Picker, I got the dreaded message "Sorry, we're having trouble reaching the server."



I looked at a wide variety of articles concerning this issue and our particular issue had nothing to do with memory allocated to the server, so I began investigating other solutions.

Since we were using Disjoint Namespaces in our Active Directory domain, I figured there might be a problem with the People Picker due to this.

Fortunately, I came across this SharePoint article:  https://technet.microsoft.com/en-us/library/gg602075.aspx

Now, I LOVE PowerShell, so I was not about to resort to the command line to execute these commands, so I created my own version of the PowerShell commands:

$STSADMPath = @"
"C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\BIN\STSADM.EXE"
"@
$SPPassword = "P@ssw0rd"
 
$STSSetPasswordCmd = "cmd /c $STSADMPath -o setapppassword -password $SPPassword"
Write-Host $STSSetPasswordCmd
Invoke-Expression -Command $STSSetPasswordCmd


$STSADMPath = @"
"C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\BIN\STSADM.EXE"
"@
$SharePointUrl = "https://sharepointdev.mycompany.com"
$DomainName = "dev.mycompany.com"
$LoginName = "mycompanydev\shareptadmin"
$LoginPwd = "P@ssw0rd"
 
$STSSetPeoplePickerCmd = @"
cmd /c $STSADMPath -o setproperty -url $SharePointUrl -pn peoplepicker-searchadforests -pv "domain:$DomainName,$LoginName,$LoginPwd"
"@
Clear-Host
Write-Host $STSSetPeoplePickerCmd
Invoke-Expression -Command $STSSetPeoplePickerCmd

Once I ran the STSADM People Picker command, my People Picker issue was resolved!!


No comments:

Post a Comment