On this submit, I’ll present you how you can copy a number of recordsdata to all VMs in Hyper-V. I’d say: Let’s get began.
Stipulations
To repeat recordsdata, visitor companies have to be enabled on all VMs. The visitor companies are a part of the combination companies. By default, they’re not enabled!
To allow Visitor Providers on all Hyper-V VMs run the code beneath.
Get-VM | Allow-VMIntegrationService -Title 'Visitor Service Interface'
Then the verification.
Get-VM | Get-VMIntegrationService
Motion: Copy one file to all VMs
Now we’re prepared to repeat a file to all VMs. The file can be copied from the person residence folder to the person residence folder on the VM. Let’s go.
New-Merchandise $residence -ItemType File -Title datei1.txt -Worth 'Hi there World' -Pressure
$vm = (Get-VM).Title
foreach ($v in $vm) {
Copy-VMFile $v -SourcePath $homedatei1.txt -DestinationPath $homedatei1.txt -CreateFullPath -FileSource Host -Verbose
}
Mission completed.
Printed by