Here is a script that will give you a good starting point for troubleshooting Distributed Cache for SharePoint 2013 On Premises.
Make sure to save it as a .ps1 file and run the script (Administrator) on a running Cache Host like "PS C:\> .\DistributedCacheScript.ps1", or right click "Run with PowerShell" as it will simply not work with copy paste.
I will keep adding and changing functionality if time permits, please feel free to suggest any improvements.
Small post on how to interpret the output you can find here:
- Create a folder @ C:\Distributed Cache [ServerName]
- Create files which contain things like local event logs for DC, DC commands, exported configuration XML for the Cache Cluster etc.
It will not make any changes what so ever anywhere.
Apologies for the excessive formatting code added, I like to keep things nice and clean 🙂
Decided to add more than just Cluster/Server checks, now includes also output to verify SharePoint permission issues for instance.
Due to adding more things lately, you might want to run it on all Cache Hosts when you suspect non-Cluster related settings being related to your issue.
Firewall check will only work on Server 2012 or higher.
Big thanks to Cristian Negulescu for merging 2013 and 2016 version and adding the SQL part.