Единственное решение, которое я нашел, это использование AutoIt Scripting Language
DllCall("kernel32.dll", "boolean", "Wow64DisableWow64FsRedirection", "boolean", 1) Run('cmd',"",@SW_HIDE) Local $hWnd = WinWait("[CLASS:cmd]", "", 1) Sleep (250) ControlSend("C:\WINDOWS\SYSTEM32\cmd.exe","","","telnet 192.168.1.1 -f log.txt") Sleep (2500) ControlSend("Telnet 192.168.1.1","","","pass1") ControlSend("Telnet 192.168.1.1","","","sysinfo") Sleep (1500) WinClose("Telnet 192.168.1.1")