Often you want to mode reset a Cisco AP, but don't want to walk over and physically poke it. 

 

This seems to work (at least in my experience):

erase /all nvram:
write default-config
reload

 

or, from a script:

echo -e "erase /all nvram:\ny\nwrite default-config\ny\nreload\n\n" | ssh <ap>