I want to invoke command into Linux virtual machine using powercli.
Is there any way to do this using powercli.????
I tried with "Invoke-Vmscript", but it's working for windows machine.
when i try for Linux machine it throws below error.
###################################################################################
PS C:\Users\310304780> Invoke-VMScript -VM "Test-bigip" -ScriptText "ls" -GuestUser root -GuestPassword default
Invoke-VMScript : 4/12/2018 3:30:45 PM Invoke-VMScript Failed to authenticate with the guest operating system using the supplied credentials.
At line:1 char:1
+ Invoke-VMScript -VM "Test-bigip" -ScriptText "ls" -GuestUser root -Gu ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-VMScript], InvalidGuestLogin
+ FullyQualifiedErrorId : Client20_VmGuestServiceImpl_RunScriptInGuest_ViError,VMware.VimAutomation.ViCore.Cmdlets.Commands.InvokeVmScript
PS C:\Users\310304780>
PS C:\Users\310304780> Invoke-VMScript -VM "Test-bigip" -ScriptText "ls" -GuestUser root -GuestPassword default -ScriptType bash
Invoke-VMScript : 4/12/2018 3:31:24 PM Invoke-VMScript Failed to authenticate with the guest operating system using the supplied credentials.
At line:1 char:1
+ Invoke-VMScript -VM "Test-bigip" -ScriptText "ls" -GuestUser root -Gu ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-VMScript], InvalidGuestLogin
+ FullyQualifiedErrorId : Client20_VmGuestServiceImpl_RunScriptInGuest_ViError,VMware.VimAutomation.ViCore.Cmdlets.Commands.InvokeVmScript
############################################################################################################################
From the looks of your connection command, this looks like it might be a BIG-IP virtual appliance. You might want to try a non-appliance VM to see if this is working, because some VAs will block this type of incoming connection.