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
 

Get-AzureRole

Get-AzureRole

microsoft.windowsazure.commands.servicemanagement.dll

Synopsis

Returns a list of roles in your Microsoft Azure service.

Syntax

Get-AzureRole [-ServiceName] [-Slot] [-RoleName] [-InstanceDetails] [<CommonParameters>]

Detailed Description

The Get-AzureRole cmdlet returns a list object with details on the roles in your Microsoft Azure service. If the RoleName parameter is specified, Get-AzureRole returns details on that role only. If the InstanceDetails parameter is specified, additional, instance specific details are returned.

Parameters

-ServiceName <String>

Specifies the name of the Microsoft Azure service.

Aliases

None

Required?

true

Position

0

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Slot <String>

Specifies the Microsoft Azure deployment environment. Choices are "Production" or "Staging".

Aliases

None

Required?

false

Position

1

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-RoleName <String>

When specified, returns details only on the specified role.

Aliases

None

Required?

false

Position

2

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-InstanceDetails <SwitchParameter>

When specified, returns details about the instances on each role.

Aliases

None

Required?

false

Position

3

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

Input Type


Return Type


Notes

Examples

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

This command returns an object with details on all the production roles running on the "MySvc1" service.

PS C:\> C:\PS>Get-AzureRole –ServiceName "MySvc1" –Slot Production

-------------------------- Example 2 --------------------------

This command returns an object with details on the "MyTestVM3" role, running on the staging environment of the "MySvc1" service.

PS C:\> C:\PS>Get-AzureRole –ServiceName "MySvc1" –Slot Staging –RoleName "MyTestVM3"

-------------------------- Example 3 --------------------------

This command returns an object with details on the instances of the "MyTestVM2" role running in the production environment on the "MySvc1" service.

PS C:\> C:\PS>Get-AzureRole –ServiceName "MySvc1" –Slot Production –RoleName "MyTestVM2" -InstanceDetails

-------------------------- Example 4 --------------------------

This command returns a table of the instance name, size, and status of all role instances running in the production environment on the "MySvc1" service.

PS C:\> C:\PS>Get-AzureRole –ServiceName "MySvc1" –Slot Production  -InstanceDetails `
          | Format-Table –Auto "InstanceName", "InstanceSize", "InstanceStatus"

Set-AzureRole