Failed to install PowerShell management Library for Hyper-V at Hyper-V Server 2008 R2

Dec 27, 2009 at 5:46 AM

I ran Install.cmd through Remote Desktop Connection at Hyper-V Server 2008 R2.

After the copying the files at HyperV_Install, the registry file, PS_Console.REG, was failed  to run with the following 2 errors:

Registry Editor
Cannot import C:\HyerV\install.cmd: The specified file is not a registry script.
You can only import binary registry files from within the registry editor.

Registry Editor
Cannot import \..\PS_Console.REG: Error opening the file.  There may be a disk or file system error.

Then, I closed the PowerShell Configurator and the installation script and I ran this registry file for importing.  It showed success.

Finally, I could run VM from this PowerShell window.  However, whenever I quit and launch PowerShell again, I need to type 'import-module hyperv.psd1', in order to run VM.

Please advise what I have missed.  Thanks!

Coordinator
Jan 8, 2010 at 6:03 PM

I've found the CMD needs to be run in a command prompt double clicking it sometimes causes this error and I'm still not sure why, but it is on my to-do list.

You can omit the extension but you always need to import the module. Your can put the command to do it in your profile (see $profile for the path) so it happens automatically .