What should you do?

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?We can use Windows PowerShell Direct to run PowerShell cmdlets on a virtual machine from the Hyper-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 VMNameInvoke-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 Receive-PSSession cmdlet with the -Name parameter will not work.References:https://msdn.microsoft.com/en-us/virtualization/hyperv_on_windows/about/whats_new

Question:

What should you do?

Options:

Run the winrm.exe command and specify the -s parameter.

Run the Powershell.exe command and specify the -Command parameter.

Run the Receive-PSSession cmdlet and specify the -Name parameter.

Run the Invoke-Command cmdlet and specify the -VMName parameter.

Correct Answer

The Correct Answer for this Question is

Run the Invoke-Command cmdlet and specify the -VMName parameter.

Leave a Comment