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
 

Set-AzureSubnet

Set-AzureSubnet

microsoft.windowsazure.commands.servicemanagement.dll

Synopsis

Defines the subnet list for a Microsoft Azure virtual machine.

Syntax

Set-AzureSubnet [-SubnetNames] [-VM] [<CommonParameters>]

Detailed Description

The Set-AzureSubnet cmdlet sets the subnet list for a virtual machine configuration. Use with New-AzureVM to set the subnets for a virtual machine.

Parameters

-SubnetNames <String[]>

Specifies the list of subnet names.

Aliases

None

Required?

true

Position

0

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-VM <IPersistentVM>

Specifies the virtual machine object.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByValue, ByPropertyName)

Accept wildcard characters?

false

Input Type


Return Type


Notes

Examples

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

This example adds a subnet to the virtual machine configuration and then creates the virtual machine "MyVM".

PS C:\> C:\PS>New-AzureVMConfig –Name "MyVM" –ImageName $image –InstanceSize "Small" `
          | Add-AzureProvisioningConfig –Windows –Password $passwd `
          | Set-AzureSubnet "PubSubnet","PrivSubnet" `
          | New-AzureVM –ServiceName "MySvc"

Get-AzureVM
Update-AzureVM