Skip to content

Instantly share code, notes, and snippets.

@bill-long
Created December 30, 2020 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bill-long/6e36c7ed0718908c0679c0e9d00ee6b3 to your computer and use it in GitHub Desktop.
Save bill-long/6e36c7ed0718908c0679c0e9d00ee6b3 to your computer and use it in GitHub Desktop.
param($Database, $MailboxNumberToWatch)
$startingNumber = 0
$currentNumber = 0
$results = .\Count-PhysicalIndexes.ps1 -Database $Database -SaveResults $true
$startingNumber = ($results | Where-Object { $_.MailboxNumber -eq $MailboxNumberToWatch }).IndexCount
$currentNumber = $startingNumber
do {
Start-Sleep -Seconds 300
$currentNumber = ($results | Where-Object { $_.MailboxNumber -eq $MailboxNumberToWatch }).IndexCount
} while ($currentNumber -eq $startingNumber)
logman stop ExchangeDebugTraces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment