https://thinkinbig.org/2009/02/12/working-with-ip-network-ranges-in-powershell/
Working with IP Network Ranges in PowerShell