3

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?

Andrew J. Brehm
  • 1,611
  • 7
  • 37
  • 57
  • 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 04 '11 at 02:52
  • actually I think you can apply an unattended.xml file against an offline image! – tony roth Apr 05 '11 at 02:04

1 Answers1

2

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.

Ryaner
  • 3,097
  • 5
  • 25
  • 33