This article explains how to copy files from a virtual machine that is not routable or where you are unable to use FTP/SFTP.
Note: The source virtual machine must have VMware Tools installed.
VMware vSphere PowerCLI
To copy of the files from a Non-Networked Virtual Machine, you can use PowerCLI.
The syntax is as follows.PS C:\> Copy-VMGuestFile -GuestToLocal -VM "<VM Name>" -Source "<Source Path>" -Destination "<Destination path>" -GuestUser "<Usaer Name>" -GuestPassword "<Password>"
The following example command copies files from C:\temp\ on the Windows VM Test_VM to the local C:\work\.
EX)PS C:\> Copy-VMGuestFile -GuestToLocal -VM "Test_VM" -Source "C:\temp\" -Destination "C:\work\" -GuestUser "Administrator" -GuestPassword "Passwd"
Note: The virtual machine name specified by <VM Name> can be confirmed using the Get-VM command.