List all App Service web apps outbound IP addresses used in a subscription (Old)

You'll find in this function an easy way to extract the outbound IP addresses information used by your all your App Services in a subscription within an authenticated PowerShell Azure session.

5 Star
1,981 times
Add to favorites
Windows Azure
E-mail Twitter Digg Facebook
  • Missing array type forces hashtable
    2 Posts | Last post March 13, 2019
    • This broke until I amended the script to force an array type in the $ipAddresses declaration. If I added the -IncludePossibleOutputIpAddresses switch it tries to add the same "key" twice because if there is only one Ip Address we get a hashtable output.
      Amending line 23 from
      $ipAddresses = $_.OutboundIpAddresses -split ',' | % { @{ IpAddress = $_; Type='Outbound' } }
      $ipAddresses = @($_.OutboundIpAddresses -split ',' | % { @{ IpAddress = $_; Type='Outbound' } })
      Fixed this for me.
      Note that this only breaks when the OutboundIpAddresses property contains a SINGLE ip, at which time the output will be a hashtable not an array.
    • Thank you for taking the time to comment on this issue. The script have been updated with your recommendation.
  • List of outbound Ip address
    2 Posts | Last post January 29, 2018
    • Are the current assigned outbound IPs shared with other Azure customers? This is a security concern for a 3rd party who is whitelisting our server to access their resources.
      So, Let me rephrase the question an example:
       Server A is hosted in austraiaeast and belongs to my company. It has a range of outbound IPs [A,B,C,D]
      Server B belongs to a different azure customer (not associated to my company). It is hosted on  austraiaeast  and it has - let’s say,  a different range of IPs.
      My question is will the outbound IPs of Server B include any of the outbound IPs of server A?
    • Sorry for the late reponse. Yes there is a possibility it can share the same outbound IPs. BUT, if you are on a basic and + plan (read not shared nor free), your instances are isolated instances.