I have been trying to find via the WMI management classes for Remote Desktop a way to set the port that Remote Desktop Listens on. I know I can change the port via the registry, however is it possible to set the listening port via WMI or must I edit the registry?
Share
Yes it can be done. Here’s the code, referencing this Microsoft link and this one. Replace 3389 with the new value you want to use: