Prince Harry paraded publicly for the first time when he joined fellow Sandhurst officer cadets as the military academy received its Colours.
Prince Harry was among 755 officer cadets on parade
His grandmother, the Queen, had originally planned to present the Colours - the military flag - but cancelled after she caught a cold.
Harry, 20, was among 755 cadets who stood to attention in front of the Old College building in Camberley, Surrey.
Chief of the Defence Staff Sir Michael Walker presented the Colours.
It has been over 30 years since the academy performed the formal ceremony.
Prince Harry marched in step and raised his hat in three cheers to the Queen during the parade.
Standing in line, second from the end in the second row from the back, the Prince was spoken to by Gen Walker, but simply nodded in response.
Addressing guests and cadets, Gen Walker said: "I'm sure you all wish to join me in wishing Her Majesty good speed for a rapid and full recovery."
He also read out a personal message from the Queen.
"The challenges that lie ahead will test to the full your character, your physical endurance and your intellect.
"You will have the privilege of commanding men and women of the highest quality and that privilege demands a strong sense of responsibility and the need to set an example and to remain true to the Sandhurst motto 'Serve To Lead'," the message said.
The event was one of three that the Queen, 79, declined to attend, including a reception for the Centenary of the Friends of the Elderly and an audience with the president of Singapore.
More than 3,500 members of cadets' families, friends and staff will gather to watch Tuesday's formal occasion.