there's a section in the help that refers to batch rendering with layers, try opening maya help and doing a search for batch render... what you want to read is called 'batch and command-line render with layers' and towards the bottom it'll tell you what stuff to add to a command line render to ensure which layers render...