我创建了多个脚本来识别谁使用活动日志启动或停止了虚拟机,但无法获得结果 - 脚本只是在没有输出的情况下执行
https://docs.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