如何通过串行控制台电缆从PowerShell连接到Cisco交换机?

我实际上并不需要在交换机上执行任何操作。 我只需要validation它在那里。

我有一些远程服务器,我需要validation蓝色串行控制台电缆正确连接。 而不是RDC到他们每个人和复制/configuration腻子只是打了几次,我想使用“enter-pssession”远程连接到PowerShell和访问COM1的方式。

我试过使用这个,但没有得到控制台的反馈。

https://blogs.msdn.microsoft.com/powershell/2006/08/31/writing-and-reading-info-from-serial-ports/

谢谢!

弄清楚了。 在这个前面敲入enter-pssession -computername XXXXXXX来远程连接到一个系统来检查。

 $com = New-Object System.IO.Ports.SerialPort(“COM1”) $com.open() $com.write([char]13) $com.ReadExisting()