Skip to main content

Posts

Showing posts with the label 2010

Create Search Scope and apply ruele using power shell also define Search Setting to Site Collection

[string]$searchSiteName = "Search" # Creates the search scope on site so it shows on the dropdown function CreateSearchScope([string] $siteURL){     # Variables for Site     [string]$searchServiceApplicationName = "Search Service Application"     [string]$adminServiceName = "SPAdmeinV4"     [string]$lmsContentTypeTemplateID = "STS_ListItem_10001"     [string]$searchDropDownValue= "Search Dropdown"     [string]$scopeName = "LMS Search"     # Gets the Search Service Application Object     Write-Host "Get-SPEnterPriseSearchServiceApplication" -foregroundcolor green     $ssa = Get-SPEnterPriseSearchServiceApplication -Identity $searchServiceApplicationName     # Get the root web     Write-Host "Get the root web." -foregroundcolor green     $site = New-Object Microsoft.SharePoint.SPSite($siteURL)    ...