Skip to content

Pyrolaptop

  • Home
  • Projects
    • Holiday & Trip Videos
    • Revision For A-Level Computing F453
    • SYS Domain
      • Web Mgmt and Tools
  • Knowledge Base
    • KB-Office 365
    • KB-Powershell/CMD
    • KB-Software
    • KB – Windows Server
    • KB-HyperV
    • KB-Remote Desktop
    • KB- Group Policy
  • Reviews
    • Hardware
    • Software
  • Channel

Hyper-V get VM VHD locations

July 6, 2019 By Matt Comment Closed

Run Powershell as admin

 

get-vm * | select Name,@{L=”Disks”;E={$_.harddrives.path}} | Export-Csv c:\temp\vmdisklocations.csv

 

 

Creates CSV which looks like the below

Name Disks
WACLS1-VM S:\VM\WACLS1-vm.vhdx H:\VMs HDD\WACLS1-VM\WACLS1-backupdisk.vhdx H:\VMs HDD\WACLS1-VM\WACLS!-VMM-Lib.vhdx
KB - Server, KB - Windows Server, KB-HyperV, KB-Powershell/CMD, Knowledge Base
WordPress Theme | Square by HashThemes