Q. How can I find the process ID for a worker process with Windows Server 2012 R2 Hyper-V and above?
A. To find the process ID for a worker process for Windows Server 2012 R2 and above Hyper-V use the PowerShell below. Note the change from previous versions is the v2 virtualization namespace is used instead of the v1. Note this must run in an elevated PowerShell session or no output will be returned. Replace <VM name> with the actual name of the VM (and don't type the angle brackets).
(Get-WmiObject -q "SELECT * FROM Msvm_ComputerSystem WHERE ElementName = '<VM name>'" -n root\virtualization\v2).ProcessID