Created
July 2, 2016 01:01
-
-
Save jbilinski/424238345dc72000ec7d93dc840282d8 to your computer and use it in GitHub Desktop.
bl-flush-stale-jabber-contact-cache
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
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