Skip to content

Instantly share code, notes, and snippets.

@nathanmcnulty
Created February 9, 2022 23:19
Show Gist options
  • Save nathanmcnulty/eadee66c99d1db220147a91040eb04e4 to your computer and use it in GitHub Desktop.
Save nathanmcnulty/eadee66c99d1db220147a91040eb04e4 to your computer and use it in GitHub Desktop.
((Invoke-RestMethod -Uri ((Invoke-WebRequest -Uri "https://www.microsoft.com/en-us/download/confirmation.aspx?id=56519" -UseBasicParsing ).links.href | Where-Object { $_ -like "*.json" })[0]).values | Where-Object { $_.name -eq "AzureAdvancedThreatProtection" }).properties.addressPrefixes | Where-Object { $_ -notlike "*:*" }
@nathanmcnulty
Copy link
Author

To see a list of all available services you can filter on, run this, then replace AzureAdvancedThreatProtection with whatever service you want the IP's for:

(Invoke-RestMethod -Uri ((Invoke-WebRequest -Uri "https://www.microsoft.com/en-us/download/confirmation.aspx?id=56519" -UseBasicParsing ).links.href | Where-Object { $_ -like "*.json" })[0]).values

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment