开发者

Change Port permanently using WMI and powershell

Is there anyway to replicate the terminal services Change Port command permanently, currently when i use said command it has to be done each time i logon开发者_JAVA技巧, is there a way that this can be achieved permanently without stepping through MMC?

kind regards

stefan


If I am understanding right, I think this MS Support article is what you need.

How to change Terminal Server's listening port


I have half an answer; anyone with more clues is welcome to add to this. Also, this has only been tested on Windows 7.

There is a value "PortName" in "HKLM\SYSTEM\CurrentControlSet\Enum\<vendor-specific>\Device Parameters" that contains the port assignment. Change this to the desired COM port. A reboot may be required to make the assignment take, but once it takes, it'll stick.

Unfortunately, the "FriendlyName" value in "HKLM\SYSTEM\CurrentControlSet\Enum\<vendor-specific>" does not change when you do this, and (at least for my hardware on Win7) only SYSTEM has the rights to change that value, or to change the permissions on that key.

The other option, as mentioned above, is to add the relevant command to the Run section.

(EDIT: Sorry; didn't notice the "registry is a no-go" comment below.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜