Udostępnij za pośrednictwem


Revoke-SCMACAddress

Returns an allocated MAC address to the MAC address pool.

Syntax

Default (Default)

Revoke-SCMACAddress
    [-VMMServer <ServerConnection>]
    [-AllocatedMACAddress] <AllocatedMACAddress>
    [-ReturnToPool <Boolean>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

Description

The Revoke-SCMACAddress cmdlet returns an allocated MAC (Media Access Control) address to the MAC address pool.

For information about granting MAC addresses, type: Get-Help Grant-SCMACAddress -Detailed.

Examples

Example 1: Return an allocated MAC address to the MAC address pool

PS C:\> $HostGroup = Get-SCVMHostGroup | where { $_.Path -eq "All Hosts\HostGroup02\Production" }
PS C:\> $MACAddressPool = Get-SCMACAddressPool -VMHostGroup $HostGroup
PS C:\> $MACAddress = Get-SCMACAddress -MACAddressPool $MACAddressPool[0]
PS C:\> Revoke-SCMACAddress $MACAddress[0]

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

The second commmand gets the MAC address pools for the host group stored in $HostGroup and stores the objects in the $MACAddressPool array.

The third command gets the allocated MAC addresses from the first MAC address pool stored in $MACAddressPool and stores the objects in $MACAddress.

The last command revokes the first MAC address stored in $MACAddress.

Parameters

-AllocatedMACAddress

Specifies a MAC address that has been allocated from a MAC address pool.

Parameter properties

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

Parameter sets

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

-JobVariable

Specifies a variable in which job progress is tracked and stored.

Parameter properties

Type:String
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

-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Parameter properties

Type:Guid
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

-ReturnToPool

Indicates whether an IP address or MAC address is returned to its address pool. By default, this value is set to $True.

Parameter properties

Type:Boolean
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

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

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 Virtual Machine Manager (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.