Many a time we might want to know details about certain operations performed on our Azure resources.
Once such case study would be to track how many virtual machines are being de-allocated by users, so we can make a decision on not to monitor them.
I have written a simple script that would make the tracking easy.
Download the script
This script will fetch information of certain Azure operation against Azure resources and create a CSV file. Specifically, this script will create a CSV file that contains a list of Azure operations that de-allocates an Azure virtual machine.
You may alter the IF condition statement to produce desired results.
Example, fetch operational logs for Azure Storage only. Or fetch operational logs for re-start VM or any operation on any Azure resource.
The CSV file will be saved in the same folder from where you run the script and will be saved as “Azure_activity_logs.csv”