There's a basic shell program (which supports CMD-like commands, though it isn't actually running CMD) available on XDA-Devs here. It's an old version (1.5 years) and I should bug the dev about updating it, but it provides some ability to browse the file system and registry. You have to connect to it using a Telnet-like protocol (PuTTY works).
It can run EXEs, though they'll only have the same permissions as the app itself (not much, unless you elevate it by hijacking a more-privileged chamber or launching it as a Windows Service using a rooting hack, such as WP Internals). You can get a number of EXEs that will run (unmodified) on WP8.x/W10M by extracting them from the UpdateOS.wim file on the phone. Notably, this includes CMD.EXE (the real deal, make sure you also grab its .MUI file from the appropriate region directory like en-us), TELNETD.EXE (a basic Telnet server, syntax is telnetd <program> [port]
so you could use telnetd cmd.exe
or telnetd cmd.exe 22222
), and FTPD.EXE (a basic file transfer protocol server, you can optionally specify a folder to root the FTP access in). I've seen copies of other real Microsoft EXEs, like REG.EXE, NETSH.EXE, BCDEDIT.EXE, SC.EXE, etc. but I do not now remember where I found them and they aren't on my current PC (and they mostly require elevated privileges to be of any use, anyhow).
Note that this isn't going to actually root the phone in any way by itself, it's just another way to access the data on it (including some data not normally visible). Another way to do this is to use an app such as the Native Access Web Server, which gives (partial, and mostly read-only) access to the file system and registry via a web browser.
Note that none of these tools I've linked have any authentication or encryption; don't use them on untrusted networks unless you want to risk total strangers connecting to your phone. You will have to use WiFi; cellular blocks incoming connections and loopback is blocked by the OS security model.