There are so many little shortcuts, tips, tricks that I use all the time - but never remember! So I’m going to start documenting them here. Here’s a command you can run in Windows to list open ports and export the results to a text file:
netstat -an |find /i "listening" > c:\name-of-file-to-export-to.txt