Set-SCMACAddressPool
修改 MAC 地址池。
语法
Set-SCMACAddressPool
[-VMMServer <ServerConnection>]
[-MACAddressPool] <MACAddressPool>
[-Name <String>]
[-Description <String>]
[-MACAddressRangeStart <String>]
[-MACAddressRangeEnd <String>]
[-AddVMHostGroup <HostGroup[]>]
[-RemoveVMHostGroup <HostGroup[]>]
[-SupportedVirtualizationPlatforms <VirtualizationPlatform[]>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
说明
Set-SCMACAddressPool cmdlet 修改 Virtual Machine Manager (VMM) Media 访问控制 (MAC) 地址池。 例如,可以向 MAC 地址池中添加主机组或删除主机组。 MAC 地址池可以与一个或多个主机组相关联。
示例
示例 1:更改与 MAC 地址池关联的主机组
PS C:\> $MACPool = Get-SCMACAddressPool -Name "MAC Address Pool 01"
PS C:\> $HostGroup = Get-SCVMHostGroup | where { $_.Path -eq "All Hosts\HostGroup03\Production" }
PS C:\> Set-SCMacAddressPool -MACAddressPool $MACPool -AddVMHostGroup $HostGroup
第一个命令获取名为 MAC 地址池 01 的 MAC 地址池对象,并将对象存储在$MACPool变量中。
第二个命令获取名为“所有 Hosts\HostGroup03\Production”的主机组对象,并将该对象存储为$HostGroup变量。
最后一个命令更新会将存储在$HostGroup中的主机组添加到存储在$MACPool中的 MAC 地址池。 在这种情况下,MAC 地址池 01 现在还与名为“所有主机\HostGroup03\Production”的主机组相关联,除了以前与之关联的主机组。
参数
-AddVMHostGroup
指定此 cmdlet 添加到现有主机组数组或私有云的主机组数组。
Type: | HostGroup[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Description
指定地址池的说明。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobVariable
指定在其中跟踪和存储作业进度的变量。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MACAddressPool
指定 MAC 地址池。
Type: | MACAddressPool |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-MACAddressRangeEnd
指定静态 MAC 地址范围内的最后一个地址。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MACAddressRangeStart
指定静态 MAC 地址范围内的第一个地址。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
指定 VMM 对象的名称。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PROTipID
指定触发此操作 (PRO 提示) 的性能和资源优化提示的 ID。 此参数允许审核 PRO 提示。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RemoveVMHostGroup
指定此 cmdlet 从主机组数组或私有云中删除的主机组数组。
Type: | HostGroup[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RunAsynchronously
指示作业异步运行,以便控件立即返回到命令 shell。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SupportedVirtualizationPlatforms
指定一个或多个虚拟化平台对象。
Type: | VirtualizationPlatform[] |
Accepted values: | Unknown, VirtualServer, HyperV, VMWareVC, VMWareESX, XENServer |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMMServer
指定VMM 服务器对象。
Type: | ServerConnection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
输出
MACAddressPool
此 cmdlet 返回 MACAddressPool 对象。