This was posted in another post, and I copied it from there.
1. Download latest version of pshyperv
2. Right-click on downloaded file, select properties, and click the Unblock button.
3. Extract the contents of the zip into a directory. From elevated prompt, run install.cmd
4. Start PowerShell and ensure that you have execution policy set to RemoteSigned - Set-ExecutionPolicy RemoteSigned
5. Create a PowerShell profile on the system if you do not already have one.
6. $profile will give you the path of the profile.
7. Test-Path $profile will tell you if you have a profile already created.
8. If no profile, create one. New-Item -Path $profile -Type file -Force
9. Open profile: notepad $profile
10. Place this command in profile: Import-Module 'C:\Program Files\modules\HyperV'