Working with IP Network Ranges in PowerShell

By Carlos Veira on Thursday, February 12, 2009

If you’ve never done it, you might think it could be a little bit complicated.  Not really, indeed:

PS C:\>10..251 | foreach { "192.168.200." + $_ } | format-list

Working with CDIR notation is not that straight forward. The best reference I’ve found about this subject can be found on this article: Finding a Range of IP addresses in CDIR notation. Brilliant!


Share this: LinkedIn X Telegram Email

Comments are provided by Disqus, which sets its own cookies once loaded.