As with any managed services or infrastructure services projects, maintaining the server inventory is very crucial. The server-inventory-file provides a one-stop checklist, that you can refer while you are on priority 1 bridge calls.
With traditional data center, it is easy to maintain server/infra inventory in an excel sheet. But it is not the same with cloud, because the infrastructure is so dynamic.
The only solution to this problem is Automation. I have written a powershell script just to do that.
Below is the flow
- Prompt user for Azure login credentials.
- Prompt user to select subscription.
- Pull inventory information for Azure VMs, Storage, VNet, NSG, External LB.
- Populate the data in an excel sheet.
- Prompt user if they want to view the sheet.
**Note: This script expects that you are using Powershell v5.0 and you have the excel modules installed. Basically you should have the MSOffice software installed.
Below is the link for the script: