Share via


Get-AzsSubscriberUsage

Gets a collection of SubscriberUsageAggregates, which are UsageAggregates from users.

Syntax

Default (Default)

Get-AzsSubscriberUsage
    -ReportedEndTime <DateTime>
    -ReportedStartTime <DateTime>
    [-SubscriptionId <String[]>]
    [-AggregationGranularity <String>]
    [-ContinuationToken <String>]
    [-SubscriberId <String>]
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

Description

Gets a collection of SubscriberUsageAggregates, which are UsageAggregates from users.

Examples

Example 1: Get usage data aggregated by day

Get-AzsSubscriberUsage -ReportedStartTime "2019/12/30" -ReportedEndTime "2019-12-31" -AggregationGranularity Daily

Get the usage data for the entire day of 30th Dec 2019 (in UTC) for all tenants under provider aggregated by the day. Specify the date using the format mm/dd/yyyy. If called as the service administrator, this effectively shows all usage data for every tenant.

Example 2: Get usage data aggregated by the hour

Get-AzsSubscriberUsage -ReportedStartTime "12/30/2019 15:00" -ReportedEndTime "12/30/2019 16:00" -AggregationGranularity Hourly

Get the usage data between 3pm - 4am on 30th Dec 2019 (in UTC) aggregated by the hour. Specify the date and time using the format mm/dd/yyyy HH:MM. Likewise, if called as the service administrator, this effectively shows all usage data for every tenant.

Parameters

-AggregationGranularity

The aggregation granularity.

Parameter properties

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

Parameter sets

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

-ContinuationToken

The continuation token.

Parameter properties

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

Parameter sets

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

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:System.Management.Automation.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

-ReportedEndTime

The reported end time (exclusive).

Parameter properties

Type:System.DateTime
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

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

-ReportedStartTime

The reported start time (inclusive).

Parameter properties

Type:System.DateTime
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

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

-SubscriberId

The tenant subscription identifier.

Parameter properties

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

Parameter sets

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

-SubscriptionId

Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

Parameter properties

Type:

System.String[]

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

Parameter sets

(All)
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.

Outputs

Microsoft.Azure.PowerShell.Cmdlets.Commerce.Models.Api20150601Preview.IUsageAggregate