Automate Virtual PC 2007 with PowerShell?

后端 未结 3 1697
青春惊慌失措
青春惊慌失措 2021-02-14 04:48

This is basically a duplicate of this question, but the accepted answer was \"no\" and I would like to keep this question open until getting an actual answer instead of acceptin

相关标签:
3条回答
  • 2021-02-14 04:49

    It look like it may be possible to automate the creation of virtual images using MS Virtual Server 2005. The following articles detail the use of PowerShell scripts to automate the creation of virtual images:

    • Configuration Testing With Virtual Server, Part 1
    • Configuration Testing With Virtual Server, Part 2

    From part 2, in the section Configuration Tests on a Virtual Machine, it seems possible to transfer files and schedule scripts to run. Using these articles as a basis, it should be possible to automate the building of a MS virtual image in the same way as lordbrain described for a VMware image.

    0 讨论(0)
  • 2021-02-14 04:57

    Is this what you're looking for? I'm on Windows 7 that has the "virtual windows xp" feature installed (which is effectively vpc 2007).

    [E] PS> $vpc = new-object -com virtualpc.application
    [E] PS> $vpc
    
    HostInfo                    : System.__ComObject
    VirtualMachines             : System.__ComObject
    VirtualNetworks             : System.__ComObject
    UnconnectedNetworkAdapters  : System.__ComObject
    SupportDrivers              : System.__ComObject
    Tasks                       : System.__ComObject
    MinimumMemoryPerVM          : 4
    MaximumMemoryPerVM          : 3071
    SuggestedMaximumMemoryPerVM : 2763
    MaximumFloppyDrivesPerVM    : 1
    MaximumSerialPortsPerVM     : 2
    MaximumParallelPortsPerVM   : 1
    MaximumNetworkAdaptersPerVM : 4
    MaximumNumberOfIDEBuses     : 2
    DefaultVMConfigurationPath  : G:\Users\Oisin\AppData\Local\Microsoft\Windows Virtual PC\Virtual Machines\
    SearchPaths                 : {}
    USBDeviceCollection         : System.__ComObject
    Name                        : Windows Virtual PC
    Version                     : 6.1.7084.0
    UpTime                      : 2
    
    0 讨论(0)
  • 2021-02-14 05:00

    To test some of my own software within a VM I use AutoIt (http://www.autoitscript.com/autoit3/) to start the VM, and within the VM I use it again to start and control my application. Communication is done using a shared folder within the VM (writing the AutoIt script to execute, output of the application like a log).

    It's not Powershell, but maybe this helps anyway. :)

    Regards,

    Sebastiaan

    0 讨论(0)
提交回复
热议问题