our only reward, if we quarrel. My errand is pressing. Here at least is my sword, goodman Háma. Keep it well. Glamdring it is called, for the Elves made it long ago. Now let me pass. Come, Aragorn!'
The Two Towers Book III Chapter 6: "The King of the Golden Hall"

And, as pointed out by various people in the forum thread Valorum links to in a comment on the question, the sword is called out by the narration at the end of Return of the King, when he and the hobbits return to the Shire:

Then the hobbits suddenly realized that people had looked at them with amazement not out of surprise at their return so much as in wonder at their gear. They themselves had become so used toleaped Shadowfax, like a deer that runs surefooted in the mountains. The White Rider was upon them, and the terror of his coming filled the enemy with madness. The wild men fell on their faces before him. The Orcs reeled and screamed and cast aside both sword and spear. Like a black smoke driven by a mounting wind they fled. Wailing they passed under the waiting shadow of the trees; and from that shadow none ever came again.
The Two Towers Book III Chapter 7: "Helm's Deep"

There's very little fighting during the Siege of Gondor (unlike in the films), and no enemy is inside the city (where Gandalf is) until Grond breaks down the gates. But basically immediately after this, Gandalf is called away to save Faramir, and the