PrepAway - Latest Free Exam Questions & Answers

You have a Windows 10 Enterprise computer named Computer1 that has the Hyper-V feature installed. Computer1 ho

You have a Windows 10 Enterprise computer named Computer1 that has the Hyper-V feature installed. Computer1 hosts a virtual ma

chine 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

parame

ter.

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 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 netw

ork 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 creat

e a PowerShell Direct session, use one of the following commands:

Enter-PSSession -VMName VMName

Invoke-Command -VMName VMName-ScriptBlock {commands}

References:


Leave a Reply