PowerShell Direct

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

See – https://msdn.microsoft.com/en-us/virtualization/hyperv_on_windows/user_guide/vmsession

This entry was posted in PowerShell v5, Windows 10, Windows Server 2016. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s