Set-​Azure​Service​Project​Role

Sets the number of instances or the runtime version of a role.

Syntax

Set-AzureServiceProjectRole
   -Instances <Int32>
   [-PassThru]
   [-Profile <AzureSMProfile>]
   [-RoleName <String>]
   [<CommonParameters>]
Set-AzureServiceProjectRole
   [-PassThru]
   [-Profile <AzureSMProfile>]
   [-RoleName <String>]
   -Runtime <String>
   -Version <String>
   [<CommonParameters>]
Set-AzureServiceProjectRole
   [-PassThru]
   [-Profile <AzureSMProfile>]
   [-RoleName <String>]
   -VMSize <String>
   [<CommonParameters>]

Description

This topic describes the cmdlet in the 0.8.10 version of the Microsoft Azure PowerShell module. To get the version of the module you're using, in the Azure PowerShell console, type (Get-Module -Name Azure).Version.

The Set-AzureServiceProjectRole cmdlet sets the number of role instances for the specified role.

Examples

Example 1: Set instances for a web role

PS C:\> Set-AzureServiceProjectRole "MyWebRole" 2

Sets the number of instances for the web role named MyWebRole1 to 2.

Example 2: Set instances for a worker role

PS C:\> Set-AzureServiceProjectRole "MyWorkerRole1" 2

Sets the role instance count for the worker role named WorkerRole1 to 2.

Example 3: Set the runtime version for a role service

PS C:\> Set-AzureServiceProjectRole "MyRole1" node 0.6.20

Sets the node.exe runtime version for role MyRole1 to 0.6.20.

Required Parameters

-Instances

Specifies the number of role instances for the specified web or worker role.

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

Specifies the runtime to add to the specified role.

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

Specifies the virtual machine size of the role.

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

Specifies the version of the runtime to add to the role.

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

Optional Parameters

-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
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
Accept pipeline input:False
Accept wildcard characters:False
-RoleName

Specifies the name of the web or worker role to be changed.

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

Inputs

Specifies the size of the virtual machine.