Richard
Assuming IOS.
1) Do a write mem/copy run start to save the config.
2) Some modules, mainly the service modules such as the FWSM allow you shut them down ie. if an FWSM was in slot 7
hw-module module 7 shutdown (syntax may not be entirely accurate)
3) Other than that you just power the switch off. There is no way to shut the switch down at the command line.
Jon