If you work as a consultant for small-to-midsized businesses (SMBs), you know that assessing client networks is a perennial task. In some cases, you might have sources such as Active Directory (AD) for identifying some of the computers on a LAN, but the tried-and-true method for discovering everything that's out there is frequently just testing the addresses on the entire local IP network. This method won't find machines that are turned off or currently away from the network, but it's a handy foundation for live data collection—and, as a bonus, also discovers network appliances that you might not know about. But it's not acceptable to have someone manually enter all the valid addresses for a typical network—typing all those numbers is laborious and error-prone. This is where knowing a few easy tricks with Windows PowerShell will help you out.
PowerShell's range operator (..), combined with pipeline processing, lets you run a task hundreds of times just as easily as running it once. This feature is handy for network administration tasks involving many computers. To show you what I mean, I'm going to demonstrate how to quickly generate an entire family of IP addresses for computers, letting you easily perform data-collection tasks that would otherwise take a lot of effort. . . .

