I am working on a solution. As a part of requirement, I need to be able to build virtual systems and apply various reg settings and install software, activate office etc. I need to be able to run this solution to create many systems (~5000). Also for example, when I run the script on 300 systems and lets say couple of items (Reg setting or office activation) failed on 100 systems, I want the script to re-run on those systems. So having said this, Can you suggest me the better way to develop this, Can I use workflows or have separate powershell scripts for each functionality and then integrate them?

Thanks for your help

Frankly, I’d probably look at using DSC to do this, with the LCM set to ApplyOnce mode. That way, if a given element fails, DSC automatically retries just that item.

But yes, you could use workflow. You could also write separate scripts for each task - which is basically what DSC is.

What are you using to generate VM’s? Is this VMWare, XenDesktop, Hyper-V? There are many ways to do things and you’re providing very generic information which is most likely going to go well beyond the purview of Powershell. Most VM technologies you would build a template that would have all of the components installed and configured and then build other VM’s from that template\image.

Thanks for the reply. We are using Red Hat Enterprise Linux 6
Virtualization. They have REST APIs through which we will automate tasks for creation of virtual systems and other tasks. We will be creating templates and also there are other tasks like joining to domain and apply reg settings etc. We are looking at automating the tasks end to end.