Obtain Outbound IP Adresses for Azure Webapps in a Resource Group

Use this Powershell script to obtain the outbound IP addresses of each Webapp in an Azure Resource Group. These are the IP’s you want to grant access to in any external services.

##Azure Script to Obtain outbound IP addresses for each webapp in a named Resource Group
 $scSites = Get-AzureRmWebApp -ResourceGroupName $Name 
    foreach ($site in $scSites)
     write-host "Web App: $($site.DefaultHostName)" -ForegroundColor Green 
   (Get-AzureRmResource -ResourceGroupName $Name -ResourceType Microsoft.Web/sites -ResourceName $site.SiteName).OutboundIpAddresses

     write-host "web App: $($site.OutboundIpAddresses)" -ForegroundColor Yellow




Leave a Reply

Your email address will not be published. Required fields are marked *