Share via


Get-PartnerCustomerSubscriptionUtilization

Gets the utilization of a customer's Azure subscription.

Syntax

Default (Default)

Get-PartnerCustomerSubscriptionUtilization
    -CustomerId <String>
    [-EndDate <DateTimeOffset>]
    [-Granularity <AzureUtilizationGranularity>]
    [-PageSize <Int32>]
    [-ShowDetails]
    -StartDate <DateTimeOffset>
    -SubscriptionId <String>
    [<CommonParameters>]

Description

Gets the utilization of a customer's Azure subscription with a daily or hourly granularity.

Examples

Example 1

PS C:\> Get-PartnerCustomerSubscriptionUtilization -CustomerId <Customer ID> -SubscriptionId <Subscription ID> -StartDate [System.DateTimeOffset]::Now.AddDays(-1) -Granularity Hourly -ShowDetails

Gets a customer's Azure utilization for a specific subscription from a start date (specified in UTC) with a hourly granularity.

Example 2

PS C:\> Get-PartnerCustomerSubscriptionUtilization -CustomerId <Customer ID> -SubscriptionId <Subscription ID> -StartDate [System.DateTimeOffset]::Now.AddDays(-1) -EndDate [System.DateTimeOffset]::Now -Granularity Daily -ShowDetails

Gets a customer's Azure utilization for a specific subscription from a start date (specified in UTC) with a daily granularity.

Parameters

-CustomerId

The identifier of the customer.

Parameter properties

Type:String
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

-EndDate

The end date (in UTC) of the usages to filter.

Parameter properties

Type:DateTimeOffset
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

-Granularity

The resource usage time granularity. Can either be daily or hourly. The default value is daily

Parameter properties

Type:AzureUtilizationGranularity
Default value:None
Accepted values:Daily, Hourly
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

-PageSize

The number of records returned with a single request to the partner service.

Parameter properties

Type:Int32
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

-ShowDetails

Flag indicating whether or not utilization records will be aggregated on the resource level

Parameter properties

Type:SwitchParameter
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

-StartDate

The start date (in UTC) of the usages to filter.

Parameter properties

Type:DateTimeOffset
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

-SubscriptionId

The identifier of subscription.

Parameter properties

Type:String
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

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

None

Outputs

Microsoft.Store.PartnerCenter.PowerShell.Models.Utilizations.PSAzureUtilizationRecord