MikroTik Hyper-V Serial Console
I do a lot of work with virtual MikroTik routers, mostly in Microsoft Hyper-V. The CHR is great for labbing-out solutions and developing configuration templates for clients. Unfortunately copy-and-paste operations aren't really possible through the built-in Hyper-V console. Winbox is another solution, but much of what I do happens at the command line. The cleanest solution I've come up with is using the built-in serial device functionality with named pipes for the VMs. PuTTY provides a handy serial interface for accessing the virtual device.
First we'll add a serial device to the CHR's VM configuration. Then we'll use it to create a named pipe. Finally, we'll use PuTTY to access the serial console.
Adding a serial port to the CHR gives us the "hardware" that we need, even though it's virtual. In Hyper-V right-click the CHR VM. Then select Settings and COM1 to the left. Note how no device was included by default in the configuration:
Select the Named Pipe option and enter a name:
Remember the full name, beginning with .\pipe\ and ending with the chosen name.
Launch PuTTY with administrative privileges, otherwise the named pipe can't be accessed in Windows. Select the Serial option, then use the named pipe string:
Click Open, then click inside the PuTTY window and press [Enter]. The RouterOS login prompt should appear. If the router is rebooted we can quickly restart the serial session by right-clicking the title bar: