VMware Cloud Community
uday1kiran
Contributor
Contributor

How to Launch application with GUI on esx guest machine

With VMWare Powershell commandlets/powercli

I can launch an application on a guest machine(on the esx server) using below commandlet.

$script = '"%programfiles%\Common Files\Microsoft Shared\MSInfo\msinfo32.exe" /report "%tmp%\inforeport"'

Invoke-VMScript -ScriptText $script -VM "win10-test" -GuestCredential $r -ScriptType Bat

But these set of commandlets launches only console based applications.

If we try to launch an application with GUI, it launches in background process and we can't see UI.

Is there anyway to launch an application in foreground.

I need to launch my exe which is used for GUI testing of our product.

I am able to do in virtualbox, with below command.

vboxmanage.exe guestcontrol machinename run --exe "C:\users\uday\Desktop\one.exe" --username uday --password mypassword

But no option in vmware powercli

0 Kudos
2 Replies
scott28tt
VMware Employee
VMware Employee

Moderator: Moved to PowerCLI


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
0 Kudos
LucD
Leadership
Leadership

This is not a VMware restriction, but a solid security concept for Windows boxes.

There are a couple of bypasses available, see https://serverfault.com/questions/690852/use-powershell-to-start-a-gui-program-on-a-remote-machine


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos