Set-SCVMSubnet
Modifies a virtual machine subnet.
Syntax
Set-SCVMSubnet
[-VMMServer <ServerConnection>]
[-VMSubnet] <VMSubnet>
[-Name <String>]
[-Description <String>]
[-SubnetVLan <SubnetVLan[]>]
[-MaxNumberOfPorts <UInt32>]
[-RemoveMaxNumberOfPorts]
[-PortACL <PortACL>]
[-RemovePortACL]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
Description
The Set-SCVMSubnet cmdlet modifies the properties of a virtual machine subnet.
To get a virtual machine subnet object to update, use the Get-SCVMSubnet cmdlet.
For more information about virtual machine subnets, type Get-Help New-SCVMSubnet -Detailed
.
Examples
Example 1: Change the subnet VLan for a virtual machine subnet
PS C:\> $SubnetVLan = New-SCSubnetVLan -Subnet "192.168.4.0/24"
PS C:\> Get-SCVMSubnet -Name "VMSubnet01" | Set-SCVMSubnet -SubnetVLan $SubNetVLan
The first command creates a subnet VLan object and stores the object in the $SubnetVLan variable.
The second command gets the virtual machine subnet object named VMSubnet01 and uses the pipeline operator to pass the object to Set-SCVMSubnet which updates its subnet VLan to 192.168.4.0/24.
Parameters
-Description
Specifies a description for the virtual machine subnet.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobVariable
Specifies that job progress is tracked and stored in the variable named by this parameter.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MaxNumberOfPorts
Specifies the maximum number of ports supported by the virtual machine subnet.
Type: | UInt32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Specifies the name of a Virtual Machine Manager (VMM) object.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OnBehalfOfUser
Specifies a user name. This cmdlet operates on behalf of the user that this parameter specifies.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OnBehalfOfUserRole
Specifies a user role. To obtain a user role, use the Get-SCUserRole cmdlet. This cmdlet operates on behalf of the user role that this parameter specifies.
Type: | UserRole |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PortACL
Specifies a port access control list (ACL).
Type: | PortACL |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | 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.
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RemoveMaxNumberOfPorts
Removes the value set on the virtual machine subnet for the maximum number of ports supported by the virtual machine subnet.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RemovePortACL
Indicates that this operation removes the port ACL.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubnetVLan
Specifies one or more IP subnet and VLAN sets.
For information about creating a SubnetVLan object, type Get-Help New-SCSubNetVLan
.
Type: | SubnetVLan[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMMServer
Specifies a VMM server object.
Type: | ServerConnection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VMSubnet
Specifies a virtual machine subnet object.
To obtain a VMSubnet object, use the Get-SCVMSubnet cmdlet.
Type: | VMSubnet |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |