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

2 Min. Read

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 know the disk footprint used on your storage, and 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), the 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 Gallery GitHub here.

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

__
Thank you for reading our blog.

Please let us know in the comments section below if you have any questions or feedback.

-Charbel Nemnom-

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

Next

Let us know what you think, or ask a question...