Get-AzureStorSimpleTask

Gets status of a task on a StorSimple device.

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

Get-AzureStorSimpleTask
   -InstanceId <String>
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]

Description

The Get-AzureStorSimpleTask cmdlet retrieves the status of a task that runs asynchronously on an Azure StorSimple device.

While you manage a StorSimple device, most create, read, update, and delete actions can run asynchronously. Windows PowerShell returns a TaskId. Use the ID to get the current status of the task.

Examples

Example 1: Get the status of a task

PS C:\>Get-AzureStorSimpleTask -TaskId "53816d8d-a8b5-4c1d-a177-e59007608d6d"
VERBOSE: ClientRequestId: d9c1e8a7-994f-4698-8b42-064600b45cad_PS
VERBOSE: ClientRequestId: aae17c82-6fd3-435e-a965-1c66b3c955fe_PS


AsyncTaskAggregatedResult : Succeeded
Error                     : Microsoft.WindowsAzure.Management.StorSimple.Models.ErrorDetails
Result                    : Succeeded
Status                    : Completed
TaskId                    : 53816d8d-a8b5-4c1d-a177-e59007608d6d
TaskSteps                 : {}
StatusCode                : OK
RequestId                 : e9174990825750bba69383748f23019c

This command gets the status of the task that has the specified ID. The results show that the task has a status of completed and a result of successful.

Parameters

-InstanceId

Specifies the ID of the task for which this cmdlet tracks status.

Type:String
Aliases:TaskId
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters: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.

Type:AzureSMProfile
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

JobStatusInfo

This cmdlet returns a TaskStatusInfo object which contains the following fields:

  • Error. ErrorDetails, which contains Code and Message.
  • TaskId. String. The ID of the task for which status is returned.
  • TaskSteps. IList<TaskStep>. Each TaskStep object contains Detail, ErrorCode, Message, Result, and Status.
  • Result. TaskResult, which contains the overall result of the task. Valid values are: Failed, Succeeded, PartialSuccess, Cancelled, and Invalid.
  • Status. TaskStatus, which contains the overall running status of the task. Valid values are: Inprogress, Invalid, and Completed.
  • TaskResult. TaskResult, a value computed based on Result and Status. Valid values are: Failed, Succeeded, InProgress, PartialSuccess, Cancelled, and Invalid.