Edit

Share via


Get-AzStorageTaskAssignment

Get the storage task assignment properties

Syntax

List (Default)

Get-AzStorageTaskAssignment
    -AccountName <String>
    -ResourceGroupName <String>
    [-SubscriptionId <String[]>]
    [-Maxpagesize <Int32>]
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

Get

Get-AzStorageTaskAssignment
    -AccountName <String>
    -Name <String>
    -ResourceGroupName <String>
    [-SubscriptionId <String[]>]
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

GetViaIdentityStorageAccount

Get-AzStorageTaskAssignment
    -Name <String>
    -StorageAccountInputObject <IStorageIdentity>
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

GetViaIdentity

Get-AzStorageTaskAssignment
    -InputObject <IStorageIdentity>
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

Description

Get the storage task assignment properties

Examples

Example 1: Get a task assignment

Get-AzStorageTaskAssignment -ResourceGroupName myresourcegroup -AccountName myaccount -Name myassignment
Description                     : This is a task assignment
Enabled                         : True
EndBy                           : 7/2/2025 6:17:38 AM
Id                              : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount/storageTaskAssignments/myassignment
Interval                        : 1
IntervalUnit                    : days
Name                            : myassignment
ProvisioningState               : Succeeded
ReportPrefix                    : testc1
ResourceGroupName               : myresourcegroup
RunStatusEnum                   :
RunStatusError                  :
RunStatusFinishTime             :
RunStatusObjectFailedCount      :
RunStatusObjectsOperatedOnCount :
RunStatusObjectsSucceededCount  :
RunStatusObjectsTargetedCount   :
RunStatusRunResult              :
RunStatusStartTime              :
RunStatusStorageAccountId       :
RunStatusSummaryReportPath      :
RunStatusTaskAssignmentId       :
RunStatusTaskId                 :
RunStatusTaskVersion            :
StartFrom                       : 7/2/2024 6:17:38 AM
StartOn                         :
TargetExcludePrefix             : {}
TargetPrefix                    : {test}
TaskId                          : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.StorageActions/storageTasks/mystoragetask1
TriggerType                     : OnSchedule
Type                            : Microsoft.Storage/storageAccounts/storageTaskAssignments

This command gets the task assignment "myassignment" under storage account "myaccount".

Example 2: List task assignments under a storage account

Get-AzStorageTaskAssignment -ResourceGroupName myresourcegroup -AccountName myaccount
Name              ResourceGroupName
----              -----------------
assignment1       myresourcegroup
assignment2       myresourcegroup
assignment3       myresourcegroup

This command lists task assignments under the storage account "myaccount".

Parameters

-AccountName

The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

List
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Get
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Parameter properties

Type:PSObject
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzureRMContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

Identity Parameter

Parameter properties

Type:IStorageIdentity
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GetViaIdentity
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Maxpagesize

Optional, specifies the maximum number of storage task assignment Ids to be included in the list response.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

List
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:StorageTaskAssignmentName

Parameter sets

Get
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
GetViaIdentityStorageAccount
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

The name of the resource group. The name is case insensitive.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

List
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Get
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-StorageAccountInputObject

Identity Parameter

Parameter properties

Type:IStorageIdentity
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GetViaIdentityStorageAccount
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-SubscriptionId

The ID of the target subscription.

Parameter properties

Type:

String[]

Default value:(Get-AzContext).Subscription.Id
Supports wildcards:False
DontShow:False

Parameter sets

List
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Get
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

IStorageIdentity

Outputs

IStorageTaskAssignment