Flush the configuration cache using PowerShell

Outdated configuration cache in SharePoint 2010/2013/2016 can give strange errors in for example timer jobs. To get rid of the outdated configuration cache you need to clear this manually or by using this very easy to use powershell script.

This powershellscript will loads the SharePoint add-in into PowerShell, stops the SharePoint Timer Service, deletes the cache (xml) files, resets the cache by setting the value in the cache.ini file to 1 and at the end it will start the SharePoint Timer Service.