Sdílet prostřednictvím


Get-SCMACAddress

Gets allocated MAC addresses.

Syntax

All (Default)

Get-SCMACAddress
    [-VMMServer <ServerConnection>]
    [-All]
    [-UnAssigned]
    [-Assigned]
    [<CommonParameters>]

ByPool

Get-SCMACAddress
    -MACAddressPool <MACAddressPool>
    [-VMMServer <ServerConnection>]
    [-UnAssigned]
    [-Assigned]
    [<CommonParameters>]

ByID

Get-SCMACAddress
    -ID <Guid>
    [-VMMServer <ServerConnection>]
    [-UnAssigned]
    [-Assigned]
    [<CommonParameters>]

ByAllocatedToObjectID

Get-SCMACAddress
    -GrantToObjectID <Guid>
    [-VMMServer <ServerConnection>]
    [-UnAssigned]
    [-Assigned]
    [<CommonParameters>]

ByMACAddress

Get-SCMACAddress
    -MACAddress <String>
    [-VMMServer <ServerConnection>]
    [-UnAssigned]
    [-Assigned]
    [<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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

All
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-GrantToObjectID

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

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByAllocatedToObjectID
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ID

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

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByID
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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"

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByMACAddress
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MACAddressPool

Specifies a MAC address pool.

Parameter properties

Type:MACAddressPool
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByPool
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UnAssigned

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMMServer

Specifies a VMM server object.

Parameter properties

Type:ServerConnection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

CloudPairing

This cmdlet returns an array of CloudPairing objects.