Create and exit a PowerShell Direct session using PSSession cmdlets On the Hyper-V host, open Windows PowerShell as Administrator. Use the Enter-PSSession cmdlet to connect to the virtual machine. ... Type your credentials for the virtual machine. Run whatever commands you need to. More items... Jul 29, 2021