Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

New-WAPackVMSubnet

New-WAPackVMSubnet

microsoft.windowsazure.commands.dll

Synopsis

Creates a virtual machine subnet.

Syntax

New-WAPackVMSubnet [-VNet] [-Name] [-Subnet] [<CommonParameters>]

Detailed Description

The New-WAPackVMSubnet cmdlet creates a virtual machine subnet.

Parameters

-VNet <VNet>

Specifies a VNet associated with the virtual machine subnet.

Aliases

None

Required?

true

Position

named

Default value

Accept pipeline input?

True (ByValue)

Accept wildcard characters?

false

-Name <String>

Specifies a name for the virtual machine subnet.

Aliases

None

Required?

true

Position

named

Default value

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-Subnet <String>

Specifies a subnet for the virtual machine subnet.

Aliases

None

Required?

true

Position

named

Default value

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

Input Type


Return Type


Notes

None

Examples

Example 1: Create a virtual machine subnet

The first command first retrieves the virtual machine network to which we want to add a new virtual machine subnet. This virtual machine network is named “ContosoVNet01”.

The second and last command creates a virtual machine subnet using the previously retrieve virtual machine network, a name “ContosoVMSubnet01” and a subnet “192.168.1.0/24”.

          PS C:\>$VNet = Get-WAPackVNet -Name "ContosoVNet01"
          PS C:\>New-WAPackVMSubnet –VNet $VNet -Name "ContosoVMSubnet01" –Subnet “192.168.1.0/24”
        

Get-WAPackVMSubnet
Remove-WAPackVMSubnet