VMware Cloud Community
ym2018
Contributor
Contributor
Jump to solution

Copy-VMGuestFile - Error while trying to copy file from host to VM

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.

Virtual machine is Microsoft Windows 10 (64-bit). Firewall is off. VMWare tools is installed.

Powershell version 5.1.

0 Kudos
20 Replies
ym2018
Contributor
Contributor
Jump to solution

Works Smiley Happy Thank you very much.

0 Kudos