How to fix "The Microsoft Office cache encountered a problem" (with Office 2013 ProPlus) (PowerShell)

Introduction
This script shows how to fix "The Microsoft Office cache encountered a problem" (with Office 2013 ProPlus).

Scenarios
Some customers come across this issue that there will be an error or prompt The Microsoft Office cache encountered a problem (with Office 2013 ProPlus) when they use office 2013. This script is to try fixing that issue.

Script

Step 1: Right Click the script and select Run with PowerShell.

 

Step 2: Then there will be a dialog like following.

Here are some code snippets for your references

PowerShell
Edit|Remove
Stop-Process -Name csisyncclient  -Force  -ErrorAction SilentlyContinue 
  
Stop-Process -Name msosync  -Force  -ErrorAction SilentlyContinue 
  
$Regpath = "HKCU:\Software\Microsoft\Office\15.0\Common\Internet" 
  
Remove-ItemProperty -Path  $Regpath -Name FileStoreCriticalError -ErrorAction SilentlyContinue 
  
$item = Get-ItemProperty -Path $Regpath -Name FileStoreCriticalError -ErrorAction SilentlyContinue 
  
If(!$item) 
{ 
  $Filepath = "$env:userProfile\AppData\Local\Microsoft\Office\15.0\OfficeFileCache" 
  
  If(Test-Path -Path  $Filepath ) 
  { 
      Remove-Item -Path $Filepath  -ErrorAction SilentlyContinue -Recurse -Force 
  } 
  
} 
  
Write-Host "Operation done. Please check." 
cmd /c pause

Prerequisite

Windows 8

Office 2013

Microsoft All-In-One Script Framework is an automation script sample library for IT Professionals. The key value that All-In-One Script Framework is trying to deliver is Scenario-Focused Script Samples driven by IT Pros' real-world pains and needs. The team is monitoring all TechNet forums, IT Pros' support calls to Microsoft, and script requests submitted to TechNet Script Repository. We collect frequently asked IT scenarios, and create script samples to automate the tasks and save some time for IT Pros. The team of All-In-One Script Framework sincerely hope that these customer-driven automation script samples can help our IT community in this script-centric move.