Exporter (0) Imprimer
Développer tout
EN
Ce contenu n’est pas disponible dans votre langue. Voici la version anglaise.

Get-AzureRole

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Get-AzureRole

Returns a list of roles in your Windows Azure service.

 

Parameter Set: Default
Get-AzureRole [-ServiceName] <String> [-Slot] <String> [[-RoleName] <String> ] [[-InstanceDetails]] [ <CommonParameters>]




 

This topic describes the cmdlet in the .6.19 version of the Windows Azure PowerShell module. To find out the version of the module you're using, from the Windows Azure PowerShell console, type (get-module azure).version.

The Get-AzureRole cmdlet returns a list object with details on the roles in your Windows 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.

 

-InstanceDetails

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


Aliases

none

Required?

false

Position?

4

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?

3

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-ServiceName<String>

Specifies the name of the Windows Azure service.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Slot<String>

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


Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see  about_CommonParameters (http://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

 

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

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


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.


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.


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.


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

Related topics

Afficher:
© 2014 Microsoft