New-WAPackVMRole

Creates a virtual machine role.

Note

The cmdlets referenced in this documentation are for managing legacy Azure resources that use Service Management APIs. See the Az PowerShell module for cmdlets to manage Azure Resource Manager resources.

Syntax

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

Description

These topics are deprecated and will be removed in the future. 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.

Parameters

-CloudService

Specifies a cloud service for the virtual machine role.

Type:CloudService
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Label

Specifies a label for the virtual machine role.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

Specifies a name for the virtual machine role.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceDefinition

Specifies a resource definition for the virtual machine role.

Type:VMRoleResourceDefinition
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False