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-AzureVirtualNetworkSubnetConfig

New-AzureVirtualNetworkSubnetConfig

microsoft.azure.commands.network.dll

Synopsis

Create a new Virtual Network Subnet

Syntax

New-AzureVirtualNetworkSubnetConfig [-Name] [-AddressPrefix] [-NetworkSecurityGroup] [-Profile] [<CommonParameters>]

New-AzureVirtualNetworkSubnetConfig [-Name] [-AddressPrefix] [-NetworkSecurityGroupId] [-Profile] [<CommonParameters>]

Detailed Description

Create a new Virtual Network Subnet

Parameters

-Name <String>

The name of the Subnet.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-AddressPrefix <String>

The Ip range covered by this Subnet.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-NetworkSecurityGroup <PSNetworkSecurityGroup>

The Network Security Group object containing ACLs that will apply to this Subnet.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Profile <AzureProfile>

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-NetworkSecurityGroupId <String>

A reference to a Network Security Group containing ACLs that will apply to this Subnet.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-DnsServer <list`1[string]>

The Dns servers to be used for performing Dns lookups from this Subnet.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type


Return Type


Notes

Examples

-------------------------- Example 1 --------------------------

New-AzureResourceGroup `
    -Name 'SampleRG' `
    -Location "West US"

$backendSubnet = New-AzureVirtualNetworkSubnetConfig -Name LB-Subnet-BE -AddressPrefix 10.0.2.0/24

$vnet = New-AzurevirtualNetwork `
                      -Name SampleVNet `
                      -ResourceGroupName SampleRG `
                      -Location "West US" `
                      -AddressPrefix 10.0.0.0/16 `
             -Subnet $frontendSubnet,$backendSubnet