In addition, the network has also ordered four more episodes for season one, according to The Hollywood Reporter.
NBC Entertainment chairman Bob Greenblatt made the announcement during Television Critics Association's summer press tour.
"There's been such an outpouring of love from the fans. We are a very grateful network and we are more than thrilled to have the show on the air for at least two seasons," Greenblatt said.
Debra Messing, Eric McCormack, Megan Mullally and Sean Hayes are all set to return for the show.