O'Reilly logo

PowerShell Deep Dives by Edited by Jeffery Hicks, Richard Siddaway, Oisín Grehan, and Aleksandar Nikoli

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. TCP port communications with PowerShell

Boe Prox

PowerShell can be a powerful network troubleshooting tool thanks to its reach back into the .NET framework. In this chapter I’ll take you through some of the more useful .NET classes that you can harness to help with your network troubleshooting and with building some fun scripts. By the end of the chapter you’ll know how to create a port scanner to check for open ports on your network, send and receive data between ports, create formatted packets to send a Lightweight Directory Access Protocol (LDAP) request to a domain controller, and process the return packets to emulate the same type of output from another command-line interface (CLI) tool, portqry.exe. You’ll also learn about creating ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required