Logo faq-o-matic.net
Logo faq-o-matic.net

Get-VMResourceSummary: New Download Source is Here

von veröffentlicht am5. Januar 2021, 06:13 Uhr Kurzlink und Zitatlink einblenden
Kategorie Kategorie: Community, English, PowerShell, Scripting, Tools, Virtualisierung, Windows Server   Translate with Google Translate Translate EN   Die angezeigte Seite drucken

Some weeks ago, Microsoft have announced that they are going to shut down their TechNet Gallery very soon (that is: at the end of December, 2020). There is a small number of contributions that we have been involved with. Furtunately, the original license (MIT license) allows us to republish those contributions. So in the next days we are going to do this.

This contribution was first published in Microsoft’s TechNet Gallery. See the authors and copyright notices in the text below.

Hyper-V: Get RAM and vCPU assignments per VM and summed up


Hyper-V has a hard limit for the memory resources in the host server. You cannot assign more RAM to your running VMs than your host has as physical RAM.

The script Get-VMResourceSummary.ps1 lists all VMs on a host with their RAM and vCPU configurations. You get a list of each VM, its running state, static RAM assignment, maximum Dynamic Memory (if configured) and vCPU assignment.

Two summary tables inform you how much RAM and vCPUs your VMs need altogehter and how much of these core resources is assigned to the running VMs. That way you know quickly if your host’s resources allow for additional VMs or not.


The script does not use any parameters. Just launch it in a PowerShell window or in PowerShell ISE. Make sure to run PowerShell as an Administrator to get appropriate values.

The script queries the local computer by default. If you want to query a remote computer adjust the following line in the script code:

  • original: $Hostname = $env:COMPUTERNAME
  • change to: $Hostname = ‚MYSERVER‘

The script should run with Hyper-V in Windows Server 2012 and newer. It should as well run with client Hyper-V in Windows 8.1 or newer.


Download: Get-VMResourceSummary  Get-VMResourceSummary (1,9 KiB, 3.456-mal heruntergeladen, letzte Änderung am 22. Dezember 2020)

Author and Disclaimer

The script was written by Nils Kaczenski. It comes without any warranty or support. Use at your own risk. The project was initiated by the German IT service company Michael Wessel Informationstechnologie GmbH of Hannover.



Was <https://gallery.technet.microsoft.com/Hyper-V-Get-RAM-and-vCPU-4b29d2bb/description>

© 2005-2023 bei faq-o-matic.net. Alle Rechte an den Texten liegen bei deren Autorinnen und Autoren.

Jede Wiederveröffentlichung der Texte oder von Auszügen daraus - egal ob kommerziell oder nicht - bedarf der ausdrücklichen Genehmigung durch die jeweiligen Urheberinnen oder Urheber.

Das Impressum findet sich unter: http://www.faq-o-matic.net/impressum/

Danke, dass du faq-o-matic.net nutzt. Du hast ein einfaches Blog sehr glücklich gemacht!