Share via


Using a static MAC range in VMM

VMM has a new cmdlet to get the next available MAC from the static pool: New-PhysicalAddress. When creating a VM, the calling script can first see the next MAC that available in the static pool and then commit it as part of the provisioning process.

First you will need to setup a static MAC range in Global Settings. 

To see the next available MAC without committing it:

PS C:\> $mac1 = New-PhysicalAddress

PS C:\> $mac1

00:00:01:00:00:01

To get the next available MAC and commit it so no one else can use it (once a MAC address is committed, it will never get recycled):

PS C:\> $mac1 = New-PhysicalAddress -Commit

PS C:\> $mac1

00:00:01:00:00:01

To see the next available MAC without committing it:

PS C:\> $mac2 = New-PhysicalAddress

PS C:\> $mac2

00:00:01:00:00:02

PS C:\>