Merge pull request #10366 from chrisroberts/f-hyperv-vlan
Remove module loading from vlan script
This commit is contained in:
commit
d5f3600c4b
|
@ -7,12 +7,6 @@ param (
|
||||||
[int]$VlanId
|
[int]$VlanId
|
||||||
)
|
)
|
||||||
|
|
||||||
# Include the following modules
|
|
||||||
$presentDir = Split-Path -parent $PSCommandPath
|
|
||||||
$modules = @()
|
|
||||||
$modules += $presentDir + "\utils\write_messages.ps1"
|
|
||||||
forEach ($module in $modules) { . $module }
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$vm = Hyper-V\Get-VM -Id $VmId -ErrorAction "stop"
|
$vm = Hyper-V\Get-VM -Id $VmId -ErrorAction "stop"
|
||||||
Hyper-V\Set-VMNetworkAdapterVlan $vm -Access -Vlanid $VlanId
|
Hyper-V\Set-VMNetworkAdapterVlan $vm -Access -Vlanid $VlanId
|
||||||
|
|
Loading…
Reference in New Issue