PowerShell Direct is a PowerShell 5.1 feature available in Windows 2016 TP5 and above and the later builds of Windows 10.
It adds 3 parameters:
To these cmdlets
but NOT New-Cimsession
The VMId & ID parameters access a GUID. VMname is probably easiest to use
VMName : W16TP5SC01
VMId : 2fad20ad-5a34-4a55-a7ec-2ec208ec4f0c
The –VMGuid parameter presumably uses the Id property on the VM which matches the GUID in VMId
The great thing about it is that enables you to work remotely with virtual machines – across the VM bus. It therefore bypasses a lot of the problems for remoting to non-domain joined machines. As long as they’re VMs on Hyper-V you’re golden.
I’ve just started experimenting with it but if you’re not using DSC it saves a lot of effort with trusted hosts or certificates when setting up machines.
Once you have a remote session established you can also copy files across it.
You need to run this from the Hyper-V host and you also need the credentials for the remote machine