Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The scenario is this: there is about 40 workstations that get regular backups and I would like to convert them to VMs and send them off to a disaster recovery site and then add them to the VCenter server cluster I've got there. Everything works great up until the point of putting them back on the domain...

Using PowerShell 2 makes it rather simple to script removing a computer from the domain and then after having it restart, adding it back again. The problem comes when trying to apply the script to the computers, especially multiple ones. So is there a way to mass apply a PS script to dozens of VMs? Or am I thinking of this wrongly?

share|improve this question
Powershell 2.0 is designed for remote administration of many machines. Where are you hung up? It seems like there shouldn't be a problem. – MDMarra Oct 12 '10 at 21:25
Well I suppose you have a point. I was thinking more from a VMWare support standpoint. But I suppose I could just run the script from a computer already on the domain... I'll approach it from that direction then. Thanks! – Nori Oct 12 '10 at 21:31
up vote 1 down vote accepted

Yep. Invoke-vmscript in PowerCLI will do that for you. In fact, it looks like someone wrote something already here!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.