Generating a list of IP Addresses
December 6, 2007 at 5:12 PM
—
Andy Schneider
Quite often, for one reason or another, I need to create a list of IP Addresses. The Powershell Range Operator ".." comes in handy for such a situation. To get a list of all the IP's in 10.10.10.0/24 I can run the following command
[sourcecode language='css'] $ips = 1..254 | % {"10.10.10.$_"} [/sourcecode]
Now I have an array of my IP's that I can work with
bea17e85-f532-48c0-b1cf-e319730bec62|0|.0
Posted in:
Tags: