环境说明
| IP | HOSTNAME | NOTE |
|---|---|---|
| 10.10.10.88 | win10_dqy | 实验主机 |
powershell脚本内容如下:
- 通过 powershell 监听本地9999端口
$host_ip = "127.0.0.1";
$port = 9999;
$Listener = [System.Net.Sockets.TcpListener]$port;
$Listener.Start();
$result = netstat -ano -p tcp | findStr $port | Out-String;
查看是否监听成功
- powershell命令查看
netstat -ano -p tcp | findStr 9999
