Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

When I create a VM in Virtual Machine Manager (VMM) I have an option to set a local administrator password for it. But when I use the "View Script" feature on the last screen of the wizard, I get a PowerShell script that creates a VM without setting a password.

How can I make the PowerShell script set the password for the local administrator account for the VM it creates?

share|improve this question
maybe use dism against the offlined vhd file and inject a script into the system runonce regkeys once it boots up it may set the pw. don't know can try at the moment. But I thought it was a good question!! – tony roth Apr 4 '11 at 2:52
actually I think you can apply an unattended.xml file against an offline image! – tony roth Apr 5 '11 at 2:04

While I don't have VMV, at the MS Script Guiding may help. It shows Powershell scripts which has a number of variables, one being the admin password one you want. I would assume the script VMM is creating is similar to these.

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.