New PowerShell VM Inventory Script for SCVMM 2012 SP1/R2

about 1 1/2 years ago I made a script for Inventory Reporting in SCVMM 2012 and now I have been working on an update that supports VMM 2012 Sp1 and R2, there have been some changes in the cmdlets so now it was time to refresh it and add some information.

In VMM 2012 R2 the possibility to get the IP address has been added so I utilize that from VMM, if you are using the SP1 version I can get the IP address from the Hyper-V PowerShell module and the cmdlet Get-VMNetworkadapter, that works only on Hyper-V 2012 Hosts and the Integration components have to be updated. The function reports the number of NIC´s and VHD´s but not show all, I have chosen to just add one virtual NIC and three virtual hard disks in this, that can be altered if you want and just add in the hash table.

In this new function I have added a switch parameter that lets you select if you want a html/csv report or just work with the objects that comes out of it when running 🙂

To use it you can just use one of several ways with parameters

Screen Shot 2013-09-29 at 22.38.05


And here is the script function

And here is an example of the csv report, and yes it is much info, the CSV can be scrolled quite a bit 🙂

Screen Shot 2013-09-29 at 22.27.45

You can select what you want included in the report by just using the function and pipe it to Export-CSV