In Windows 11 24H2+ and Windows Server 2025+ you can use new net.exe command line arguments to Configure alternative SMB ports: TCP, QUIC, RDMA:
- /TCPPORT <port>
- /QUICPORT <port>
- /RDMAPORT <port>
I am not the first one to point it out — see this article.