Skip to content

Instantly share code, notes, and snippets.

@ontouchstart
Created November 18, 2020 23:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ontouchstart/cc03f3fb0ac71f3e55b8649785a2194f to your computer and use it in GitHub Desktop.
Save ontouchstart/cc03f3fb0ac71f3e55b8649785a2194f to your computer and use it in GitHub Desktop.
Get-AzConsumptionUsageDetail | Select-Object -Property InstanceName, ConsumedService, UsageQuantity, UsageStart, UsageEnd | Sort-Object -Property UsageQuantity | ConvertTo-Json | Out-File -Path /home/AzConsumptionUsageDetail.json
[
{
"InstanceName": "win2016VM",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 0.000008,
"UsageStart": "2020-11-16T00:00:00Z",
"UsageEnd": "2020-11-16T23:59:59Z"
},
{
"InstanceName": "ontouchstart",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 0.000008,
"UsageStart": "2020-11-17T00:00:00Z",
"UsageEnd": "2020-11-17T23:59:59Z"
},
{
"InstanceName": "TutorialVM2",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 0.000027,
"UsageStart": "2020-11-16T00:00:00Z",
"UsageEnd": "2020-11-16T23:59:59Z"
},
{
"InstanceName": "TutorialVM1",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 0.000046,
"UsageStart": "2020-11-16T00:00:00Z",
"UsageEnd": "2020-11-16T23:59:59Z"
},
{
"InstanceName": "ontouchstart",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 0.00005,
"UsageStart": "2020-11-17T00:00:00Z",
"UsageEnd": "2020-11-17T23:59:59Z"
},
{
"InstanceName": "TutorialVM1",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 0.000092,
"UsageStart": "2020-11-17T00:00:00Z",
"UsageEnd": "2020-11-17T23:59:59Z"
},
{
"InstanceName": "TutorialVM2",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 0.00011,
"UsageStart": "2020-11-17T00:00:00Z",
"UsageEnd": "2020-11-17T23:59:59Z"
},
{
"InstanceName": "win2016VM",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 0.00015,
"UsageStart": "2020-11-16T00:00:00Z",
"UsageEnd": "2020-11-16T23:59:59Z"
},
{
"InstanceName": "win2016VM",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 0.000305,
"UsageStart": "2020-11-16T00:00:00Z",
"UsageEnd": "2020-11-16T23:59:59Z"
},
{
"InstanceName": "ontouchstart",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 0.000403,
"UsageStart": "2020-11-17T00:00:00Z",
"UsageEnd": "2020-11-17T23:59:59Z"
},
{
"InstanceName": "win2016VM",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 0.000461,
"UsageStart": "2020-11-16T00:00:00Z",
"UsageEnd": "2020-11-16T23:59:59Z"
},
{
"InstanceName": "ontouchstart",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 0.000714,
"UsageStart": "2020-11-17T00:00:00Z",
"UsageEnd": "2020-11-17T23:59:59Z"
},
{
"InstanceName": "win2016VM_disk1_985c124c5841416997098534e02fe8cf",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 0.002778,
"UsageStart": "2020-11-16T00:00:00Z",
"UsageEnd": "2020-11-16T23:59:59Z"
},
{
"InstanceName": "TutorialVM1",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 0.003544,
"UsageStart": "2020-11-16T00:00:00Z",
"UsageEnd": "2020-11-16T23:59:59Z"
},
{
"InstanceName": "TutorialVM2",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 0.003834,
"UsageStart": "2020-11-16T00:00:00Z",
"UsageEnd": "2020-11-16T23:59:59Z"
},
{
"InstanceName": "TutorialVM2_disk1_567132be62a2493fa11b3dd907cbe3a6",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 0.004167,
"UsageStart": "2020-11-16T00:00:00Z",
"UsageEnd": "2020-11-16T23:59:59Z"
},
{
"InstanceName": "TutorialVM1_disk1_29149e4fe9b04254bb7934a66f57a4e1",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 0.004167,
"UsageStart": "2020-11-16T00:00:00Z",
"UsageEnd": "2020-11-16T23:59:59Z"
},
{
"InstanceName": "win2016VM",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 0.004827,
"UsageStart": "2020-11-16T00:00:00Z",
"UsageEnd": "2020-11-16T23:59:59Z"
},
{
"InstanceName": "ontouchstart_disk1_ee5f0451695e4f3394d0c30dc31b0b9b",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 0.006945,
"UsageStart": "2020-11-17T00:00:00Z",
"UsageEnd": "2020-11-17T23:59:59Z"
},
{
"InstanceName": "TutorialVM2_disk1_567132be62a2493fa11b3dd907cbe3a6",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 0.008334,
"UsageStart": "2020-11-17T00:00:00Z",
"UsageEnd": "2020-11-17T23:59:59Z"
},
{
"InstanceName": "ontouchstart",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 0.009636,
"UsageStart": "2020-11-17T00:00:00Z",
"UsageEnd": "2020-11-17T23:59:59Z"
},
{
"InstanceName": "TutorialVM1_disk1_29149e4fe9b04254bb7934a66f57a4e1",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 0.009723,
"UsageStart": "2020-11-17T00:00:00Z",
"UsageEnd": "2020-11-17T23:59:59Z"
},
{
"InstanceName": "TutorialVM1PublicIP",
"ConsumedService": "Microsoft.Network",
"UsageQuantity": 1.0,
"UsageStart": "2020-11-16T00:00:00Z",
"UsageEnd": "2020-11-16T23:59:59Z"
},
{
"InstanceName": "TutorialVM2PublicIP",
"ConsumedService": "Microsoft.Network",
"UsageQuantity": 2.7833333333,
"UsageStart": "2020-11-16T00:00:00Z",
"UsageEnd": "2020-11-16T23:59:59Z"
},
{
"InstanceName": "ontouchstart",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 3.0,
"UsageStart": "2020-11-17T00:00:00Z",
"UsageEnd": "2020-11-17T23:59:59Z"
},
{
"InstanceName": "ontouchstart",
"ConsumedService": "Microsoft.Network",
"UsageQuantity": 3.03555555555556,
"UsageStart": "2020-11-17T00:00:00Z",
"UsageEnd": "2020-11-17T23:59:59Z"
},
{
"InstanceName": "win2016VM",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 3.083355,
"UsageStart": "2020-11-16T00:00:00Z",
"UsageEnd": "2020-11-16T23:59:59Z"
},
{
"InstanceName": "win2016VMPublicIP",
"ConsumedService": "Microsoft.Network",
"UsageQuantity": 3.51,
"UsageStart": "2020-11-16T00:00:00Z",
"UsageEnd": "2020-11-16T23:59:59Z"
},
{
"InstanceName": "TutorialVM1",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 4.783349,
"UsageStart": "2020-11-16T00:00:00Z",
"UsageEnd": "2020-11-16T23:59:59Z"
},
{
"InstanceName": "TutorialVM2",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 4.800016,
"UsageStart": "2020-11-16T00:00:00Z",
"UsageEnd": "2020-11-16T23:59:59Z"
},
{
"InstanceName": "TutorialVM2",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 5.0,
"UsageStart": "2020-11-17T00:00:00Z",
"UsageEnd": "2020-11-17T23:59:59Z"
},
{
"InstanceName": "TutorialVM1",
"ConsumedService": "Microsoft.Compute",
"UsageQuantity": 5.0,
"UsageStart": "2020-11-17T00:00:00Z",
"UsageEnd": "2020-11-17T23:59:59Z"
},
{
"InstanceName": "TutorialVM1PublicIP",
"ConsumedService": "Microsoft.Network",
"UsageQuantity": 6.0,
"UsageStart": "2020-11-17T00:00:00Z",
"UsageEnd": "2020-11-17T23:59:59Z"
},
{
"InstanceName": "TutorialVM2PublicIP",
"ConsumedService": "Microsoft.Network",
"UsageQuantity": 6.0,
"UsageStart": "2020-11-17T00:00:00Z",
"UsageEnd": "2020-11-17T23:59:59Z"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment