Tuesday, February 5, 2013

Some usefull powershell commands for fixing content index state when failed

Set content index state of particular database in PS:
Set-MailboxDatabase -identity -indexenabled $true

List databases with content index in failed state:
Get-MailboxDatabaseCopyStatus -Server   | ? {$_.contentindexstate -eq "failed"}

Reset search index for particular database ( need to be in script directory - C:\Program Files\Microsoft\Exchange Server\Scripts):
.\ResetSearchIndex.ps1 -force

Update replication of catalog only on database:
Update-MailboxDatabaseCopy -identity \ -CatalogOnly

Update catalog index state only on all failed databases:
Get-MailboxDatabaseCopyStatus -Server em-bk-exmb01  | ? {$_.contentindexstate -eq "failed"} | update-mailboxdatabasecopy -catalogonly

No comments:

Post a Comment