Since 2017: Broadway debut and other roles
In 2017 she made her Broadway debut portraying Joanna Lyppiatt in the revival of Noël Coward's comedy Present Laughter opposite Kevin Kline. Marilyn Stasio of Variety praised Smulders in the role writing, "Smulders has a graceful, Cowardian air in the role, and makes Susan Hilferty’s costumes look even more fabulous." David Rooney of The Hollywood Reporter wrote, "Smulders looks sensational; she’s the epitome of late-’30s elegance...she carries herself with poise and assurance". For her performance she was honored with a Theatre World Award for Outstanding Broadway debut. Her performance was filmed with Great Performances and shown on PBS.
Also in 2017, she portrayed the recurring character of "Mother", also known as Mrs. Quagmire, in the Netflix black comedy drama series A Series of Unfortunate Events, based on the book series of the same name. That same year, she appeared in the comedy films Literally, Right Before Aaron and Killing Gunther. From 2017 to 2019, she starred in the Netflix comedy series Friends from College, in the main role of Lisa Turner. In 2018, she starred in the lead role of Joanne Skye in the comedy-drama film Songbird, also alternatively titled Alright Now. The film was improvised, and shot in the course of five days. She then reprised her role as Wonder Woman in the 2019 animated sequel film The Lego Movie 2: The Second Part.
In 2019, she guest starred as Young Lucille Bluth in three episodes of the Netflix sitcom Arrested Development and appeared in an episode of the HBO anthology series Room 104. She also starred as Dexedrine "Dex" Parios, a PTSD-stricken military veteran turned private detective, in the ABC crime drama series Stumptown, which premiered on September 25, 2019, to positive reviews. She received a Critics' Choice Super Award for Best Actress in a Superhero Series nomination for her performance. The series was cancelled after one season due to production delays caused by the COVID-19 pandemic (It had originally been renewed for a second season). In 2020, Smulders starred in the romantic drama film Cicada and voiced a guest appearance in the Fox animated sitcom The Simpsons.
In 2021, she portrayed media pundit Ann Coulter in the FX true crime anthology series Impeachment: American Crime Story, which received positive reviews from critics. That same year, she had a voice role as Maria Hill in the Disney+ animated anthology series What If...?. In 2022, she reprised her role of Robin Scherbatsky in the first season finale of the HIMYM spinoff How I Met Your Father, which aired on Hulu. Also in 2022, she starred in the Amazon Freevee coming-of-age drama series High School, based on the 2019 memoir of the same name by Tegan and Sara.
In 2023, Smulders reprised her role as Maria Hill, voicing the character in the Disney Channel animated series Moon Girl and Devil Dinosaur and appearing in the Disney+ limited series Secret Invasion.