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

New-AzureVirtualNetwork

microsoft.azure.commands.network.dll

Synopsis

Create a new Virtual Network

Syntax

New-AzureVirtualNetwork [-Name] [-ResourceGroupName] [-Location] [-AddressPrefix] [-DnsServer] [-Subnet] [-Tag] [-Force] [-Profile] [<CommonParameters>]

Detailed Description

Create a new Virtual Network

Parameters

-Name <String>

The name of the Virtual Network.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-ResourceGroupName <String>

The name of the Resource Group containing the Virtual Network.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Location <String>

The Region in which this Virtual Network will be created.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-AddressPrefix <List`1[String]>

A list of Ip ranges covered by this Virtual Network.

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 Virtual Network.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Subnet <List`1[PSSubnet]>

A list of Subnets associated with this Virtual Network.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Tag <Hashtable[]>

A dictionary of tags to be associated with this Virtual Network.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Force <SwitchParameter>

Force the creation of this Virtual Network possibly overwriting an existing Virtual Network.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Profile <AzureProfile>

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