-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Search folder to the project + Additional Scripts in the Utils one
- Loading branch information
1 parent
28890f6
commit 0615dc7
Showing
4 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.