question

GoudKanthiAniketh-4694 avatar image
0 Votes"
GoudKanthiAniketh-4694 asked prmanhas-MSFT commented

Azure VM Powershell Comands

Hi,

I'm new to powershell. Can anyone help me to retrive the Azure VM metrics (CPU Utlization, RAM Utilization, Logical diskspace used) using powershell for a time period of one month.


windows-server-powershellazure-virtual-machines
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered prmanhas-MSFT commented

Hello Aniketh,

Depending on what you want to achieve it might have different versions, but I think all that you need is here, using the Get-AzMetric cmdlet:

https://docs.microsoft.com/en-us/powershell/module/az.monitor/get-azmetric?view=azps-6.3.0

Hope this helps you!

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,

When im trying to use the provided cmdlet along with my resourceId. Im able to see the name of the metrics but not the values.

0 Votes 0 ·
prmanhas-MSFT avatar image prmanhas-MSFT GoudKanthiAniketh-4694 ·

@GoudKanthiAniketh-4694 Apologies for the delay in response. Can you help me understand what is the current permission you have on the subscription or resource group or VM which you are trying to retrieve information for?

Thanks

0 Votes 0 ·
prmanhas-MSFT avatar image prmanhas-MSFT GoudKanthiAniketh-4694 ·

@GoudKanthiAniketh-4694 Can you please provide the information as per the ask so we can help you better.

Thanks

0 Votes 0 ·