PowerCLI

 View Only
  • 1.  Change IP address on a VM using powercli.

    Posted Oct 02, 2009 03:59 PM

    Hello,

    I am trying to change a VM's IP address, gateway and mask using powercli. I need to change it by running a powercli script remotely.

    Any help greatly appreciated.

    Thanks,



  • 2.  RE: Change IP address on a VM using powercli.

    Posted Oct 02, 2009 04:54 PM

    The2 possibilities I know of

    1) When your guest run a Windows OS and when you have PowerShell installed in the guest, you can use the Invoke-VmScript.

    See

    2) In the other cases you can use the SDKs CustomizeVM_Task method.

    See



  • 3.  RE: Change IP address on a VM using powercli.

    Posted Oct 02, 2009 05:44 PM

    Thanks for the quick reply LucD.

    I'm pretty new at all of the powershell and powercli stuff so i really don't know what most of this script means. Does it say that I am actually doing a sysprep on the vm? If so is it possible to change (script) only the items i would like to change, or does it require me to have all of the items shown?

    Thanks,



  • 4.  RE: Change IP address on a VM using powercli.

    Posted Oct 02, 2009 06:26 PM

    You don't have to fill in all the properties.

    But yes, it uses the sysprep utility to make the changes.

    So first make sure you have the sysprep files installed on your vCenter or Virtual Center.