Set-AzureServiceProjectRole
Sets the number of instances or the runtime version of a role.
Note
The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement.
The Az PowerShell module is the recommended PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.
Syntax
Instances
Set-AzureServiceProjectRole
-Instances <Int32>
[-RoleName <String>]
[-PassThru]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Runtime
Set-AzureServiceProjectRole
-Runtime <String>
-Version <String>
[-RoleName <String>]
[-PassThru]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
VMSize
Set-AzureServiceProjectRole
-VMSize <String>
[-RoleName <String>]
[-PassThru]
[-Profile <AzureSMProfile>]
[<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.
Parameters
-Instances
Specifies the number of role instances for the specified web or worker role.
Parameter properties
| Type: | Int32 |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
Instances
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | 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.
Parameter properties
| Type: | AzureSMProfile |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-RoleName
Specifies the name of the web or worker role to be changed.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-Runtime
Specifies the runtime to add to the specified role.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
Runtime
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-Version
Specifies the version of the runtime to add to the role.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
Runtime
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-VMSize
Specifies the virtual machine size of the role.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
VMSize
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
undefined
Specifies the size of the virtual machine.