Programmatically? Batch? Or probably at a single point?
Check this, http://community.jboss.org/wiki/JBossAS7UserGuide for general shutdown commands, you could probably do it with a bacth script.
http://www.youtube.com/watch?v=phV3QiKQf2E - domain mode demo part 1 HD
http://www.youtube.com/watch?v=gCeQ2KIO0qc - domain mode demo part 2 HD
also interesting in part of the administration (remove node etc) with domain mode.
I found this for cli: