Tested working on Fedora Workstation 39, 40, 41, 42, and 43.
(Commands prefixed with a # should be run as the root user or with sudo. Commands prefixed with a $ should be run as a regular/unprivileged user.)
# dnf install xrdp(with Xorg session support:# dnf install xrdp xorgxrdp)- If using GNOME:
# $EDITOR /etc/pam.d/xrdp-sesmanand comment and uncomment the appropriate lines. - If using Xfce:
$ echo startxfce4 > $HOME/.xsessionand$ chmod +x $HOME/.xsession. - Optionally, rename the shared drives mount:
# $EDITOR /etc/xrdp/sesman.iniand setFuseMountName=shared-drives # $EDITOR /etc/xrdp/xrdp.iniand set:port=vsock://-1:3389([Globals]section)vmconnect=true(uncomment)security_layer=rdpbitmap_compression=false- If you chose to install the
xorgxrdppackage: uncomment the whole[Xorg]section.
$ systemctl enable xrdp xrdp-sesman- Shut down the virtual machine (do NOT reboot) and close the Virtual Machine Connection window.
- On your host, in PowerShell (as admin or as a user in the "Hyper-V Administrators" group):
Set-VM -VMName "Name of your Fedora VM" -EnhancedSessionTransportType HvSocket - Connect to your VM by reopening the Virtual Machine Connection window, and boot it.
You can now enable Enhanced Session Mode.

I had no luck with this and any other guides to setup Hyper-V ESM. I've got the XRDP login screen in ESM, but the login didn't work, always closed the session. Even turning off SELinux and adding firewall exceptions didn't helped.
My solution is just to use the built-in Gnome RDP and start on the Windows host a regular
mstscsession, so not the built-in one in the Hyper-V window.The perk with this method that you getting remote Wayland session, instead of X11.
Ps.: Audio works out of the box, too!