Skip to content

Instantly share code, notes, and snippets.

@sjwaight
Last active February 18, 2020 05:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sjwaight/e9a315cb60da3548a643a739abb1e1b5 to your computer and use it in GitHub Desktop.
Save sjwaight/e9a315cb60da3548a643a739abb1e1b5 to your computer and use it in GitHub Desktop.
Download Azure IP ranges and Service Tags (Feb 2020)
$fileDate = Get-Date -Format "yyyy-MM-dd-HH-mm"
$urlDownload = (Invoke-WebRequest https://www.microsoft.com/en-us/download/confirmation.aspx?id=56519 -UseBasicParsing).Links | Where-Object {$_.href -Match "ServiceTags"} | Select-Object -Property href -First 1
Invoke-WebRequest $urlDownload.href -OutFile "$fileDate.json"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment