Friday, March 16, 2018

Azure bits and pieces - CSV Dump of VMs and Private/Public IP's

Getting a list of Azure VM's and IP's


You would think this would be easier, and it's relatively easy from the GUI, but not if you have over 50 VM's or so.  As of today (March 2018) there is no option to export to CSV or the likes from the interface, so doing this through PowerShell is the solution.

Note, I had many issues with this Azure CloudShell (see pic) many commands simply don't work or are work as expected in Cloud shell, however on my Mac with PS installed they work fine.



Attached is a script I use to get any stats on VM's I need, see screenshot below.



You can download this script here as well