title: Hyper-V changing Static MAC address on one of the adapters
body: <p>I have an Ubuntu 18.06 VM with 2 network adapters connected, one internal and one external. However, I would like set the adapters which is using the internal switch "NATSwitch" to have a static MAC address while the other can have a dynamic one. </p>
  
  <pre><code>PS C:\&gt; Get-VMNetworkAdapter -VMName "Docker_1806"
  
  Name            IsManagementOs VMName               SwitchName   MacAddress   Status IPAddresses
  ----            -------------- ------               ----------   ----------   ------ -----------
  Network Adapter False          Docker_1806          Robot Switch 001122334455 {Ok}   {169.254.74.100, fe80::215:5dff:feb2:1188}
  Network Adapter False          Docker_1806          NATSwitch    554433221100 {Ok}   {192.168.137.100, fe80::a00:3cff:fea3:4209}
  
  </code></pre>
  
  <p>I have tried using this command:</p>
  
  <pre><code>PS C:\&gt; Set-VMNetworkAdapter -VMName "Docker_1806" -StaticMacAddress "01-02-03-04-05"
  </code></pre>
  
  <p>But that seemed to have changed both of my adapter's MAC address to static.  </p>
  
  <p>I've tried:</p>
  
  <pre><code>PS C:\&gt; $vmadapter = Get-VMNetworkAdapter -VMName "Docker_1806"
  PS C:\&gt; $vmadapter[1]
  
  Name            IsManagementOs VMName        SwitchName MacAddress   Status IPAddresses
  ----            -------------- ------        ---------- ----------   ------ -----------
  Network Adapter False          Docker_1806   NATSwitch  554433221100 {Ok}   {192.168.137.100, fe80::a00:3cff:fea3:4209}
  
  
  PS C:\&gt; Set-VMNetworkAdapter -VMName "Docker_1806" -VMNetworkAdapter $vmadapter[1] -StaticMacAddress "01-02-03-04-05"
  
  Set-VMNetworkAdapter : Parameter set cannot be resolved using the specified named parameters.
  At line:1 char:1
  + set-vmnetworkadapter -vmname "Docker_V2_Dev" -VMNetworkAdapter $vmada ...
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : InvalidArgument: (:) [Set-VMNetworkAdapter], ParameterBindingException
      + FullyQualifiedErrorId : AmbiguousParameterSet,Microsoft.HyperV.PowerShell.Commands.SetVMNetworkAdapter
  </code></pre>
  
  <p>Is there a way to change only one of them through Powershell on the host? I can't seem to find a way to set static MAC for a specific adapter for that VM.</p>
  
  <p>On another note, the network configurations for this VM is set using netplan configurations inside the VM so that it can have static IP addresses. </p>
  
  <p>Thanks in advance!</p>