The guards are the security of Far Far Away and are charged to maintain order and security in the kingdom.
When Shrek appears as a human and goes to the castle, he is greeted by two of the guards who warn Fiona of his arrival. Later, a group of guards captures Shrek, Donkey and Puss and put them in a huge tower where they're inchained. When they manage to escape from the tower, Shrek decide to build a giant gingerbread man to break in the castle. Then, guards use catapults to destroy Mongo in vain. However, they managed to break his arms by pouring hot milk over him. To save Fiona, Puss fights the guards so that Shrek and Donkey continue the rescue.
The guards are first bewitched by Puss's face before the latter jumps on them and engages in a sword fight.
In the third film, the guards still wear their gray armor but this time have a blue cloth plastron with the symbol of King Harold. When he dies, the guards are seen lowering a flag in the courtyard of the castle. When Charmant organized a coup-d'état at the castle, the guards were at his service, only loyal to the crown. Their plastron then change to symbolize the "C" of Charming.
They are still seen about to arrest Shrek, Puss, Donkey who have returned to Far Far Away with Artie. The young boy convinces them that he is an actor in the future Charming's show and spare them. They are however called by the prince who is attacked by Shrek and his friends.
They take Shrek to a show compartment where he is chained while Puss and Donkey are taken to prison with Fiona, the queen and the princesses. When these characters escape, the guards are easily neutralized by them. They are seen for the last time surrounding the Dragon during Charming's show.
Now, they probably serve their new king, Arthur Pendragon.
Armement and equipment
A guard is equipped with a full armor, the entire body protected. Their armed with different arms: