How to run exe file in VM using PowerCLI? <p>Recently I am working on VMs, using vSphere. I'm also using PowerCLI to automate some stuff. I discovered the cmdlet <code>Invoke-VMScript</code> which allows scripts to be ran on the VM using PowerShell.</p> <p>Everything worked just fine until I tried to install a program in the VM:</p> <pre><code>Invoke-VMScript -VM $vm -ScriptText " 'path'.exe" -GuestUser "YourUsername" -GuestPassword "YourPassword" </code></pre> <p>The program won't run, but we can see the process runs. I explored more and discovered it happens in every exe file. It just won't display the GUI, and also won't perform the desired operation.</p> <p>What can I do to make the PowerCLI run EXE files?</p>