Who are these scripts for? You need to troubleshoot performance problems with SQL Server, and you need to do it now. You don't have time to track down a bunch of DMVs, figure out Extended Events, ...
--Check if any active replication transaction, if no long running replication transactions than run sp_repldone procedure to reset replication flag for log reuse wait description. --If CDC is enabled ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results