Sometimes if you want to find a data from the Azure resource JSON template file, for example, if it is virtual machine, you need to click for it one by one and then do some searching to find a specific value like the following example:

You finally find your target value in the export template JSON file, if you want to check which resource include your target specific value, you will in the trouble, because you need to click for each resource to search, think about you have thousand or million Azure resource?

Therefore, this post will guide you how to get Match Azure Resource from JSON File and Export it to CSV File by using our custom PowerShell script.

The steps for the whole process will be:

  1. Login Target Azure Tenant by using PowerShell
  2. Run the Custom Script

Step 1 – Login Target Azure Tenant by using PowerShell

Step 2 – Run the Custom Script

For example, if you want to get the VM list that specify their JSON file include value “grpazusoevmaimg” or ‘”BusinessUnit”: “test”‘, you can take the below example:

For Getting Resource Data part:

For Export to CSV part:

You can visit our SOS GitHub for downloading the source code as a template:https://github.com/SOSHKMVP/AzurePowerShell/blob/main/Get%20JSON%20resource%20and%20export%20to%20CSV/Get_Match_JSON_Data.ps1

App Modernization with AKS – Part 1, ACR

What is AKS(Azure Kubernetes Service)? You can deploy a coud-native kubernetes clusters by leveraging the advantage of Azure security, identit, cost effective and migration services. By using AKS, we could migration our on-premises application with…

Data Migration in App Modernization

In this session, we will look around one of the most important part in Applicaiton mode - Data Migration. In Azure, you have serial choices for migration your data from on-premises to Azure cloud: Azure…

Creating your NFT with Azure – Part 1

In this series, we will be creating our own NFT step-by-step by using Azure cloud native services and Blockchain-as-a-Service (BaaS). Here are some steps we need to go through: Learn more about NFT and Blockchain…

SOS Group Limited © 2022. All Rights Reserved.