You can always use the Azure portal to export all your resources to one CSV file (Use the “All resources” blade and then click “Export to CSV”).
Script for exporting your inventory
Or you can use this script to export your Azure inventory. It builds different CSV files for each subscription with resources.
After downloading open your favorite PowerShell and type
Marketplace resources vs. CSP contracts
It also creates a CSV file thats contains only your marketplace items. This is most useful if you change your Azure contract model.
For example you switch from your EA/SCE or Pay-As-You-Go to a CSP contract then some of the marketplace resources aren’t available yet in CSP.
So you can send your CSP provider this files to give them an overview about your Azure environment and then discuss with them if all your resources will be available.
or view the repository on GitHub:
I’ve tested this with:
- PowerShell 5.1
- PowerShell 6.0 Core
- Azure Az Module Version 3.3.0
Don’t hesitate to contact me if you have questions or ideas for this script.