ananace / fog-hyperv

Hyper-V provider for fog
MIT License
8 stars 1 forks source link

Grab a VM object where possible, to avoid having to do name lookups #5

Open ananace opened 7 years ago

ananace commented 7 years ago

To replace cmdlet calls like Add-VMNetworkAdapter -ComputerName <host> -VMName <vm_name> -Switch <switch> With something more like;

$VM = Get-VM -Id "<guid>"
$VM | Add-VMNetworkAdapter -Switch <switch>