Archive for the ‘SharePoint 2013’ Category

Set PeoplePicker via PowerShell, multiple domains.

PowerShell is much, much easier than the old stsadm.

To see the present settings:

$wa = Get-SPWebApplication -Identity https://your.website.something
$wa.PeoplePickerSettings.SearchActiveDirectoryDomains

—–
$wa = Get-SPWebApplication -Identity https://your.website.something
$ad = New-Object Microsoft.SharePoint.Administration.SPPeoplePickerSearchActiveDirectoryDomain
$ad.DomainName = “domainA.com”
$ad.IsForest = $true
$wa.PeoplePickerSettings.SearchActiveDirectoryDomains.Add($ad)

$a1 = New-Object Microsoft.SharePoint.Administration.SPPeoplePickerSearchActiveDirectoryDomain
$a1.DomainName = “domainB.com”
$a1.IsForest = $true
$wa.PeoplePickerSettings.SearchActiveDirectoryDomains.Add($a1)

$wa.Update()

SharePoint 2013 – Databases running in compatibility range

I ran across this a while ago, after having updated a customer’s SP 2013 to March 2012 PU.

The affected db was the BusinesDataCatalogDB which didn’t get the update even after running:

“PSConfig.exe -cmd upgrade -inplace b2b -force (-cmd applicationcontent -install -cmd installfeatures)”

According to the link you get in CA, the solution is to upgrade the SQL server to SQL 2008 R2 – well, guess what MS and your amazing built-in so-called Help”: It’s a SQL 2012! So what to do?

The solution is:

(Get-SPDatabase | ?{$_.type -eq “Microsoft.SharePoint.BusinessData.SharedService.BdcServiceDatabase”}).Provision()