< Back
Get-AzureRole
Post
NAME Get-AzureRole
SYNOPSIS
Returns a list of roles in your Microsoft Azure service.
SYNTAX
Get-AzureRole [-ServiceName] <String> [[-Slot] <String>] [[-RoleName] <String>] [[-InstanceDetails]] [-Profile <AzureSMProfile>] [-InformationAction
<ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]
DESCRIPTION
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.
PARAMETERS
-ServiceName <String>
Specifies the name of the Azure service.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Slot <String>
Specifies the Azure deployment environment. The acceptable values for this parameter are: Production or Staging.
Required? false
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-RoleName <String>
Specifies the name of the role to get.
Required? false
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-InstanceDetails [<SwitchParameter>]
Specifies that this cmdlet returns details about the instances on each role.
Required? false
Position? 3
Default value False
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Profile <AzureSMProfile>
Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-InformationAction <ActionPreference>
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-InformationVariable <String>
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
-------------------------- Example 1: Get a list of roles for a service --------------------------
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.
-------------------------- Example 2: Get details on a role running on a 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.
-------------------------- Example 3: Get instance information on instances of a role running on a 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.
-------------------------- Example 4: Get a table of the role instances associated with a 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.
RELATED LINKS
Reset-AzureRoleInstance
SYNOPSIS
Returns a list of roles in your Microsoft Azure service.
SYNTAX
Get-AzureRole [-ServiceName] <String> [[-Slot] <String>] [[-RoleName] <String>] [[-InstanceDetails]] [-Profile <AzureSMProfile>] [-InformationAction
<ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]
DESCRIPTION
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.
PARAMETERS
-ServiceName <String>
Specifies the name of the Azure service.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Slot <String>
Specifies the Azure deployment environment. The acceptable values for this parameter are: Production or Staging.
Required? false
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-RoleName <String>
Specifies the name of the role to get.
Required? false
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-InstanceDetails [<SwitchParameter>]
Specifies that this cmdlet returns details about the instances on each role.
Required? false
Position? 3
Default value False
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Profile <AzureSMProfile>
Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-InformationAction <ActionPreference>
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-InformationVariable <String>
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
-------------------------- Example 1: Get a list of roles for a service --------------------------
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.
-------------------------- Example 2: Get details on a role running on a 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.
-------------------------- Example 3: Get instance information on instances of a role running on a 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.
-------------------------- Example 4: Get a table of the role instances associated with a 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.
RELATED LINKS
Reset-AzureRoleInstance