Set-SCVMNetworkGateway
设置虚拟机网络网关的属性。
语法
Set-SCVMNetworkGateway
[-VMMServer <ServerConnection>]
[-VMNetworkGateway] <VMNetworkGateway>
[-Name <String>]
[-Description <String>]
[-EnableBGP <Boolean>]
[-AutonomousSystemNumber <UInt32>]
[-NetworkRoutes <NetworkRoute[]>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
说明
Set-SCVMNetworkGateway cmdlet 更新虚拟机网络网关的属性。
示例
示例 1:修改虚拟机网络网关的属性
PS C:\> $VmNetworkGateway = Get-SCVMNetworkGateway -Name "VMGateway01"
PS C:\> Set-SCVMNetworkGateway -VMNetworkGateway $VmNetworkGateway -EnableBGP $False
第一个命令获取名为 VMGateway01 的虚拟机网络网关,然后将其存储在$VmNetworkGateway变量中。
第二个命令在$VmNetworkGateway中禁用虚拟机网络网关的 BGP。
参数
-AutonomousSystemNumber
指定自治系统编号 (ASN) 。
Type: | UInt32 |
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 |
-EnableBGP
指示是否启用边界网关协议 (BGP) 。
Type: | Boolean |
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 |
-Name
指定 VMM 对象的名称。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NetworkRoutes
指定网络路由数组。
Type: | NetworkRoute[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OnBehalfOfUser
指定用户名。 此 cmdlet 代表此参数指定的用户操作。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OnBehalfOfUserRole
指定用户角色。 若要获取用户角色,请使用 Get-SCUserRole cmdlet。 此 cmdlet 代表此参数指定的用户角色进行操作。
Type: | UserRole |
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 |
-RunAsynchronously
指示作业以异步方式运行,以便控件立即返回到命令 shell。
Type: | SwitchParameter |
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 |
-VMNetworkGateway
指定虚拟机网络网关对象。
若要获取虚拟机网络网关对象,请使用 Get-SCVMNetworkGateway cmdlet。
Type: | VMNetworkGateway |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |