Tip: Find your Hyper-V Configuration File with PowerShell

Tip: Find your Hyper-V Configuration File with PowerShell

See how you can use PowerShell to find your Hyper-V configuration files

The Hyper-V Manager enables you to manage most aspects of Hyper-V VMs. However, one of the things that is not directly visible from the Hyper-V manager is the location of the Hyper-V configuration file. For Windows Server 2008, 2008 R2 and 2012 the Hyper-V configuration file is an xml file that has a rather unfriendly GUID name. You can see the default virtual machine location looking at the Hyper-V Settings and if you open the Hyper-V settings for the virtual machine you can see where the Checkpoints and Smart Paging files are stored but it’s quite possible that the configuration file may have been created somewhere else or moved to a different location. If you’re working on an unfamiliar host of a host where there has been no standardized placement of the VM assets you might find yourself wanting to know where your Hyper-V configuration files are located.  Fortunately, you can use the PowerShell Get-VM cmdlet to retrieve the location and name of your Hyper-V configuration files like you can see below.

$VM = Get-VM “MyVM”
Write-Host $VM.ConfigurationLocation
Write-Host $VM.VMId

 

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish