The monarch and queen consort hosted members of the military to thank them for their service.