What is PowerShell Direct?

A quick explanation of what PowerShell Direct is and how you can use it.

What is PowerShell Direct?

PowerShell Direct is a feature that was rolled out with Windows 2016 and Windows 10 that enables you to interact with a virtual machine (VM) that you have running inside Hyper-V even if that VM isn't connected to the network.

It's a great time saver as you can issue commands and carry out tasks without having to log into the VM.

As I mentioned you don't have to have the virtual machine connected to a network in order to interact with it, ask log as you have guest credentials for the VM you can run the commands against it. So this is not a mechanism you can use to bypass the VM's security, only those that have the credentials can log in. Think of this as a great way of trying to troubleshoot a VM if there is a network connection error or misconfiguration.

Some of the PowerShell Direct commands are slightly different than the ones you might be familiar with if you are using to PowerShell remoting.

My colleague Thomas has written a blog post that gives some great examples of some of the commands that you can use to manage your VMs, which can be found here.