New-​WA​Pack​VM​Role

Creates a virtual machine role.

Syntax

New-WAPackVMRole
   -CloudService <CloudService>
   -Label <String>
   -Name <String>
   [-Profile <AzureSMProfile>]
   -ResourceDefinition <VMRoleResourceDefinition>
   [<CommonParameters>]

Description

These topics are deprecated and will be removed in the future. For the updated topics, see Azure WAPack Cmdlets (http://msdn.microsoft.com/library/dn776450.aspx). This topic describes the cmdlet in the 0.8.1 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (Get-Module -Name Azure).Version.

The New-WAPackVMRole cmdlet creates a virtual machine role.

Examples

Example 1: Create a virtual machine role (emulating WAP behavior)

PS C:\> New-WAPackVMRole -Name "ContosoVMRole01" -Label "ContosoVMRoleLabel01" -ResourceDefinition $resdef

Since we do not specify any cloud service (emulating WAP behavior), the command will create a cloud service for us which will have the same name as the virtual machine role. In this case, the following command will create a virtual machine role with the name ContosoVMRole01, label ContosoVMRoleLabel01. Note that the resource definition being used here has to be manually created though PowerShell.

Required Parameters

-CloudService

Specifies a cloud service for the virtual machine role.

Type:CloudService
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Label

Specifies a label for the virtual machine role.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Name

Specifies a name for the virtual machine role.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceDefinition

Specifies a resource definition for the virtual machine role.

Type:VMRoleResourceDefinition
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Profile

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

Type:AzureSMProfile
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False