Hyper-V backup fails with error 'Hyper-V PowerShell Module is not installed'

SUMMARY

How to fix a Hyper-V backup that fails with the error: Hyper-V PowerShell Module is not installed.

ISSUE

Hyper-V backup fails because Powershell is not properly installed on a Hyper-V 2008 R2 server. 

    RESOLUTION

    Configure Windows PowerShell on Hyper-V 2008 R2 server. (For Windows 2008 R2, this procedure requires that the Hyper-V role is enabled.) After completing this procedure, the system will be ready for Hyper-V scripting.

     

    1. Install Windows PowerShell on the Hyper-V Windows 2008 R2 server. You can do this from the Server Manager or by using the ServerManagerCmd.exe command-line tool:

      ServerManagerCmd.exe –install PowerShell
       
    2. Configure Windows PowerShell to allow the use of scripts. This is disabled by default. To configure this, issue this command from PowerShell:

      Set-ExecutionPolicy RemoteSigned
     

    Third-Party Sources

    Additional documentation is available on CodePlex at http://pshyperv.codeplex.com/

     

    • Download and install the Windows PowerShell Hyper-V module from http://pshyperv.codeplex.com/releases. You need this module to access all the cmdlets designed specifically for Windows PowerShell on Hyper-V 2008 R2.

      From the CodePlex PowerShell Management Library for Hyper-V page, download the latest stable, non-development release. Make sure the “block” attribute is removed from the zipped files before you install them. This will execute setup scripts without needing digital signatures.

      If you’re doing the install on Server Core or doing a manual install, unblock and unzip the module file into some temp directory or on another computer before copying the setup files to the Hyper-V server.
    • Issue this command to install the module you downloaded:

      copy *.* %ProgramFiles%\modules\HyperV
       
    • From an elevated Windows PowerShell command prompt (run as administrator) on the Hyper-V server, add the Import-Module to the Windows PowerShell profile file using this command:

      Set-ExecutionPolicy RemoteSigned

      If you get an error message, verify that you didn’t miss Step 1, installing Windows PowerShell.
    • Import the module using this command:

      Import-Module %ProgramFiles%\modules\hyperV

      This will let you use the cmdlets without having to configure the server each time.
    • Verify you’ve successfully installed the cmdlets and that they are functioning properly by issuing the Get-Command cmdlet to see a list of the commands available to you:

      Get-Command –Module Hyperv

      As with other modules, each cmdlet comes with helpful information about its functions and examples on how to use it:

      Get-Help New-VM –Detailed

      Get-Help New-VM –Examples

    CAUSE

    The backup fails due to a missing PowerShell Management Library for Hyper-V from http://pshyperv.codeplex.com/releases.

    NOTES

    For more detailed information on backup failures and performance issues see Unitrends KB 5062 - Backup Failures and Performance Issues

    Was this article helpful?
    0 out of 0 found this helpful
    Have more questions? Contact us