Skip to content

Instantly share code, notes, and snippets.

@michaellwest
michaellwest / RebuildSearchIndexesWithProgress.ps1
Created Sep 8, 2015
Rebuild all of the Sitecore content search indexes with a progress dialog.
View RebuildSearchIndexesWithProgress.ps1
Get-SearchIndex | Rebuild-SearchIndex -IncludeRemoteIndex
$jobs = [Sitecore.Jobs.JobManager]::GetJobs() | Where-Object { !$_.IsDone -and $_.Category -eq "Indexing" } | Sort-Object -Property Name
$jobsCount = $jobs.Count
while(($jobs | Where-Object { !$_.IsDone })) {
$progressCount = 0
$message = New-Object System.Text.StringBuilder
foreach($job in $jobs) {
$message.AppendLine("$($job.Name) is $($job.Status.State) and processed: $($job.Status.Processed)") | Out-Null
@patrickperrone
patrickperrone / ChangeSearchProvider.ps1
Last active Nov 2, 2017
This PowerShell script will change your Sitecore instance search provider from Lucene to Solr or vice versa.
View ChangeSearchProvider.ps1
function Get-ConfigFileFilter([string]$providerName)
{
return "^.*\." + $providerName + "\.(.+\.)?config.*$"
}
function Set-SCSearchProvider
{
$rootPath = Read-Host "What is the path of your Sitecore instance's website folder?";
$choice = Read-Host "(L)ucene or (S)olr?";