PowerCLI: Run commands in virtual-machine

powerclivmware-esxvmware-viewvmware-vsphere

We have several view-desktops and I need a script to be performed once on all desktops. Sadly, WMI is disabled. These desktop are all running Windows XP SP3

I thought I read about the possibility to execute commands in a guest-vm via VMwares PowerCLI. Can anyone confirm if that is possible or can even provide a link?

Best Answer

/See edit below

You cannot. PowerCLI just lets you do things that you can do through the vSphere GUI, like add/remove drives, power on/off guests, migrate machines, etc. Read the docs, that's a really good thing to do before coming to a technical forum with a question. If you read over the list of cmdlets included in PowerCLI, you'd see this for yourself.

PowerCLI does not get you any hooks into the guest machines themselves. If you have left yourself no remote-management options because you disabled admin$ and WMI on the guests, you're stuck doing everything manually.

VMware != magic. You still have to administer the guest machines using the same methods you'd use on physical machines.

/edit - OK, good catch for finding invoke-vmscript. So, my answer above is not quite accurate.