external help file | ms.assetid | online version | schema |
---|---|---|---|
Microsoft.WindowsAzure.Commands.ServiceManagement.dll-Help.xml |
7C50472E-CE36-4BF1-92C9-A3B9B183ACD1 |
2.0.0 |
Returns a list of roles in your Microsoft Azure service.
[!INCLUDE rdfe-banner]
Get-AzureRole [-ServiceName] <String> [[-Slot] <String>] [[-RoleName] <String>] [-InstanceDetails]
[-Profile <AzureSMProfile>] [-InformationAction <ActionPreference>] [-InformationVariable <String>]
[<CommonParameters>]
The Get-AzureRole cmdlet returns a list object with details on the roles in your Microsoft Azure service. If you specify the RoleName parameter, Get-AzureRole returns details on that role only. If you specify the InstanceDetails parameter, additional, instance-specific details are returned.
PS C:\> Get-AzureRole -ServiceName "MySvc01" -Slot "Production"
This command returns an object with details on all the production roles running on the MySvc01 service.
PS C:\> Get-AzureRole -ServiceName "MySvc1" -Slot "Staging" -RoleName "MyTestVM3"
This command returns an object with details on the MyTestVM3 role, running on the staging environment of the MySvc01 service.
PS C:\> Get-AzureRole -ServiceName "MySvc01" -Slot "Production" -RoleName "MyTestVM02" -InstanceDetails
This command returns an object with details on the instances of the MyTestVM02 role running in the production environment on the MySvc01 service.
PS C:\> Get-AzureRole -ServiceName "MySvc01" -Slot "Production" -InstanceDetails | Format-Table -Auto "InstanceName", "InstanceSize", "InstanceStatus"
This command returns a table of the instance name, size, and status of all role instances running in the production environment on the MySvc01 service.
Specifies how this cmdlet responds to an information event.
The acceptable values for this parameter are:
- Continue
- Ignore
- Inquire
- SilentlyContinue
- Stop
- Suspend
Type: ActionPreference
Parameter Sets: (All)
Aliases: infa
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies an information variable.
Type: String
Parameter Sets: (All)
Aliases: iv
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies that this cmdlet returns details about the instances on each role.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
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
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the name of the role to get.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the name of the Azure service.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the Azure deployment environment. The acceptable values for this parameter are: Production or Staging.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).