Mode reset a Cisco AP from the command line...

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 experiance):

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>