Invoke-VMScript -VM "VM_NAME" -ScriptText "hostname" -GuestUser "MYUSERNAME" -GuestPassword "MYPASSWORD"
Invoke-VMScript : 04/07/2024 14:33:53 Invoke-VMScript An error occurred while sending the request.
At line:9 char:1
+ Invoke-VMScript -VM "VM_NAME" -ScriptText "hostname" -GuestUser "MYUSER...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-VMScript], ViError
+ FullyQualifiedErrorId : Client20_VmGuestServiceImpl_DownloadFileFromGuest_DownloadError,VMware.VimAutomation.ViCore.Cmdlets.Commands.InvokeVmScript