how do you reset the searchadcustomquery to oob setting? which is <Property Exist = “No”> , normally used stsadm the value will showed as <Property Exit=”Yes”, Value=””>”.
to set the value back to <Property Exist = “No”> , we can use simple coding as below to reset it.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;
namespace reset_customQuery
{
class Program
{
static void Main(string[] args)
{
using (SPSite site = new SPSite(@"http://abc.com"))
{
SPWebApplication apps = site.WebApplication;
//reset to null
apps.PeoplePickerSettings.ActiveDirectoryCustomQuery = null;
apps.Update();
Console.WriteLine("Done");
}
}
}
}
to checking your value you can use the stsadm below:
stsadm -o getproperty -url "http://abc.com" -pn peoplepicker-activedirectorysearchtimeout
stsadm -o getproperty -url "http://abc.com" -pn peoplepicker-distributionlistsearchdomains
stsadm -o getproperty -url "http://abc.com" -pn peoplepicker-nowindowsaccountsfornonwindowsauthenticationmode
stsadm -o getproperty -url "http://abc.dhl.com" -pn peoplepicker-onlysearchwithinsitecollection
stsadm -o getproperty -url "http://abc.dhl.com" -pn peoplepicker-searchadcustomquery
No comments:
Post a Comment