I’m trying to use the following command to copy file from host to VM:
Copy-VMGuestFile -Source "$TestFilePath" -Destination "$DestinationPath" -LocalToGuest -Force -VM $Machinename -GuestUser "$VMGuestUserID" -GuestPassword "$VMGuestPassword" -ToolsWaitSecs -10 -Verbose
The problem is that I’m getting an error:
> WARNING: The guest OS for the virtual machine 'TestVM' is unknown. The operation may fail. Copy-VMGuestFile : Copy-VMGuestFile The guest operations agent could not be contacted.
After googling this error, in several posts, there was a recommendation to install VMWare tools. I did. But still copy file command is failing.