locked
Get size of virtual machine in Hyper-V using powershell or vbscript RRS feed

  • Question

  • I am trying find total size of a virtual machine in Hyper-V (Windows Server 2008) with all its files. That must include all snapshots, everyhing that is associated with virtual machine.

    I have written script that lists .VHD, .AVHD and .ISO files for each virtual machine and finds their size using GetVirtualHardDiskInfo method of Msvm_ImageManagementService class.

    But I cant find which Msvm class represents information about saved state files .VSV and .BIN.

    Any help appreciated.

    Friday, October 22, 2010 11:52 AM

Answers

  •  

    Hyper-V schema definition file can be found on your Hyper-V host machine at: %windir%\system32\WindowsVirtualization.mof.

    Property value types are CIM typed. See the following link for a complete list of CIM types.

    http://msdn.microsoft.com/en-us/library/aa386309(VS.85).aspx

     


    If this post is helpful, please mark it as such
    ________________________________________
    Alessandro Cardoso
    MVP | Microsoft Heroes | MCT
    blog: http://virtualisationandmanagement.wordpress.com
    http://virtualizacaoegerenciamento.wordpress.com
    • Marked as answer by Vincent Hu Tuesday, October 26, 2010 6:04 AM
    Monday, October 25, 2010 3:10 AM