You just need to create a External Tools following the steps:
- Create an External Tool configuration in "External Tools..." then "New Configuration"
- In the "main" tab
- "Location": C:\WINDOWS\system32\cmd.exe
- "Arguments": /c tnameserv -ORBInitialPort 1050
- Go to "Common" tab check the "Allocate Console"
- Click run button