Assigning materials to objects in MEL?

I have a bunch of objects (lofted surfaces to be exact), in a scene that I want to assign different materials to(like phong, lambert, or blinn). How can I do that via MEL scripting?

I went through the motions of assigning the materials, but the commands that Maya used never showed up in the script editor. Please help!

sets -e -forceElement blinn2SG nurbsSphere1;

Turn on echo all commands in the script editor