BOSTON — Michael DiPietro turned aside all 28 Nashville shots for his first NHL shutout Thursday, helping the Bruins beat the Predators 6-0 at TD Garden and stretch their run of games with a point to seven.

David Pastrnak contributed two goals and two assists, while Charlie McAvoy assisted on four goals. Boston improved to 8-2-1, winning in its return from a four-game trip that produced three victories and an overtime loss. The Bruins are 6-0-1 during their current point streak.

The shutout came on Boston’s Hockey Fights Cancer Night and followed another milestone for DiPietro. He earned his first NHL win the previous Friday at Anaheim, stopping 26 shots in a 4-2 victory. Thursday’s appearance was his seventh NHL game and fifth start, more than seven years after his debut on Feb. 11, 2019.

Boston spread its scoring across five players, with Casey Mittelstadt, Elias Lindholm, JJ Peterka and Mark Kastelic joining Pastrnak on the scoresheet. Pavel Zacha added a pair of assists. It was the Bruins’ third six-goal performance this season.

Mittelstadt opened the scoring 3:49 into the first period after Pastrnak worked past two Nashville defenders near the offensive blue line. Pastrnak found Mittelstadt across the ice, and Mittelstadt’s wrist shot from the left circle beat Predators goalie Justus Annunen.

Lindholm doubled the lead on the power play at 16:38, redirecting McAvoy’s attempt from the blue line past Annunen. Boston took that two-goal advantage into the first intermission and added two more goals in each remaining period.

Pastrnak scored his first at 9:46 of the second, tipping another McAvoy shot. Peterka followed at 17:21, getting his stick on a centering pass from Pastrnak. The puck struck the left post, but Peterka finished the rebound to put Boston ahead 4-0.

Kastelic scored on a backhand 6:50 into the third period. Pastrnak completed the scoring at 15:00 with a wrist shot from high in the slot.

The four-point outing gave Pastrnak six goals and eight assists over his past seven games. He also reached 20 career games with at least four points, becoming the eighth Bruin to achieve that mark.

Annunen finished with 25 saves in his season debut. Nashville fell to 3-3-3 and has one win in its past five games, going 1-2-2 over that span.

For Boston, the decisive home victory followed a much tighter finish Tuesday in Dallas. The Bruins lost 3-2 in overtime after Mikko Rantanen scored all three Stars goals, including the winner on a power play. Matthew Poitras and James Hagens scored for Boston, which had entered that game with five consecutive victories.

Thursday ended with a celebration of DiPietro’s milestone. According to NHL.com, his teammates gathered in the home locker room and greeted him with a loud ovation when he entered last after the win.