I'm writing a REST API that encapsulates some common Windows management tasks, (DNS/DHCP management, terminal sessions, etc.). I don't want to use PowerShell Web Services, as I don't want OData in my API. I'm trying to figure out what's the most efficient way to execute remote management commands on the back end.
As far as I can tell, the options are:
WMI over RPC, using System.Management. There's also Microsoft.Management.Infrastructure, but it seems to be locked to Windows 8/2012 R2 and above, which doesn't work for me. Obviously this isn't the most firewall friendly, and is probably considered legacy by MS, but is probably the fastest protocol.
WMI over WSMAN, using an approach like How to access WinRM in C#. This is more in line with MS's current thinking from a protocol perspective, but XML parsing could be painful with more complex return sets.
PowerShell Remoting, this probably results in the most readable code (after the Powershell session is created), and you wind up with some sort of (generic) objects but this seems like the slowest method, because of the time it takes to spin up the PowerShell session.
Am I missing anything? Am I going a step backwards by using System.Management?