Improvements to the power shell version of the generate command.