I mentioned this script an a class recently. I threw it together sometime back. It’s not elegant, but it does what I wanted. It’s actually pretty beautiful when you consider that it was written late one night 🙂
It would need some tweaking to work as a command line script.
Just place it where you want it and then right-click and choose Run with PowerShell to get a listing of discovered networks sorted by channel.
By the way, I was studying two PowerShell concepts at the time: file access and pulling in NETSH information. I had used a method without files, but this was the last one I played with. If you want one without temp files, let me know. I can throw that together and post it too. This is mostly a learning tool for you.
Have fun and let me know if you make some great changes.Download wifi.ps1 Here