Former "How I Met Your Mother" star Alyson Hannigan will be joining the cast of "The McCarthys," for the show's upcoming Christmas episode.

Hannigan, 40, has been tapped to take on the role of Pam, Marjorie and Arthur's upstairs tenant, according to Entertainment Weekly.

Pam is a sweet girl who is currently dealing with a broken heart as a result of a recent breakup. In an attempt to make her happy, Marjorie decides to invite her to their Christmas celebration.

Initially, Pam feels surprised at Marjorie and Arthur's hospitality but their relationship with progress to exchanging gifts and more.

This is the first time that Hannigan will be seen on CBS after the conclusion of their long-running series "How I Met Your Mother," the Hollywood Reporter noted.

Prior to this recent gig, Hannigan was previously booked to guest star on another CBS series entitled "More Time With Family" but production for the show did not move forward.

On the hit show that ran for nine season, Hannigan played the role of Lily Aldrin. The series chronicled the life of Ted Mosby and his group of friends, including Hannigan, as they unraveled the mystery of who Mosby's mother is and how he met her.

Other than his role in the series, Hannigan also gained popularity for her role as Michelle Flaherty in a series of "American Pie" films. She was also part of "Buffy the Vampire Slayer," where she played the role of Willow Rosenberg, according to Fashion Times.

Meanwhile, "The McCarthys" is a new sitcom on CBS that was created by Brian Gallivan. The series follows the life of the McCarthy family, a sports-oriented family who lives in Boston.

The series premiered on October 30 and Hannigan's Christmas episode is slated for release this coming December 18.

"The McCarthys" airs every Thursday on the CBS.