Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jbilinski/424238345dc72000ec7d93dc840282d8 to your computer and use it in GitHub Desktop.
Save jbilinski/424238345dc72000ec7d93dc840282d8 to your computer and use it in GitHub Desktop.
bl-flush-stale-jabber-contact-cache
Function Clear-JabberContactCache
{
#Fix bad cache entries under "Contacts and recent" search headder
#Close Jabber, rename cache, start Jabber
$jabberProcN = 'CiscoJabber'
#$jabberExePath="${env:ProgramFiles(x86)}\Cisco Systems\Cisco Jabber\CiscoJabber.exe"
$jabberContactCachePath = "$env:LOCALAPPDATA\Cisco\Unified Communications\Jabber\CSF\Contacts\UDS*.*"
$time = Get-Date -Format o | foreach {$_ -replace ":", "."}
$jabberContactCacheObj = Get-Item -path $jabberContactCachePath
$jabberProcObj = Get-Process -Name $jabberProcN
Stop-Process $jabberProcObj
Rename-Item -Path $($jabberContactCacheObj.FullName) -NewName "$($time).$($jabberContactCacheObj.Name)"
Start-Process -FilePath $jabberProcObj.path
}
Clear-JabberContactCache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment