Thursday, 1 August 2013

SharePoint restrict people picker to a specific Active Directory OU Group

Another note to self here. If you want to restrict what appears in the SharePoint people picker to a specific OU in Active Directory you can using the following command:

 stsadm -o setsiteuseraccountdirectorypath -path "CN=Sales,DC=ContosoCorp,DC=local" –url http://server_name

A point of note is that it will not restrict users which are already in the site collection, only new users which are added.

More command details here:

http://technet.microsoft.com/en-us/library/cc263328(office.12).aspx

Thursday, 13 June 2013

Configure Search Scopes and Site Collection Display Groups with PowerShell

Note for myself again.

I wanted to create search scope which returned results from a specific area in my SharePoint site collection. I also wanted this scope to be available in the site collection's "Scopes drop down".

This code did the trick

$createdScope = New-SPEnterpriseSearchQueryScope -Name "Specific area" -Description "Project sites" -SearchApplication $searchapp -DisplayInAdminUI $true $rule = New-SPEnterpriseSearchQueryScopeRule -RuleType "Url" -Url "http://portal" -MatchingString "http://portal/SpecificArea" -FilterBehavior "Require" -UrlScopeRuleType "Folder" -scope $createdScope $Site = Get-SPSite -Identity http://portal $searchContext = [Microsoft.Office.Server.Search.Administration.SearchContext]::GetContext($Site) $scopes = new-Object Microsoft.Office.Server.Search.Administration.Scopes($searchContext) $displayGroup = $scopes.GetDisplayGroup("http://portal", "Search Dropdown") $displayGroup.Add($scopes.GetSharedScope("Specific area")) $displayGroup.Update()

This script was created based on the following posts so thanks the authors for pointing me in the right direction:
http://social.technet.microsoft.com/Forums/en-US/sharepointadminprevious/thread/6159b4b5-ec8a-4184-b5e8-1a226eff1cee/
http://onlinecoder.blogspot.co.uk/2012/12/powershell-script-to-create-search.html



Configure Search Crawling with PowerShell

A note to myself really so that I can find it easily.

As part of an installation script I wanted to configure an incremental crawl schedule then start a full crawl. The following script met these needs:

$searchapp = Get-SPEnterpriseSearchServiceApplication "Search Service Application"

$contentsource = Get-SPEnterpriseSearchCrawlContentSource "Local SharePoint Sites" -SearchApplication $searchapp

$contentsource | Set-SPEnterpriseSearchCrawlContentSource -ScheduleType Incremental -DailyCrawlSchedule -CrawlScheduleRunEveryInterval 1 -CrawlScheduleRepeatInterval 170 -CrawlScheduleRepeatDuration 180 -Confirm:$false

$contentsource.StartFullCrawl()

This script was created based on the following posts so thanks the authors for pointing me in the right direction:
http://blogs.technet.com/b/heyscriptingguy/archive/2010/09/28/how-to-use-sharepoint-2010-windows-powershell-cmdlets-to-manage-search-crawls.aspx
http://habaneroconsulting.com/en/insights/Setting-crawl-schedules-with-PowerShell.aspx#.Ubm3sfmG3LM



Saturday, 6 April 2013

Disable loopback check with PowerShell



Whilst installing SharePoint 2013 the other day I found a very useful bit of PowerShell which will disable the loopback check.

$regKeyPath = "HKLM:\System\CurrentControlSet\Control\Lsa"
$key = "DisableLoopbackCheck"
New-ItemProperty -Path $regKeyPath -Name $key -Value "1" -PropertyType dword

It should be remembered that disabling the loopback check should only be done in certain scenarios. It is certainly not recommended on Production machines.

Thursday, 14 February 2013

Edit Control Block (ECB)


Now I may well be setting my self up for a big slap with this one but I thought I would go for it anyway. When you are looking at a list item and you activate the drop down box from the item (you know the one with view item, edit item, alert me, delete etc.)  there is a name for it.

I have heard it described as :

  • Item drop down
  • Item Context menu
  • Right click menu (good luck with that).
  • And more


It is however called the "Edit Control Block (ECB)"

Good times. Now line up and give me my punishment for not knowing this. I am picturing a scene like out of Airplane where that woman is getting hysterical and an orderly queue is formed.

Thursday, 15 November 2012

SharePoint 2010 : Records Center : Site Hierarchy / Metadata Navigation missing

A real quickie for reference.

I was configuring the records center in SharePoint 2010 today and it took me a while to work out that in order to view the Site Hierarchy navigation panel which is so widely advertised on the left hand side of the page you need to activate the "Tree view".

Probably should have been obvious but hey, it wasn't at the time.

Site settings -> Tree view -> Enable Tree View

Tuesday, 14 August 2012

SharePoint 2013 : Installation at first glance


I just watched a video showing a 2013 install so thought I would share for those who havent had time to do one like me. The install went from clean server to providing a site collection.

Points as follows:

  • Install procedure is essentially the same as 2010. Install pre-requisites -> Install SharePoint -> Run configuration wizard to create a new farm specifying  database access criteria ->  Specify port for central administration etc.
  • A wizard fires as in 2010 which offers the automatic create of services (service apps).
  • Central administration looks slightly different at first glance but a second look shows that things havent changed that much at all.
  • The provisioning of a team site collection was the same. Create a web application -> Create a site collection by choosing a template. One thing that was different was that it looked like  you were able to choose a version of the template so 2013 or 2010 (not sure if 2007 was there) which was quite interesting.

All in all though the installation procedure seems to be the same.

Video is at : http://youtu.be/FC_mF23TlSg