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

Version Path
vagrant-unbundled-2.1.1.0 plugins/providers/hyperv/scripts/set_network_mac.ps1
vagrant-unbundled-2.0.4.0 plugins/providers/hyperv/scripts/set_network_mac.ps1
vagrant-unbundled-2.0.3.0 plugins/providers/hyperv/scripts/set_network_mac.ps1
vagrant-aws-detiber-0.7.2.pre.4 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/plugins/providers/hyperv/scripts/set_network_mac.ps1
vagrant-aws-detiber-0.7.2.pre.3 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/plugins/providers/hyperv/scripts/set_network_mac.ps1
vagrant-aws-detiber-0.7.2.pre.2 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/plugins/providers/hyperv/scripts/set_network_mac.ps1
vagrant-unbundled-2.0.2.0 plugins/providers/hyperv/scripts/set_network_mac.ps1