PowerShell to download O365 IP ranges

  $ipv4CsvFile = "${env:USERPROFILE}\Documents\O365_IPv4_Addresses.csv" $ipv6CsvFile = "${env:USERPROFILE}\Documents\O365_IPv6_Addresses.csv"   [xml]$xml = ( New-Object System.Net.WebClient ).DownloadString( "https://support.content.office.net/en-us/static/O365IPAddresses.xml" )   $products = $xml.products.product   $ipList = $products.addresslist.Where( { ( $_.type -in ("IPv4","IPv6") ) -and ( $_.address -ne $null ) } )   $ipv4… Continue Reading