Martin Bodocky

No less, no more. Just live between code.

Monthly Archives: July 2012

Crawling File Share in SharePoint 2010 Search

Today I did discovering of crawling file shares in SharePoint 2010, for that we need some particular things:

  • Check Content Access Account
  • Give permission on file share location
  • Set up Content source and Crawling
  • Set up search scope
  • Available in search dropdown list on page

Check Content Access Account

Specify an account to use as default account when crawling content.  This account must have read access to the content being crawled. To avoid unpublished versions of documents, ensure that this account doesn’t have full permission on particular location.

Give permission

We can do that trough explorer or another file manager.

Set up Content Source

Go to Search administration and click on Content Sources on left panel.

 

Click on New Content Source:

 

Set Content source, mainly name and location:

After execution we can see successful crawling:

We can make us sure in crawling log, select from context menu on item:

Set up search scope

Go to Search Administration on left panel click on Search Scope, inside click on New Scope:

Next fill name of your new scope out:

Then add new rule, rule type will be Content Source, selected you previous created content source and select include:

After that you must wait for re-crawl which is executed automatically, summary looks similar like this:

Available in search dropdown on page

As first step you must create search centre site on your site collection, in this case, doesn’t matter which search centre you are choosing, we can work with Basic Search Centre:

Copy url of recently created site and past it to Search Setting on parent site collection settings, and remove “default.aspx”:

Finally go to Search Scope settings and add you scope to “Display Groups” also called as “Search Dropdown”:

Add scope to list:

Test on you main site:

Result:

I hope that helps.

Happy SharePointing! :)

SharePoint 2013 Preview

Hi guys,

The long expecting time is here! SharePoint 2013 Preview, it looks as Windows 8  :)

Useful Links:

  • Download links.
  • Developing Training modules here.
  • The official news here.
  • Download center search result here.
  • Features in AppStore here.
  • Installation Tips & Tricks here.
  • Screenshots here.

Happy new SharePointing 2013!

Run the SPDisposeCheck in the PowerShell

Hi All,

I have made these days some deployments and I wanted test all my source code in one way.  Making script in PowerShell is my outcome.  Script contains recursive getting files with “.dll” extension, yes I can do the same with extension “.wsp” and unzip package and I decided it might be as simple as possible. Later on, it creates folder in your current location and all output are written there.

Have a look :)

function global:Get-SPDisposeCheck

 {

Write-Host “Recursive check current location …”

$path = $PWD.Path 

#checking actual location recursively 

$Dir = get-childitem $path -recurse 

#all files with dll extension 

$List = $Dir | where {$_.extension -eq“.dll”

#made new folder for results 

$export = $path+ “\” “SPCheck_$((get-date).toString(‘yyyyMMdd-hhmmss’))”

$dir = md $export 

#on every file execute SPDisposeCheck 

$List | ForEach-Object

Write-Host$_.Name “is beeing checked…” 

$report = $export + “\” + $_.Name + “.spdisposecheck.txt” 

#in some point, you can use the same dll files, it will be overridden 

& “C:\Program Files (x86)\Microsoft\SharePoint Dispose Check\SPDisposeCheck.exe”$_.fullname | Out-File $report -Force }

#open result folder to review 

explorer $export 

}

Execute in PowerShell and see output:

Happy SharePointing guys :)

Follow

Get every new post delivered to your Inbox.