question

srinivas-2499 avatar image
0 Votes"
srinivas-2499 asked SureshMathanMINDTREELIMITED-3225 commented

Finding unused Resources and Resource groups in a Subscription

In One Subscription i have multiple resource groups in that different resources are there so i need to find the resources and groups which are not using from the last 3 months.

In that there are no tags are assigned, only based on the time we need to find out.

azure-monitor
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@srinivas-2499 Welcome to Microsoft Q & A Community Forum. Assuming that you have enabled activity logs destined to log analytics workspace with retention period of 90 days. You can write a kusto query to check if there are any administrative actions that are done on particular resource in the past three months.

Using Get-AzResource PowerShell Command let ,you can get the list of resources in your subscription and check with the logs against in Azure Activity. The list of resources which aren't part of AzureActivity logs can be considered as unused resources.

 AzureActivity
 | where TimeGenerated >= ago(90d)
 | project  _ResourceId


0 Votes 0 ·

@srinivas-2499 Did you get chance to check my previous comment? Kindly let me know if you have further questions.

0 Votes 0 ·

@srinivas-2499: We are also looking for an option to list the unused resources in an Azure subscription. Is the Kusto query option provided by @SwathiDhanwada-MSFT worked for you? or If you found any other option, can you please share it.

0 Votes 0 ·

0 Answers