CodingVMware

Executing commands in a VM via powershell

I got to thinking today that when you tell a VM to shutdown the OS, it is actually executing a command against the VM itself, not just in VMware. I decided to do a little searching to see what it takes to do something similar with other commands (such as srvinfo, or listing disk usage) and started googling.I came across this interesting post that describes how to change a VMs IP address using the Invoke-VMScript powershell command.http://www.virtu-al.net/2010/02/05/powercli-changing-a-vm-ip-address-with-invoke-vmscript/A little more searching and I found the following page that lists several other powershell functions to interact with guest VMs. Copy-VMGuestFile and Invoke-VMScript are 2 particularly interesting ones.http://www.amikkelsen.com/?p=357

2 thoughts on “Executing commands in a VM via powershell

Leave a Reply

Your email address will not be published. Required fields are marked *