title: Importing an exported VM in the same Hyper-V server
body: <p>Using Hyper-V manager (connected to a 2012 R2 core Hyper-V server) I can export a VM and then import that exported VM with a new ID (and rename it afterwards).</p>
  
  <p>I am trying to achieve the same via powershell but this seems not possible or I am overlooking something.</p>
  
  <p>So I have an export and want that export be imported (and registered in place).</p>
  
  <p>Export:</p>
  
  <pre><code>Export-VM -ComputerName $someserver -Name $somevm -Path $exportpath
  </code></pre>
  
  <p>Import:</p>
  
  <pre><code>Import-VM -ComputerName $someserver -GenerateNewId -Register -Path $pathtoexportedvm_xmlfile
  </code></pre>
  
  <p>I cannot get this to work. I get vague error messages like:</p>
  
  <pre><code>Parameter set cannot be resolved using the specified named parameters.
  </code></pre>
  
  <p>I tried to do -Copy instead of -Register which resulted in this error:</p>
  
  <pre><code>Import-VM : Not found
  </code></pre>
  
  <p>I also tried to leave out -Register but that did not work either.</p>
  
  <p>In the Hyper-V Manager I can point to the folder of the export and select 'generate new id' and then the export is imported. How can I do the same via powershell?</p>
  
  <p>Regards, Rob</p>