May 14 2020
07:38 AM
- last edited on
Apr 08 2022
10:26 AM
by
TechCommunityAP
May 14 2020
07:38 AM
- last edited on
Apr 08 2022
10:26 AM
by
TechCommunityAP
My colleague used the below powershell query to retrieve log data for past 4 days excluding today which matches operations of the resources and collects features such as EventTimeStamp, Caller, SubscriptionId etc.
Get-AzureRmLog -StartTime (Get-Date).AddDays(-4) -EndTime (Get-Date).AddDays(-1) | Where-Object {$_.OperationName.LocalizedValue -match "Start|Stop|Restart|Create|Update|Delete"} |
Select-Object EventTimeStamp, Caller, SubscriptionId, @{name="Operation"; Expression = {$_.operationname.LocalizedValue}},
May 14 2020 09:38 AM
Hello and welcome @shmoolya
There is a dedicated PowerShell group, that maybe a better place to ask and get help from https://techcommunity.microsoft.com/t5/powershell/ct-p/WindowsPowerShell
Thanks
May 14 2020 10:35 AM