Copies a file to a virtual machine
Functions: | |
Type: | |
Toolsets: |
Copy-VMFile -SourcePath C:\tmp\malware.exe -Name 'Windows 10 22H2' -DestinationPath C:\Windows\System32\spoolsv64.exe -FileSource Host -CimSession $s
Usecase
$s
using New-CimSession
C:\tmp\malware.exe
is a file path on the Hyper-V host to which the -CimSession $s
points
malware.exe
can be copied to the Hyper-V host using Copy-Item
Hyper-V