I am tearing my hair out at the moment trying to do this. Just a couple of things to clear up:
- I have Windows Hyper-V Server 2012 R2 freshly downloaded and Remote Administration enabled;
- I have a Windows 7 Professional machine – up to date etc. etc.
- I know you cannot manage Hyper-V 2012 R2 from Windows 7 using the GUI, that's why I want to use PowerShell;
- I've been using PowerShell for a while but all this remote connection stuff is very new;
So with that out of the way, let's go.
I've used Connect-PSSession to connect to the PowerShell session on the Hyper-V server. No problem. Remote commands don't work (get-vm for example), I'm assuming because I don't have them installed locally. I tried to do import-pssession (which is what I use when I'm managing Office 365 with PS remotely) and that works but doesn't give me any hyper-v cmdlets to use. I have tried to import-module hyper-v and it doesn't exist.
So I'm stuck. I've been Googling for about 2 hours now with no luck. Plenty of very old articles about how to connect to Server 2008 ort 2012 from Windows 8 but nothing on how to connect to it from Windows 7.
Any help?
Best Answer
Do this:
Your PowerShell prompt will change to indicate you're connected to the remote machine. Any powershell commands you run will be ran on the remote machine. Try it, you'll find Get-Vm now works.