It took my a while to find this procedure, so I figure I'll document it here for whoever needs it.
The problem: You are running a virtual machine on Hyper-V on a Windows host and would like to have the guest access a physical com-port (e.g. rs232). Hyper-V does not allow you to pass-through hardware easily, but it does allow you to define a com-port on the guest, which translates to a named pipe.
The solution: A small tool called COMpipe ( https://github.com/tdhoward/COMpipe ), allows you to forward a named pipe to a physical comport.
It suffices to create the virtual comport on the guest, which creates a named pipe. After that, you can launch COMpipe to set the forward, the comport will be available in the guest operating system as any normal comport. I've managed to use this solution to give a NodeRED installed on the VM access to a physical comport. Communication is bidirectional.
As always, you can only have a single connection to the comport, if you need more freedom with this, there is the com0com project ( https://com0com.sourceforge.net/ ), which has various tools for creating and connecting virtual COMports (including multiplexing).
Hope this helps someone,
Jörg