It was the League Two side who started with a couple of early attempts when Levi Sutton saw his shot collected by Matthew Cox before he shot well wide from distance a few moments later.
Deji Sotona then floated in a dangerous cross on six minutes after he cut inside from the right, but his effort just evaded Nathan Young-Coombes in the box. Another attempt then went begging in what was an entertaining opening period of the game as a Bradford cross into the box bounced awkwardly and Nathan Delfouneso smashed over from close range.
12 minutes in The Bees could well have been ahead when Sotona was found in space before driving forwards. Midfielder Dom Jefferies did fantastically on the overlap to get alongside him but as he received the ball the keeper was out quickly to collect.
Just before the 20-minute mark Brentford were almost in front in excellent fashion. As Cox's ball forward wasn't dealt with, the ball sat up nicely for Young-Coombes to volley towards goal from 35-yards, but it ended on top of the net as it remained goalless.
Andy Cook then pounced on a mishap in defence, and with just Cox to beat, he was unable to keep his effort on target as he slotted wide of the left-hand post. That preceded a moment where The Bees did get the ball in the net just after the 30-minute mark when Daniel Oyegoke, who threatened regularly throughout down the right, crossed for Peart-Harris, and as the ball was threaded towards Jefferies, he was pulled up for offside despite slotting home.
Four minutes before the break The Bees did get their goal, though, and it came when the ball was won back in midfield before Young-Coombes slid a pass through the middle for Alex Gilbert. The youngster got a shot away from the edge of the box but despite the keeper's save, it sat up nicely for Peart-Harris to nod home from close range as Neil MacFarlane's side took a lead into the break.
The second half saw the match continue in a similar manner with a good chance coming on 57 minutes for The Bees as they found the net again- but for the offside flag once more. As Young-Coombes set Gilbert away, the ball was then threaded into the path of Sotona, who rounded the keeper and slotted home before being pulled back.
On 75 minutes it became 2-0 as a much changed Brentford side, due to a number of substitutes retainted their rhythm to double the side's advantage. It came when a crossfield pass found the chest of Wraynel Hercules before he helped it onto the path of one of the Trialists. His cross was then deflected into the path of Trevitt, who controlled well before slotting in at the near post to help the side to a well deserved win.
Bradford City AFC: Trialist, Cooke, Cook, Foulds, Kelleher, Evans, Staunton, Sutton, Scales, Lavery, DelfounesoSubs: Richardson, Rowe, Pointon Wood, Wilson, Roberts, Robinson
Brentford B: Cox (Rees, 70) Oyegoke (Oksanen, 60) Gordon (Hercules, 70) Jones (Russell, 60) Jefferies (Trialist, 70) Young-Coombes (Mpongo, 70) Gilbert (Adedokun, 60) Sotona (Trevitt, 60) Syla (Trialist, 60) Crama, Peart-Harris