Sha256: 16446cc958e5516f7a6d78de0af728a715b24f2132d73497fb01d360a0e2d6c5
Contents?: true
Size: 484 Bytes
Versions: 7
Compression:
Stored size: 484 Bytes
Contents
param ( [string]$VmId = $(throw "-VmId is required."), [int]$VlanId = $(throw "-VlanId ") ) # Include the following modules $presentDir = Split-Path -parent $PSCommandPath $modules = @() $modules += $presentDir + "\utils\write_messages.ps1" forEach ($module in $modules) { . $module } try { $vm = Hyper-V\Get-VM -Id $VmId -ErrorAction "stop" Hyper-V\Set-VMNetworkAdapterVlan $vm -Access -Vlanid $VlanId } catch { Write-Error-Message "Failed to set VM's Vlan ID $_" }
Version data entries
7 entries across 7 versions & 2 rubygems