Unless you want to get into the digital signing of PowerShell scripts you can disable PowerShell security temporarily by doing: Change directory into the directory with the Hyper-V PowerShell Library scripts.
Extract these to a simple directory you can get to easily at the command line, like C:\temp or make a directory like C:\powershell.
To download and install it, go to the Powershell management library website above and get the Hyperv.zip file. James O’Neill is the developer of the Powershell management library for Hyper-V and his library is invaluable when it comes to administering Hyper-V from the command line. Downloading and Installing the Hyper-V Powershell Library Now when you go to Start - All Programs, you should see Windows Powershell and you can click on Windows Powershell underneath that.įigure 2: Starting Powershell’s command line toolĪt this point, you should have the distinctive Windows Powershell dark blue command line window up, like this:īefore you actually move on to running commands, there is something else that you really want to get – the Hyper-V Powershell Library. When done, you should see Installation Succeeded and you can click Close. Now, click Install to actually install it. Check the Windows Powershell box and click Next.įigure 1:Installing the Windows Powershell Feature To install Powershell in Windows 2008, go to Server Manager, then to Features. In my case, I just installed it on the server as that is where I will be demonstrating the Hyper-V Powershell commands. You can install it both on your Hyper-V server (to start testing on the local machine) and on your local PC (so that you can run Powershell commands to the server remotely). In order to manage Hyper-V from the command line, you will need Powershell.
In this article, I will show you how to use Powershell to manage and configure Microsoft Hyper-V. Or many times you have to use command line tools to manage Hyper-V if you want to trigger some action through a script. However, many times you can do things more quickly if you have the right command line script ready to go. Using GUI interfaces like the Hyper-V Manager or System Center Virtual Machine Manager (SCVMM) makes managing Hyper-V quick and easy.