Environment
| IP | HOSTNAME | NOTE |
|---|---|---|
| 10.10.10.88 | win10_dqy | Lab host |
The PowerShell script is as follows:
- Listen on local port 9999 through PowerShell.
$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;
Check whether the listener started successfully
- Check with a PowerShell command.
netstat -ano -p tcp | findStr 9999
