With this mod, the sentries will no longer target Shields from the front, their reaction time is much faster, they will be considerably less likely to shoot at enemies whom they will not actually damage (ie, not behind cover or windows), and their targeting priority is streamlined and based on distance. The result is sentries that are much more combat effective, reactive, and less prone to burn through what little ammo they have.
Additionally, if the sentry has not been destroyed, you can replenish some of its ammo and repair some of its armor by hitting it with your melee. With every hit, 1/5th of the sentry's max ammo and 1/5th of its maximum armor is restored to it at the cost of 1/10th of your current weapon's max ammo (for those doing the math, that means it takes 50% of the max ammo of your current weapon to fully repair or replenish a sentry). If the amount of ammo in your current weapon is below 1/10th of your maximum possible ammo amount, you cannot repair/replenish the sentry. You can tell you have successfully done so when the sentry beeps.
To use, you need either Harfatus' Hook version 3.2.2 (provided in HoxHud P9.1.7) or WTFBM HUD. Once you have the IPHLPAPI.dll file in your main PD:TH folder (with the game exe), just drop in the "lib" folder contained in this mod in that same location and you should be good to go.