Hi,
I try to use this command in order to launch an application on a remote Virtual machine.
It seem to work for "command" like get-childitem.
But i can't launch notepad on the remote virtual machine for example.
Here is my code
[code:1]
# *********** Load VMWare PowerCLI cmdlets **********
Add-PSSnapin VMware.VimAutomation.Core
# ***************************************************
#Connection au serveur Vsphère
Connect-VIServer -Server 10.251.*.* -User ***** -Password ******
Invoke-VMScript -ScriptText "c:\windows\notepad.exe" -VM "********" -GuestUser ***** -GuestPassword ******* -scripttype bat
Disconnect-VIServer -Confirm:$false
[/code:1]
I try like this but nothing better
[code:1]
$script = 'Invoke-Item "c:\windows\notepad.exe"'
Invoke-VMScript -ScriptText $script -VM "******" -GuestUser ******* -GuestPassword ******
[/code:1]
I don't get any error. The script is just waiting for a virtual machine answer, but nothing happened.
does someone can help me ?
thx in advance