I created multiple script to identify who started or stopped a Vm using the activity log but unable to get the results - the script just executes without an output
https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-group-audit
Get-AzureRmLog -StartTime 2018-10-01T10:30 -EndTime 2018-10-12T11:30
-ResourceId /subscriptions/S1sub/resourceGroups/SamRG/providers/microsoft.compute/test
-DetailedOutput -Maxrecord 100 -InformationAction stop
Get-AzureRmLog -ResourceGroup samitrg -StartTime 2018-10-01T10:30
-EndTime 2018-10-12T11:30 | Select-Object level,eventtimestamp,caller,ID,resourcegroupname,Authorization,scope |
Export-Csv -Path c:\abc.csv
Get-AzureRmLog -ResourceGroup samitrg -StartTime 2018-10-01T10:30
-EndTime 2018-10-12T11:30 | Where-Object OperationName -EQ Microsoft.compute/virtualmachines/deallocate/action