Script fro Virtual Server 2005 R2

Discussion in 'Scripting' started by luca p., May 21, 2006.

  1. luca p.

    luca p. Guest

    I would like to attach a specific virtual network to a virtual machine.

    I used this script
    On Error Resume Next
    Set objVS = CreateObject("VirtualServer.Application")
    Set objVM = objVS.FindVirtualMachine("vm_server_name")
    Set objNetwork = objVS.FindVirtualNetwork("Internal Network")
    Set colNetworkAdapters = objVM.NetworkAdapters
    For Each objNetworkAdapter in colNetworkAdapters
    errReturn = objNetworkAdapter.AttachToVirtualNetwork(objNetwork)

    The script run fine, but I would like to use this script from a different
    server than vm_server_name.

    HW1 Host1
    VM1 vm_server_1

    HW2 Host
    VM2 vm_server_2

    I would like to run the script FROM HW2 to change the virtual network
    properties in vm_server_1 that is hosted from HW1.

    How can I do?

    Thank You
    Luca P.
    luca p., May 21, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.