Last active
June 30, 2022 10:29
-
-
Save p0onage/a36d6356929fc63982b918cd1ac69763 to your computer and use it in GitHub Desktop.
Add Teams Media IP subnets into the route table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$intIndex = "" # index of the interface connected to the internet | |
$gateway = "" # default gateway of that interface (change this) | |
# Query the web service for IPs in the Optimize category | |
$destPrefix = "52.120.0.0/14", "52.112.0.0/14", "13.107.64.0/18" # Teams Media endpoints | |
# Add routes to the route table | |
foreach ($prefix in $destPrefix) {New-NetRoute -DestinationPrefix $prefix -InterfaceIndex $intIndex -NextHop $gateway} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
route -p delete 52.120.0.0/14