And here’s to you, “Mr. Robinson.”

“Frasier” vet Peri Gilpin has replaced “24’s” Jean Smart as a series regular on the upcoming NBC comedy “Mr. Robinson.”

Gilpin will play tough-as-nails (and heartbroken) high school principal Catherine Taylor, who gives star Craig Robinson’s substitute teacher a hard time. “The Office” alum shares his name with the struggling musician character.

Coincidentally, Spencer Grammer (from ABC Family’s “Greek”), the daughter of Gilpin’s “Frasier” co-star Kelsey Grammer, also stars on the show.

Smart had played the role in the original pilot, shot last year, but exited the project when it changed from single to multi-cam.

“Had the greatest first day on Mr. Robinson. @MrCraigRobinson and amazing cast so good and so funny,” Gilpin tweeted Friday night. “I’m so excited.”

She also posted a photo of the script cover to Instagram on Saturday morning.