get azurem vm powerstate history

Hi Guys,

 

is there a way I can add date range to the below command, so that I can get the history of powerstate ?

$VMstate = Get-AzureRmVM -ResourceGroupName $ResourceGroupName -Name $VMName -Status

Hi Soma - As far as I know, there is no straightforward CmdLet to get the VM PowerState history, you need to enable the monitoring using Azure Monitor. Thank you.