Madeleine Potter and Michael Urie in "Hamlet." (Scott Suchman/Scott Suchman)

It must be a bittersweet assignment for Michael Kahn, knowing that this is his final "Hamlet" as artistic director of Shakespeare Theatre Company. His long, distinguished stewardship ends at the conclusion of next season, in a tenure that years ago affirmed his status as one of the nation's most devoted, and therefore substantial, keepers of the classical flame.

He strives boldly in this new modern-dress production in Sidney Harman Hall — starring one of his former students in the Juilliard School's drama division, the prodigiously gifted Michael Urie — to use the most revered play in the canon to give us glimpses of the future, both cautionary, of a great nation threatened by authoritarian impulses, and hopeful, of a major theater company looking for novel ways to keep Shakespeare vital and relevant.

And even though the rather gray production underperforms in pivotal areas — and allows some unfortunate overacting in others — there's a noteworthiness in the valedictory exertions of an old pro, applying himself anew to cracking open an esteemed text and wishing to make it sing.

That this "Hamlet," which had its official opening Monday night, at times sings peculiarly off-key owes in part to some lackluster contributions by supporting cast members but most crucially to a miscalculated performance by Urie, whose idea of taking a fresh bite out of the title character involves chewing the scenery and then practically gorging on it. His externalized portrayal — here is a Hamlet who presents himself as nothing if not a self-dramatizing showboat — allows for almost no sense of the introspective prince who fixates on mortality and the question of what we are all doing here.

Set in a Denmark that's run by the apparatus of the deep state — the something rotten is the surveillance network of the usurping King Claudius (Alan Cox) that even catches the ghost of Hamlet's father (Keith Baxter) on its cameras — Kahn's "Hamlet" suggests a royal court perched on a sterile, technocratic promontory. As a nesting ground for spies, it's not a safe space for a voluble character such as the one Urie embodies. The Hamlet of Harman Hall is an emotional oversharer, a characteristic underlined in Kahn's rearranging of the text: Now, the furious outpouring of Hamlet's heart in the "O that this too solid flesh would melt" speech opens the play.

"How weary, stale, flat and unprofitable seem to me all the uses of this world!" the grief-stricken son, pining for his father, wails to the heavens and, just as importantly, to us. For in this autocratic Elsinore, where the guards wear security jackets and wand in visitors like TSA employees, Hamlet takes pains to reveal that his only reliable friend is the audience. His later admonition to an actor not to "saw the air" with his hands when he performs for the king and queen comes across as a joke: No one this time out is a bigger ham than Hamlet.

What's missing is a man of any contemplative dimension. With a Hamlet who's all impulse, the drama is drained from critical scenes, such as the one in which Hamlet stumbles upon Claudius alone in prayer and has his opportunity for revenge. Would this particularly anguished prince — brandishing a loaded gun, no less — fail to use it?

Virtually no one in Elsinore, not Cox's Claudius, nor Madeleine Potter's Gertrude, nor Oyin Oladejo's Ophelia, offers anything approaching a galvanizing counterbalance to Urie. We're apparently supposed to glean all of the play's menace from John Coyne's set of cold steel, because none emanates from the flesh-and-blood participants. Doing treble duty as Ghost, Player King and solo Gravedigger (the other digger's been cut), Baxter is in these various guises suitably spectral, elegant or grizzled. But two great showcase roles for young tragedians, Horatio and Laertes, are here portrayed by Federico Rodriguez and Paul Cooper to all-too-modest impact. Even Robert Joy, terrific last season as the British monarch in Mike Bartlett's "King Charles III," comes across here as a wan and not especially endearing Polonius.

On the plus side, the turns by those hale and hearty backstabbers, Rosencrantz (Ryan Spahn) and Guildenstern (Kelsey Rainwater), are enjoyably two-faced. One of the production's best scenes unfolds around the arrival at court of these two old college friends of Hamlet. Here, Urie unwinds a bit, seems able to shed a self-consciousness about all these "words, words, words" that Hamlet has to speak, and simply carries on a conversation. O, that this too florid performance would settle down.

Hamlet by William Shakespeare. Directed by Michael Kahn. Set, John Coyne; lighting, Yi Zhao; costumes, Jess Goldstein; sound and original music, Broken Chord; projections and videos, Patrick W. Lord; fight choreography, David Leong; production stage manager, Joseph Smelser. With David Bryan Jackson, Lise Bruneau, Chris Genebach, Avery Glymph, Gregory Wooddell, Brendan McMahon, Jack Henry Doyle, Chelsea Mayo, Kamau Mitchell, Brayden Simpson, Maggie Thompson, Jeff Allen Young. About 3 hours 10 minutes. $76-$125. Through March 4 at Sidney Harman Hall, 610 F St. NW. Visit shakespearetheatre.org or call 202-547-1122.