Is the wiring harness on a 2005 Z71 set up for trailer brakes if you buy controller?
No, a 2005 Chevy Silverado Z71 does not come standard with the wiring harness necessary for trailer brakes, even if you buy a brake controller. While it likely has the 7-pin connector, the actual wiring for the trailer brake function isn't included unless it was a factory option. You'll need to add a wiring harness specifically designed for trailer brakes to your truck to complete the installation.