Get-SCMACAddress

Gets allocated MAC addresses.

Syntax

Get-SCMACAddress [-All] [-Assigned] [-UnAssigned] [-VMMServer <ServerConnection>] [<CommonParameters>]
Get-SCMACAddress [-Assigned] -GrantToObjectID <Guid> [-UnAssigned] [-VMMServer <ServerConnection>]
 [<CommonParameters>]
Get-SCMACAddress [-Assigned] -ID <Guid> [-UnAssigned] [-VMMServer <ServerConnection>] [<CommonParameters>]
Get-SCMACAddress [-Assigned] -MACAddress <String> [-UnAssigned] [-VMMServer <ServerConnection>]
 [<CommonParameters>]
Get-SCMACAddress [-Assigned] -MACAddressPool <MACAddressPool> [-UnAssigned] [-VMMServer <ServerConnection>]
 [<CommonParameters>]

Description

The Get-SCMACAddress cmdlet gets allocated Media Access Control (MAC) addresses.

Examples

Example 1: Get the allocated MAC addresses for a specific MAC address pool

PS C:\> $HostGroup = Get-SCVMHostGroup | where { $_.Path -eq "All Hosts\HostGroup02\Production" }
PS C:\> Set-SCVMHostGroup -VMHostGroup $HostGroup -InheritNetworkSettings $False
PS C:\> $MACAddressPool = @(Get-SCMACAddressPool -VMHostGroup $HostGroup)
PS C:\> Get-SCMACAddress -MACAddressPool $MACAddressPool[0]

The first command gets the host group object at the path "All Hosts\HostGroup02\Production" and stores the object in the $HostGroup variable.

The second command disables inheritance of network settings for the host group stored in $HostGroup. This is done so that the next command returns only the MAC address pools associated with All Hosts\HostGroup02\Production, rather than all the MAC address pools inherited by this host group.

The third command gets the MAC address pool objects associated with the host group stored in $HostGroup and stores the objects in the $MACAddressPool array.

The last command gets the allocated MAC addresses for the first MAC address pool in $MACAddressPool.

Parameters

-All

Indicates that this cmdlet gets all subordinate objects independent of the parent object. For example, the command Get-SCVirtualDiskDrive -All gets all virtual disk drive objects regardless of the virtual machine object or template object that each virtual disk drive object is associated with.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Assigned

Indicates that this cmdlet retrieves IP addresses or MAC addresses that have been allocated from an address pool and assigned to a resource.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-GrantToObjectID

Specifies the ID of an object to which an allocated IP address or MAC address is assigned.

Type:Guid
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ID

Specifies the numerical identifier as a globally unique identifier, or GUID, for a specific object.

Type:Guid
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MACAddress

Specifies the Media Access Control (MAC) address, or a set of MAC addresses, for a physical or virtual network adapter on a computer.

- Example format for a single MAC address: -MACAddress "00-15-5D-B4-DC-00"

  • Example format for a set of MAC addresses: -MACAddress "00-15-5D-B4-DC-00", "00-1A-A0-E3-75-29"

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MACAddressPool

Specifies a MAC address pool.

Type:MACAddressPool
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UnAssigned

Retrieves IP addresses or MAC addresses that have been allocated from an address pool but not assigned to a resource.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Outputs

CloudPairing[]

This cmdlet returns an array of **CloudPairing** objects.