Sha256: 1bfad30bb19ac2c2d6ee5661da2ebbc88b5b9a4d390796caed8cc3c4b02cb998
Contents?: true
Size: 500 Bytes
Versions: 7
Compression:
Stored size: 500 Bytes
Contents
param ( [string]$VmId = $(throw "-VmId is required."), [string]$Mac = $(throw "-Mac ") ) # 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-VMNetworkAdapter $vm -StaticMacAddress $Mac -ErrorAction "stop" } catch { Write-Error-Message "Failed to set VM's MAC address $_" }
Version data entries
7 entries across 7 versions & 2 rubygems