Get The List of All VMs in #HyperV Cluster and Their Virtual Hard Disks #PowerShell

2 min read

A while ago, I published a PowerShell script that will query System Center Virtual Machine Manager (SCVMM) to get all Virtual Machines including their Virtual Hard Disks, then it will calculate the size and percentage used for each VHD(X), and finally send you a nicely formatted HTML report. You can read all about it here.

In this quick blog post, I will share with you how to get the same report in comma-separated value (CSV) format and without SCVMM. This comes in handy when working with a large Hyper-V cluster with many VMs, and you want to know the type of each virtual hard disk attached to every VM including their footprint size on disk, and the remaining disk space so you know before the VM runs out of disk space.

Here is a function that will do the job for you.

And here is the final report in CSV:

This is version 1.0, do you want additional features? Please feel free to leave a comment below.

Enjoy 🙂

Thank you for reading my blog.

If you have any questions or feedback, please leave a comment.

-Charbel Nemnom-

About Charbel Nemnom 440 Articles
Charbel Nemnom is a Cloud Solutions Architect and Microsoft Most Valuable Professional (MVP), totally fan of the latest's IT platform solutions, accomplished hands-on technical professional with over 17 years of broad IT Infrastructure experience serving on and guiding technical teams to optimize performance of mission-critical enterprise systems. Excellent communicator adept at identifying business needs and bridging the gap between functional groups and technology to foster targeted and innovative IT project development. Well respected by peers through demonstrating passion for technology and performance improvement. Extensive practical knowledge of complex systems builds, network design and virtualization.

Be the first to comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.