You have a Windows 10 Enterprise computer named Computer1 that has the Hyper-V feature
installed. Computer1 hosts a virtual machine named VM1. VM1 runs Windows 10 Enterprise. VM1
connects to a private virtual network switch. From Computer1, you need to remotely execute
Windows PowerShell cmdlets on VM1. What should you do?
A.
Run the winrm.exe command and specify the -s parameter.
B.
Run the Powershell.exe command and specify the -Command parameter.
C.
Run the Receive-PSSession cmdlet and specify the -Name parameter.
D.
Run the Invoke-Command cmdlet and specify the -VMName parameter.
Explanation:
We can use Windows PowerShell Direct to run PowerShell cmdlets on a virtual machine from theHyper-V host. Because Windows PowerShell Direct runs between the host and virtual machine,
there is no need for a network connection or to enable remote management. There are no network
or firewall requirements or special configuration. It works regardless of your remote management
configuration. To use it, you must run Windows 10 or Windows Server Technical Preview on the
host and the virtual machine guest operating system. To create a PowerShell Direct session, use
one of the following commands:
Enter-PSSession -VMName VMName
Invoke-Command -VMName VMName -ScriptBlock { commands }
Incorrect Answers:
A: WinRM is Windows Remote Management. This is not required when using Windows PowerShell
Direct.
B: Running PowerShell.exe with a PowerShell cmdlet will execute the PowerShell cmdlet on the
local machine. It will not remotely execute the PowerShell cmdlet on the VM.
C: You could run the Enter-PSSession cmdlet with the -VMName parameter but the ReceivePSSession cmdlet with the 璑ame parameter will not work.
https://msdn.microsoft.com/en-us/virtualization/hyperv_on_windows/about/whats_new