Monday, May 28, 2012

Out of Box Search WebParts in SharePoint 2010

Leave a Comment


View more presentations from milanchauhan
Read More...

Tuesday, May 15, 2012

Search Options in SharePoint 2010

Leave a Comment



View more PowerPoint from milanchauhan
Read More...

Monday, May 7, 2012

Get Root Organization using Powershell Script

Leave a Comment

To create this script, open notepad or any other text editor and save it as .ps1

To start with, we need to get reference of site through which we can get reference for ServiceContext

$site = Get-SPSite("site url")

$serviceContext = Get-SPServiceContext($site)

$opm = New-Object 
Microsoft.Office.Server.UserProfiles.OrganizationProfileManager($servicecontext)

// Here Root organization can be referred by 2 ways either my passing ID as 1, because root organization ID is always 1.

$orgProfile = $opm.GetOrganizationProfile(1)

// Or it can be referred with RootOrganization Property

$orgProfile = $opm.RootOrganization

Write-Host $orgProfile.ID

Read More...