As Steve has stated - the commands are what I stated. Definitely review books online for further information for all of the commands.
I really don't have a script available, since I don't have to do this. If I did run into this situation, I would just execute the commands as needed instead of creating a script.