Check SCCM DP State is a PowerShell script that will check the Packages State on the Distributions servers (WMI and Content Lib). The Result will be logged into a log file and on the default output for future investigations. You can check all of your Distributions server or just one dedicate Server.
It detects any Package on the Distribution Servers that is missing or too much and this on the WMI as well on the Content Lib.  The script works with PowerShell version 5.1 and higher, and is tested on Windows 10, Windows Server 2016 and Windows Server 2012. To run this script, you need Admin Rights on the SCCM Site Server and on each DP. This Script required WINRM for the remote connections.