How to change machine settings in WLST offline

This is the first post in a series of posts giving small examples of things you can do to create WebLogic domains using offline WLST. Use this post as a starting point

When doing a scripted installation and configuraiton of a weblogic domain you will want to change as much of the needed configuration as possible using offline wlst.

One thing I find myself doing everytime I create a new domain is changing the settings of the machine (nodemanager) configuration and that is changing its setting from SSL (default) to plain because I find that SSL communication to the nodemanagers is seldom necessary. So when doing a scripted installation I would want a similar configuration change done by the script. The following is a snippet of WLST to achieve exactly that.

cd('/AnyMachine/Machine1/NodeManager/Machine1') set('ListenAddress','server1hostname')
set('NMType','plain') 

The important thing to notice here is setting the NMType variable to plain.