Updated: Get The List of All VMs in Virtual Machine Manager and Their Virtual Disks #SCVMM #HyperV #PowerShell

| , ,

Published on | Updated on December 28, 2020

1 Min. Read

Contents of this Article

Introduction

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 email report. You can read about it here.

Updated: Get The List of All VMs in Virtual Machine Manager and Their Virtual Disks #SCVMM #HyperV #PowerShell 1
Recently I was working on a project and I had a requirement to know the actual disk size used for each VM and the total disk space used for all Virtual Machines.

Here is the updated output report.

Updated: Get The List of All VMs in Virtual Machine Manager and Their Virtual Disks #SCVMM #HyperV #PowerShell 2

As you can see in the report above, I have added the total disk space used for each VM, and the total disk space used for all virtual machines. This will help you to know the disk foot print used on your storage, then you can take the necessary action.

How to use this tool

.EXAMPLE
./Get-SCVMVirtualDisk -VMMServerName <VMMServerName>
This example will get all Virtual Machines including their Virtual Disks from VMM <VMMServerName>,
Then calculate the size and percentage used by each VM/VHD(X), total disk size of all VMs and send the report via e-mail.

.EXAMPLE
./Get-SCVMVirtualDisk -VMMServerName <VMMServerName> -HostGroupName <HostGroupName>
This example will get all Virtual Machines including their Virtual Disks from a particular VMM Host Group <HostGroupName>,
Then calculate the size and percentage used by each VM/VHD(X), total disk size of all VMs and send the report via e-mail.
#>

Updated: Get The List of All VMs in Virtual Machine Manager and Their Virtual Disks #SCVMM #HyperV #PowerShell 3

You can download the updated copy of this tool from TechNet here.

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

Thank You!

Cheers,
[email protected]

Previous

Vembu BDR Suite v3.9.0 is now GA #Vembu #BDR #HyperV @vembutech

The First System Center Semi-Annual Channel (SAC), Version 1801 Release Now Available

Next

Leave a comment below...

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

Subscribe to Charbel Nemnom’s Blog

Get the latest posts delivered right to your inbox

The content of this website is copyrighted... please contact the author first. Thank you for visiting!