I'm trying to run a exe file in a remote machine from PowerCLI which is launching couple of cmd's.
With this command:
$executeCommand = "call D:\MyFile.exe Arg1 Arg2";
Invoke-VMScript -VM $vmName -GuestUser $vmUser -GuestPassword $vmPass -ScriptText $executeCommand -ScriptType Bat;
The problem is that the exe is running but without any UI, And also the CMD's are running and I can't see the console.
Note: When I'm running the same execute command in the VM's the exe is launching with UI and the CMD's with their console.
How can do it properly? should I use another type of "Invoke-VMScript" or some special flags?