More often than not, once we need to test consumption to maintain an eye on our Azure VM costs, we use Azure Portal as a result of it’s simpler to slender down and get the quantity that you’re on the lookout for.
Typically, chances are you’ll need to do a fast test on a given VM to establish the prices, and that is likely one of the requests that I obtained as we speak. We’ve got the Get-AzConsumptionUsageDetail cmdlet that helps precisely on that entrance. Nonetheless, the output has a variety of data and lacks totals, which makes it more durable whenever you want a easy reply like how a lot that VM value final month or the price up to now this month.
” alt=”Azure VM costs” width=”1024″ height=”425″ data-ezsrc=”https://techcrues.com/wp-content/uploads/2020/02/must-test-your-azure-vm-prices-use-this-script.png” />
I created a script that you simply present the VM identify, and it offers you the price of the present cycle and the earlier month.
” alt=”” width=”895″ height=”213″ data-ezsrc=”https://techcrues.com/wp-content/uploads/2020/02/1582712329_82_must-test-your-azure-vm-prices-use-this-script.png” />