Skip to content

Commit

Permalink
Added Search Folder to the project
Browse files Browse the repository at this point in the history
Added Search folder to the project + Additional Scripts in the Utils one
  • Loading branch information
jcgonzalezmartin committed Jul 6, 2014
1 parent 28890f6 commit 0615dc7
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions SharePoint/Search/PS_FindSearchIndexFileLocation.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
############################################################################################################################################
# Script that allows to find the SharePoint 2013 Search Index location
# Required Parameters:
# -> N/A
############################################################################################################################################

If ((Get-PSSnapIn -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null )
{ Add-PSSnapIn -Name Microsoft.SharePoint.PowerShell }

$host.Runspace.ThreadOptions = "ReuseThread"

#Definition of the function that finds the Search Index File Location
function Find-SearchIndex
{
try
{
$spSearchServiceIntance = Get-SPEnterpriseSearchServiceInstance
Write-Host "SharePoint Search Index is located at " $spSearchServiceIntance.Components.IndexLocation -ForegroundColor Green
}
catch [System.Exception]
{
write-host -f red $_.Exception.ToString()
}
}

Start-SPAssignment –Global
#Calling the function
Find-SearchIndex
Stop-SPAssignment –Global

Remove-PSSnapin Microsoft.SharePoint.PowerShell
File renamed without changes.
File renamed without changes.
Binary file not shown.

0 comments on commit 0615dc7

Please sign in to comment.