Description
After reading the documentation, I understood I would be able to remotely copy a file from my workstation to a VM via its hypervisor with the following command:
Copy-VMFile -ComputerName <hypervisor> -VMName <VMname> -SourcePath <file on my workstation> -DestinationPath <path on VM> -FileSource Host
However, I have learnt from trial and error that -SourcePath is a path to a file on the hypervisor only. This is not made clear anywhere on this page.
Suggestions:
The document summary should be more verbose to explain this functional limitation. "Copies a file to a virtual machine from its hypervisor."
Disambiguate the value "Host" for the required FileSource parameter: Host refers to the Hyper-V host machine. --I can't understand why this parameter is required when it only accepts one value, but I know that's not a question for the documentation team.
Explain that the SourcePath parameter is a path on the Hyper-V host machine, not the machine executing the Copy-VMFile command when it's done remotely by specifying the ComputerName or CimSession parameters.
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
- ID: c94869f3-0ff2-5d02-e45b-2fabcd78b0a0
- Version Independent ID: 9767d17f-bd62-bd26-cc27-17b1a1c1eb1f
- Content: Copy-VMFile (Hyper-V)
- Content Source: docset/winserver2022-ps/hyper-v/Copy-VMFile.md
- Product: w10
- GitHub Login: @JasonGerend
- Microsoft Alias: jgerend