ArtifactType | Language | Platform | Tags |
---|---|---|---|
Excel spreedcheet with the full Azure environment |
Powershell |
Windows / Linux / Mac |
Powershell, Azure, Inventory, Excel Report, Customer Engineer |
Modules | Count |
---|---|
Analytics | |
Compute | |
Containers | |
Data | |
Infrastructure | |
Integration | |
Networking | |
Storage |
Azure Resource inventory (ARI) is a powerful script written in powershell to generate an Excel report of any Azure Environment you have read access.
This project is intend to help Cloud Admins and anyone that might need an easy and fast way to build a full Excel Report of an Azure Environment.
The first big change in Azure Resource Inventory v2.2 is the Powershell modules. This means AzCLI is no longer use in the script.
This way the code runs smothly and better integrated with ARI modules.
Another change is the way the script runs through the modules. Instead of vertical align, the jobs now are organized horizontally. We expect this change to considerably increase the speed of the script in larger environments.
- The main resource index in the dashboard now shows the correct number of resources and is organized accordingly.
-
We disabled the Visio Diagram for now. But Draw.io diagram is still present, the two extra modules that creates a Microsoft Visio and a Draw.io Diagram1 of the Azure Network Environment are still present, but only the Draw.io will be genarated.
-
The diagram now creates the topology in environments where vWAN are used.
You must use the -Diagram parameter for it to be generated!
- For the Draw.io Diagram, the script will create a XML file inside the "C:\AzureResourceInventory" folder. On Draw.io you must go to File > Import from > Device... And import the XML file that was created by the script.
We added more native modules ( there is still the possibility to create your own modules )
Resource Provider | Resource Type |
---|---|
microsoft.advisor | Advisor |
microsoft.security | Security Center |
microsoft.compute | Virtual Machine |
microsoft.compute | Availability Set |
microsoft.compute | Virtual Machine Scale Set |
microsoft.compute | Managed Disk |
microsoft.storage | Storage Account |
microsoft.network | Virtual Network |
microsoft.network | Virtual Network Peerings |
microsoft.network | Virtual Network Gateway |
microsoft.network | Virtual WAN |
microsoft.network | Public IP Address |
microsoft.network | Load Balancer |
microsoft.network | Traffic Manager |
microsoft.network | Application Gateways |
microsoft.network | Frontdoor |
microsoft.network | Route Tables |
microsoft.network | Public DNS Zones |
microsoft.network | Private DNS Zones |
microsoft.network | Bastion Hosts |
microsoft.network | Azure Firewall |
microsoft.sqlvirtualmachine | SQL VM |
microsoft.sql | SQL Servers |
microsoft.sql | SQL Database |
microsoft.dbformysql | Azure Database for MySQL |
microsoft.dbforpostgresql | Azure Database for Postgre |
microsoft.cache | Azure Cache for Redis |
microsoft.documentdb | Cosmos DB |
microsoft.databricks | Databricks |
microsoft.kusto | Data Explorer |
microsoft.web | App Service Plan |
microsoft.web | App Services |
microsoft.automation | Automation Accounts and runbooks |
microsoft.eventhub | Event HUB |
microsoft.servicebus | Service BUS |
microsoft.operationalinsights | Log Analytics Workspaces |
microsoft.containerservice | Azure Kubernetes Service |
microsoft.redhatopenshift | Azure RedHat OpenShift |
microsoft.desktopvirtualization | Azure Virtual Desktop |
microsoft.containerinstance | Container Instances |
microsoft.keyvault | Key Vaults |
microsoft.recoveryservices | Recovery Services Vault |
microsoft.devices | IoT Hubs |
microsoft.apimanagement | API Management |
microsoft.streamanalytics | Streaming Analytics Jobs |
microsoft.hybridcompute | machines |
✔️ Quota Usage (-QuotaUsage)
✔️ Service Principal Authentication (-appid)
✔️ Scan Modules diretly in GitHub ARI Repository (-Online)
✔️ Code Review: reduce and simplify of code, Less Loopings, Bug fix, modularization
These instructions will get you a copy of the project up and running on your local machine or CloudShell.
Resource Provider | Results | VISIO Extension | Comments |
---|---|---|---|
Windows | Fully successfully tested | Supported | Best Results |
MAC | Fully successfully tested | Not Tested | |
Linux | Tested on Ubuntu Desktop | Not Supported | No Table auto-fit for columns |
CloudShell | Tested on Azure CloudShell | Not Supported | No Table auto-fit for columns |
Tool | Version |
---|---|
Windows | 10 21H1 |
Powershell | 5.1.19041.1237 |
ImportExcel | 7.1.3 |
Az.Accounts | 2.7.0 |
Az.ResourceGraph | 0.11.0 |
You can use Azure Resource Inventory in both in Cloudshell and Powershell Desktop.
What things you need to run the script
1. Install-Module ImportExcel
2. Install-Module Az.Accounts
3. Install-Module Az.ResourceGraph
By default Azure Resource Inventory will call to install the required Powershell modules but you must have administrator privileges during the script execution.
Special Thanks for Doug Finke, the Author of Powershell ImportExcel Module.
Very Important: Azure Resource Inventory will not upgrade the current version of the Powershell modules.
Important: If you're running the script inside Azure CloudShell the final Excel will not have Auto-fit columns and you will see warnings during the script execution (but the results of your inventory will not be changed :)
-
Its really simple to use Azure Resource Inventory, all that you need to do is to call this script in PowerShell.
-
Run "AzureResourceInventory.ps1". In Azure CloudShell you're already authenticated. In PowerShell Desktop you will be redirected to Azure sign-in page.
- If you have privileges in multiple tenants you can specify the desired one by using "-TenantID" parameter or Azure Resource will scan all your tenants ID and ask you to choose one.
-
After properly authenticated and with the TENANT selected, the Azure Resource Inventory will perform all the work of extracting and creating the inventory.
-
The duration will vary according to the number of subscriptions and resources. In our tests we managed to generate in 5 minutes the inventory of a Tenant with 15 subscriptions and about 12000 resources.
-
Azure ResourceInventory uses "C:\AzureResourceInventory" as default folder for PowerShell Desktop in Windows and "$HOME/AzureResourceInventory" for Azure CloudShell to save the final Excel file.
-
This file will have the name "AzureResourceInventory_Report_yyyy-MM-dd_HH_mm.xlsx" where "yyyy-MM-dd_HH_mm" are the date and time that this inventory was created.
We use SemVer for versioning. For the versions available, see the tags on this repository.
We also keep the CHANGELOG.md
file in repository to Document version changes and updates.
The main authors of this project are:
- Claudio Merola (claudio.merola@Microsoft.com).
- Renato Gregio (renato.gregio@Microsoft.com)
Please note that while being developed by Microsoft employees, Azure Inventory script's are not a Microsoft service or product. This is a personal driven project, there are no implicit or explicit obligations by any company or goverment related to this project, it is provided 'as is' with no warranties and legal no rights.
Please read our CONTRIBUTING.md which outlines all of our policies, procedures, and requirements for contributing to this project.
Footnotes
-
The script will create a XML file inside the "C:\AzureResourceInventory" folder. On Draw.io you must go to File > Import from > Device... And import the XML file that was created by the ARI script. ↩