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?

  • 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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