For a quick and dirty solution, you can use PowerShell to generate random tcp ports. Here’s a one-liner:
```powershell
Get-Random -Minimum 1024 -Maximum 65535
```
It won’t check if the port is in use, but it’s a start. You can combine it with a port scanner for better results.
```powershell
Get-Random -Minimum 1024 -Maximum 65535
```
It won’t check if the port is in use, but it’s a start. You can combine it with a port scanner for better results.
