Peeves does not listen to Hogwarts prefects, teachers or anyone else, with the exception of the headmaster of the school, Albus Dumbledore, and the ghost of the Slytherin house, the Bloody Baron. Argus Filch, who is usually left with cleaning up the messes and damage Peeves causes, is his nemesis and works continuously to try to get Peeves thrown out. However, Rowling has stated in an interview that not even Dumbledore would be able to rid Hogwarts of Peeves forever. Peeves is, however, vulnerable to some magic; in Prisoner of Azkaban, Remus Lupin uses magic to teach Peeves a lesson by making the gum Peeves was stuffing into a keyhole shoot back out and up the poltergeist's nose. In Half Blood Prince, Harry also uses magic to glue Peeves's tongue to the roof of his mouth, after which Peeves angrily departs.
Peeves is not completely chaotic nor without loyalties. During Dolores Umbridge's attempts to take control of Hogwarts in Harry Potter and the Order of the Phoenix which were met with passive insurrection, he actually shows respect for his fellow troublemakers Fred and George Weasley and takes their parting words ("Give her hell from us, Peeves") to heart as they flee the school, marking possibly the only time Peeves ever obeys a student, let alone salutes one. This is immediately followed by his finest hour; his destructive tendencies shift into overdrive and he goes on a rampage. When Umbridge attempts to sneak out of Hogwarts, Peeves chased her out of the castle; alternately whacking her with Minerva McGonagall's cane and a sock full of chalk. Peeves is depicted in Deathly Hallows only two times, first where he aids the defenders of Hogwarts by dropping Snargaluff pods on the heads of attacking Death Eaters, and second singing a victory song for Harry at the end.