I had posted my question on stackoverflow here - - http://stackoverflow.com/questions/9601733/powershell-generate-and-execute-scripts-on-the-fly-programmatically
Thanks in advance.
I am not really clear what you are trying to achieve. Can you be more specific??
Also, you may want to follow up on stack overflow too = and provide more info on what you are trying to achieve.
I am now breaking down my requirements step by stpe. I have a new question very specific to modules - http://powershell.com/cs/forums/t/9672.aspx
Hope I am clear now