Gilmour appeared in 28 games with New York last season, where he scored two goals and added three assists, including the first-ever overtime winner by a Rangers rookie defender.
The 6-foot, 195-pound blue-liner skated in 120 AHL games over two seasons with Hartford, where he recorded 51 points. Before his professional career, Gilmour played four seasons for Providence College, where he helped the Friars to their first NCAA Championship title in 2015.
Fogarty, a third-round draft pick of the Rangers in 2011, has appeared in 132 AHL games with Hartford over three seasons. The center has tallied 41 points, and last season set career highs in goals, shorthanded goals, and game-winning goals.
Nieves, a Rangers second-rounder from 2012, split last season between the NHL and AHL. In 28 games with the Rangers, the center netted nine points and posted a plus-six rating.
O'Gara was acquired from the Boston Bruins in 2018. The 25-year-old defender appeared in 30 NHL games last season, tallied three assists, and was tied for third on the team in blocked shots per game.